|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.wpi.cs.DSRG.xmldb.DTDMObjects.DTDM_NestingWrapper
DTDM_NestingWrapper.java representing object - Nesting in ALL_DTDS_DTDM_NESTING table. API: DTDM_NestingWrapper(JDBCClient, String, String, int, int) - Get all member variables setting based on given parent_name, child_name, position, Current DTD Id, and statement of opened connection. DTDM_NestingWrapper(JDBCClient, int, int) - Get all member variables setting based on given Nesting_ID, Current DTD Id, and statement of opened connection. For Example:
Statement stmt = this.Conn.createStatement(); DTDM_NestingWrapper nesting = new DTDM_NestingWrapper(client, "person", "email", 1, 71);
Statement stmt = this.Conn.createStatement(); DTDM_NestingWrapper nesting = new DTDM_NestingWrapper(client, 28, 71);* member variables: CurrDTDMId - Id of the current DTD miNestingID - ID of current Nesting miNestingPositon - Position of current Nesting msNestingMultiple - "true" means parent of current Nesting may have multiple children; "false" means parent of current Nesting must have no more than 1 child. msNestingOptional - "true" means parent may have no children; "false" means parent must have children. Parent_Node - Object - Item contains all the information of parent of nesting. Child_Node - Object - Item contains all the imformation of child of nesting. member functions: Load() - load the member variables based on given parent name, child name and position. Insert() - Insert current Nesting into DTDM_NestingWrapper Table. Delete() - Delete current Nesting from DTDM_NestingWrapper Table. Update() - Update current Nesting in DTDM_NestingWrapper Table based on member variables setting. Get_sibling_Nestings_In_Range(int)- get vector that contains all the sibling Nestings in range of (from_pos, to_pos) Get_sibling_Items_In_Range(int) - get vector that contains all the silbing Items in range of (from_pos, to_pos) Reposition_Related_Nesting_In_Range(int) - all the sibling Nestins in range(from_position, to_position) will be repositioned based on the given factor - Increase("+") or Decrease("-") SetNestingID(int) - set member variable miNestingID. SetNestingPosition(int) - set member variable miNestingPositon. SetNestingMultiple(String) - set member variable msNestingMultiple. SetNestingOptional(String) - set member variable msNestingOptional. SetNestingParentNode(DTDM_ItemWrapper) - set object - Item - parent of Nesting SetNestingChildNode(DTDM_ItemWrapper) - set object - Item - child of Nesting GetNestingID() - get value of member variable miNestingID. GetNestingPosition() - get value of member variable miNestingPosition. GetNestingMultiple() - get value of member variable msNestingMultiple. GetNestingOptional() - get value of member variable msNestingOptional. GetParentNode() - get object - Item - parent of Nesting GetChildNode() - get object - Item - chiild of Nesting Reset() - reset all the member variables of object - Nesting.
Field Summary | |
(package private) DTDM_ItemWrapper |
Child_Node
|
(package private) JDBCClient |
client
Global Statement of opened connection |
(package private) java.lang.String |
CurrDTDMId
Initialize the class |
(package private) int |
miNestingID
|
(package private) int |
miNestingPosition
|
(package private) java.lang.String |
msNestingMultiple
|
(package private) java.lang.String |
msNestingOptional
|
(package private) DTDM_ItemWrapper |
Parent_Node
|
Constructor Summary | |
DTDM_NestingWrapper(JDBCClient client,
int Nesting_ID,
java.lang.String currDTDM_ID)
API 2 - Get all member variables setting based on given Nesting_ID and the statement of opened connection. |
|
DTDM_NestingWrapper(JDBCClient client,
java.lang.String Nesting_Parent,
java.lang.String Nesting_Child,
int Nesting_Position,
java.lang.String currDTDM_ID)
API 1 - Get all member variables setting based on given Nesting_Parent_Name, Nesting_Child_Name position and statement of opened connection. |
Method Summary | |
boolean |
Delete()
Delete current Nesting from ALL_DTDS_DTDM_NESTING Table. |
java.util.Vector |
Get_sibling_Items_In_Range(int ToPosition)
return vector that contains all the objects - Items that are siblings of child of the current Nesting. |
java.util.Vector |
Get_sibling_Nestings_In_Range(int ToPosition)
return vector that contains all the objects - Nestings that are siblings of the current Nesting |
DTDM_ItemWrapper |
GetChildNode()
return object - Item that contains all the information of child of Nesting |
java.lang.String |
GetDTD_ID()
return ID of current DTD_ID |
int |
GetNestingID()
return ID of current Nesting |
java.lang.String |
GetNestingMultiple()
return Quantifier(Multiple) of current Nesting |
java.lang.String |
GetNestingOptional()
return Quantifier(Optional) of current Nesting |
int |
GetNestingPosition()
return Position of current Nesting |
DTDM_ItemWrapper |
GetParentNode()
return object - Item that contains all the information of parent of Nesting |
boolean |
Insert()
Insert current Nesting into ALL_DTDS_DTDM_NESTING Table. |
boolean |
Load()
load member variable of miNestingID, msNestingMultiple, msNestingOptional based on given Nesting_Parent_Name, Nesting_Child_Name and Position. |
boolean |
Reposition_Related_Nesting_In_Range(int to_position,
java.lang.String sfactor)
return boolean to show repositon successfully or not. |
void |
Reset()
reset all member variables of object - Nesting |
void |
SetNestingChildNode(DTDM_ItemWrapper NewChildNode)
set member variable - msNestingParentNode |
void |
SetNestingID(int iNewNestingID)
set member variable - miNesting |
void |
SetNestingMultiple(java.lang.String sNewNestingMultiple)
set member variable - msNestingMultiple |
void |
SetNestingOptional(java.lang.String sNewNestingOptional)
set member variable - msNestingOptional |
void |
SetNestingParentNode(DTDM_ItemWrapper NewParentNode)
set member variable - msNestingParentNode |
void |
SetNestingPosition(int iNewNestingPosition)
set memeber variable - miNestingPositon |
boolean |
Shift_Siblings_Left(int start_position)
|
boolean |
Shift_Siblings_Right(int start_position)
|
boolean |
Update()
Update current Nesting in ALL_DTDS_DTDM_NESTING Table |
Methods inherited from class java.lang.Object |
|
Field Detail |
java.lang.String CurrDTDMId
int miNestingID
int miNestingPosition
java.lang.String msNestingMultiple
java.lang.String msNestingOptional
DTDM_ItemWrapper Parent_Node
DTDM_ItemWrapper Child_Node
JDBCClient client
Constructor Detail |
public DTDM_NestingWrapper(JDBCClient client, java.lang.String Nesting_Parent, java.lang.String Nesting_Child, int Nesting_Position, java.lang.String currDTDM_ID)
public DTDM_NestingWrapper(JDBCClient client, int Nesting_ID, java.lang.String currDTDM_ID)
Method Detail |
public boolean Load()
public boolean Insert()
public boolean Delete()
public boolean Update()
public java.util.Vector Get_sibling_Nestings_In_Range(int ToPosition)
int
- toposition - decide the range. usually it is (miNestingPositon, ToPosition).public java.util.Vector Get_sibling_Items_In_Range(int ToPosition)
int
- ToPosition - decide the range(miNestingPosition, ToPosition)public boolean Reposition_Related_Nesting_In_Range(int to_position, java.lang.String sfactor)
int
- to_position to decide the range for repositioning.
range is (miNestingPosition, to_position)java.lang.String
- sfactor - how to repositioning. Increase or Decrease.public boolean Shift_Siblings_Right(int start_position)
public boolean Shift_Siblings_Left(int start_position)
public void SetNestingID(int iNewNestingID)
int
- iNewNestingID - New Nesting ID to set member variablepublic void SetNestingPosition(int iNewNestingPosition)
int
- iNewNestingPosition - New Nesting Position to set member variablepublic void SetNestingMultiple(java.lang.String sNewNestingMultiple)
String
- sNewNestingMultiple - New Nesting Multiple to set member variablepublic void SetNestingOptional(java.lang.String sNewNestingOptional)
String
- sNewNestingOptional - New Nesting Optional to set member variablepublic void SetNestingParentNode(DTDM_ItemWrapper NewParentNode)
DTDM_ItemWrapper
- ParentNode - New Parent of Nesting to set member variablepublic void SetNestingChildNode(DTDM_ItemWrapper NewChildNode)
DTDM_ItemWrapper
- ChildNode - New Child of Nesting to set member variablepublic int GetNestingID()
None
- public java.lang.String GetDTD_ID()
None
- public int GetNestingPosition()
None
- public java.lang.String GetNestingMultiple()
None
- public java.lang.String GetNestingOptional()
None
- public DTDM_ItemWrapper GetParentNode()
None
- public DTDM_ItemWrapper GetChildNode()
None
- public void Reset()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |