|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.stratelia.webactiv.util.node.control.dao.NodeDAO
public class NodeDAO
This is the Node Data Access Object.
| Constructor Summary | |
|---|---|
NodeDAO()
This class must not be instanciated |
|
| Method Summary | |
|---|---|
static void |
deleteRow(Connection con,
NodePK nodePK)
Delete into the database a node but not it's descendants. |
static List<NodeDetail> |
getAllHeaders(Connection con,
NodePK nodePK)
Get all nodeDetails |
static List<NodeDetail> |
getAllHeaders(Connection con,
NodePK nodePK,
int level)
|
static List<NodeDetail> |
getAllHeaders(Connection con,
NodePK nodePK,
String sorting)
|
static List<NodeDetail> |
getAllHeaders(Connection con,
NodePK nodePK,
String sorting,
int level)
Get all nodeDetails |
static NodeDetail |
getAnotherHeader(Connection con,
NodePK nodePK)
Get the detail of another Node |
static Collection<NodeDetail> |
getAnotherPath(Connection con,
NodePK nodePK)
Get the path from root to a node |
static Collection<NodeDetail> |
getChildrenDetails(Connection con,
NodePK nodePK)
Get the header of each child of the node |
static int |
getChildrenNumber(Connection con,
NodePK nodePK)
Get the children number of this node |
static Collection<NodePK> |
getChildrenPKs(Connection con,
NodePK nodePK)
Get children node PKs of a node |
static List<NodeDetail> |
getDescendantDetails(Connection con,
NodeDetail node)
Get descendant nodeDetails of a node |
static List<NodeDetail> |
getDescendantDetails(Connection con,
NodePK nodePK)
Get descendant nodeDetails of a node |
static Collection<NodePK> |
getDescendantPKs(Connection con,
NodePK nodePK)
Get descendant node PKs of a node |
static List<NodeDetail> |
getHeadersByLevel(Connection con,
NodePK nodePK,
int level)
Get nodeDetails by level. |
static List<NodeDetail> |
getSubTree(Connection con,
NodePK nodePK,
String status)
|
static ArrayList<NodeDetail> |
getTree(Connection con,
NodePK nodePK)
|
static NodePK |
insertRow(Connection con,
NodeDetail nd)
Insert into the database the data of a node |
static boolean |
isSameNameSameLevelOnCreation(Connection con,
NodeDetail nd)
On node creation, check if another node have got the same name with same father |
static boolean |
isSameNameSameLevelOnUpdate(Connection con,
NodeDetail nd)
On node update, check if another node have got the same name with same father |
static NodeDetail |
loadRow(Connection con,
NodePK nodePK)
|
static NodeDetail |
loadRow(Connection con,
NodePK nodePK,
boolean getTranslations)
Load node attributes from database |
static NodeDetail |
loadRow(Connection con,
NodePK nodePK,
String name,
int nodeFatherId)
|
static void |
moveNode(Connection con,
NodeDetail nodeDetail)
|
static NodeDetail |
resultSet2NodeDetail(ResultSet rs,
NodePK nodePK)
Create a NodeDetail from a ResultSet |
static Collection<NodePK> |
selectByFatherPrimaryKey(Connection con,
NodePK pk)
Method declaration |
static NodePK |
selectByNameAndFatherId(Connection con,
NodePK pk,
String name,
int nodeFatherId)
|
static NodePK |
selectByPrimaryKey(Connection con,
NodePK pk)
Check if a Node exists in database. |
static void |
sortNodes(Connection con,
List<NodePK> nodePKs)
|
static void |
storeRow(Connection con,
NodeDetail nodeDetail)
Store node attributes into database |
static void |
unvalidateTree(Connection con,
NodePK nodePK)
|
static void |
updateRightsDependency(Connection con,
NodePK pk,
int rightsDependsOn)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NodeDAO()
| Method Detail |
|---|
public static ArrayList<NodeDetail> getTree(Connection con,
NodePK nodePK)
throws SQLException
SQLException
public static void unvalidateTree(Connection con,
NodePK nodePK)
public static boolean isSameNameSameLevelOnCreation(Connection con,
NodeDetail nd)
throws SQLException
con - A connection to the databasend - A NodeDetail contains new node data to compare
SQLExceptionNodeDetail
public static boolean isSameNameSameLevelOnUpdate(Connection con,
NodeDetail nd)
throws SQLException
con - A connection to the databasend - A NodeDetail contains new node data to compare
SQLExceptionNodeDetail
public static Collection<NodePK> getChildrenPKs(Connection con,
NodePK nodePK)
throws SQLException
con - A connection to the databasenodePK - A NodePK
SQLExceptionNodePK
public static Collection<NodePK> getDescendantPKs(Connection con,
NodePK nodePK)
throws SQLException
con - A connection to the databasenodePK - A NodePK
SQLExceptionNodePK
public static List<NodeDetail> getDescendantDetails(Connection con,
NodePK nodePK)
throws SQLException
con - A connection to the databasenodePK - A NodePK
SQLExceptionNodePK
public static List<NodeDetail> getDescendantDetails(Connection con,
NodeDetail node)
throws SQLException
con - A connection to the databasenode - A NodeDetail
SQLException
public static List<NodeDetail> getHeadersByLevel(Connection con,
NodePK nodePK,
int level)
throws SQLException
con - A connection to the databasenodePK - level -
SQLException
public static List<NodeDetail> getAllHeaders(Connection con,
NodePK nodePK)
throws SQLException
con - A connection to the databasenodePK -
SQLException
public static List<NodeDetail> getAllHeaders(Connection con,
NodePK nodePK,
String sorting)
throws SQLException
SQLException
public static List<NodeDetail> getAllHeaders(Connection con,
NodePK nodePK,
int level)
throws SQLException
SQLException
public static List<NodeDetail> getAllHeaders(Connection con,
NodePK nodePK,
String sorting,
int level)
throws SQLException
con - A connection to the databasenodePK - sorting - level -
SQLException
public static List<NodeDetail> getSubTree(Connection con,
NodePK nodePK,
String status)
throws SQLException
SQLException
public static Collection<NodeDetail> getAnotherPath(Connection con,
NodePK nodePK)
throws SQLException
con - A connection to the databasenodePK - A NodePK
SQLExceptionNodePK,
NodeDetail
public static NodeDetail resultSet2NodeDetail(ResultSet rs,
NodePK nodePK)
throws SQLException
rs - the ResultSet which contains datanodePK -
SQLExceptionNodeDetail
public static NodeDetail getAnotherHeader(Connection con,
NodePK nodePK)
throws SQLException
con - A connection to the databasenodePK - the PK of the Node
SQLExceptionNodeDetail
public static Collection<NodeDetail> getChildrenDetails(Connection con,
NodePK nodePK)
throws SQLException
con - A connection to the databasenodePK -
SQLExceptionNodeDetail
public static int getChildrenNumber(Connection con,
NodePK nodePK)
throws SQLException
con - A connection to the databasenodePK -
SQLException
public static NodePK insertRow(Connection con,
NodeDetail nd)
throws SQLException
con - A connection to the databasend - the NodeDetail which contains data
SQLExceptionNodeDetail
public static void deleteRow(Connection con,
NodePK nodePK)
throws SQLException
con - a connection to the databasenodePK - the node PK to delete.
SQLExceptionNodeDetail
public static NodePK selectByPrimaryKey(Connection con,
NodePK pk)
throws SQLException
con - the current connection to the database.pk - the node PK to find
SQLExceptionNodePK
public static NodePK selectByNameAndFatherId(Connection con,
NodePK pk,
String name,
int nodeFatherId)
throws SQLException
SQLException
public static Collection<NodePK> selectByFatherPrimaryKey(Connection con,
NodePK pk)
throws SQLException
con - pk -
SQLException
public static NodeDetail loadRow(Connection con,
NodePK nodePK)
throws SQLException
SQLException
public static NodeDetail loadRow(Connection con,
NodePK nodePK,
boolean getTranslations)
throws SQLException
con - a connection to the databasenodePK - getTranslations -
SQLException
public static NodeDetail loadRow(Connection con,
NodePK nodePK,
String name,
int nodeFatherId)
throws SQLException
SQLException
public static void storeRow(Connection con,
NodeDetail nodeDetail)
throws SQLException
con - a connection to the databasenodeDetail -
SQLException
public static void moveNode(Connection con,
NodeDetail nodeDetail)
throws SQLException
SQLException
public static void updateRightsDependency(Connection con,
NodePK pk,
int rightsDependsOn)
throws SQLException
SQLException
public static void sortNodes(Connection con,
List<NodePK> nodePKs)
throws SQLException
SQLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||