|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.lapetus_ltd._2009.xml.types.XLptsDBConnectionGroupType
com.lapetus_ltd.api.db.xml.types.TLptsDBConnectionGroupType
public class TLptsDBConnectionGroupType
Class Description : This initiates the connection group that keeps a list of all connections in the XML type XLptsDBConnectionGroupType.
TLptsFactoryConnection.addToConnectionList(com.lapetus_ltd.api.db.control.TLptsConnection)
,
@getConnectionListItem
and @getConnectionListItemSize
.
Field Summary |
---|
Fields inherited from class com.lapetus_ltd._2009.xml.types.XLptsDBConnectionGroupType |
---|
connectionListItem, id, title, version |
Constructor Summary | |
---|---|
TLptsDBConnectionGroupType()
This constructor initiates Connection Group and initialize the statement list and the connection list. |
|
TLptsDBConnectionGroupType(XLptsDBConnectionGroupType connectionGroupType)
This constructor copies the connection group information from an XLptsDBConnectionGroupType. |
Method Summary | |
---|---|
void |
addConnectionListItem(XLptsDBConnectionType connectionType)
Adds the connection to the connection list. |
void |
clearConnectionListItem()
Clears the connection list. |
boolean |
equals(java.lang.Object obj)
Check for equal TLptsDBConnectionGroupType objects. |
java.util.List<XLptsDBConnectionType> |
getConnectionListItem()
Returns a copy of the actual list. |
int |
getConnectionListItemSize()
Returns the size of the actual list. |
void |
removeConnectionListItem(XLptsDBConnectionType connectionType)
Removes the connection from the connection list. |
Methods inherited from class com.lapetus_ltd._2009.xml.types.XLptsDBConnectionGroupType |
---|
getId, getTitle, getVersion, setId, setTitle, setVersion |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TLptsDBConnectionGroupType()
This constructor initiates Connection Group and initialize the statement list and the connection list.
Thread Safe : Yes
Spawns its own Thread : No
May Return NULL : Never.
Notes : Default Constructor set id and initialize the statement list and the connection list.
Example :
TLptsDBConnectionGroupType connectionGroupType = new TLptsDBConnectionGroupType();
public TLptsDBConnectionGroupType(XLptsDBConnectionGroupType connectionGroupType)
This constructor copies the connection group information from an XLptsDBConnectionGroupType.
Thread Safe : Yes
Spawns its own Thread : No
May Return NULL : Never.
Notes : Use this function every time you need to copy or instantiate a type XLptsDBConnectionGroupType class.
Example :
public void example(XLptsDBConnectionGroupType connectionGroupType) { TLptsDBConnectionGroupType cgt = new TLptsDBConnectionGroupType(connectionGroupType); }
connectionGroupType
- the class object to copy.Method Detail |
---|
public void addConnectionListItem(XLptsDBConnectionType connectionType)
Adds the connection to the connection list.
Thread Safe : Yes
Spawns its own Thread : No
May Return NULL : n/a
Notes : Use this to add to the list. Getting the list with getConnectionListItem and
then adding does not have any affect.
Example :
TLptsDBConnectionGroupType cgt = new TLptsDBConnectionGroupType(); TLptsConnection connection = new TLptsConnection(); cgt.addConnectionListItem(connection);
connectionType
- the connection to add in the list.public void clearConnectionListItem()
Clears the connection list.
Thread Safe : Yes
Spawns its own Thread : No
May Return NULL : n/a
Notes : Use this to clear the list. Getting the list with getConnectionListItem and
then clear does not have any affect.
Example :
TLptsDBConnectionGroupType cgt = new TLptsDBConnectionGroupType(); if(cgt.getConnectionListItemSize() > 0) cgt.clearConnectionListItem();
public boolean equals(java.lang.Object obj)
Check for equal TLptsDBConnectionGroupType objects.
Thread Safe : Yes
Spawns its own Thread : No
May Return NULL : n/a
Notes : Use this to compare two TLptsDBConnectionGroupType objects by there id's.
Example :
TLptsDBConnectionGroupType cgt1 = new TLptsDBConnectionGroupType(); TLptsDBConnectionGroupType cgt2 = new TLptsDBConnectionGroupType(); return cgt1.equals(cgt2);
equals
in class java.lang.Object
obj
- the connection group type
public java.util.List<XLptsDBConnectionType> getConnectionListItem()
Returns a copy of the actual list.
Thread Safe : Yes
Spawns its own Thread : No
May Return NULL : Never. The result may be an empty list.
Notes : Do not add to this list as there is no result. Use the addConnectionListItem function.
Example :
TLptsDBConnectionGroupType cgt = new TLptsDBConnectionGroupType(); TLptsConnection connection = new TLptsConnection(); for(XLptsDBConnectionType con : cgt.getConnectionListItem()) if(connection.getTitle().equals(con.getTitle())) break;
getConnectionListItem
in class XLptsDBConnectionGroupType
public int getConnectionListItemSize()
Returns the size of the actual list.
Thread Safe : Yes
Spawns its own Thread : No
May Return NULL : Never. The result may be an empty list.
Notes : Do not use getConnectionListItem().size() as it is not efficient.
Example :
TLptsDBConnectionGroupType cgt = new TLptsDBConnectionGroupType(); if(cgt.getConnectionListItemSize() > 0) return true; else return false;
public void removeConnectionListItem(XLptsDBConnectionType connectionType)
Removes the connection from the connection list.
Thread Safe : Yes
Spawns its own Thread : No
May Return NULL : n/a
Notes : Use this to remove from the list. Getting the list with getConnectionListItem and
then removing does not have any affect.
Example :
TLptsDBConnectionGroupType cgt = new TLptsDBConnectionGroupType(); String connectionTitle = "connection"; for(XLptsDBConnectionType con : cgt.getConnectionListItem()) if(con.getTitle().equals(connectionTitle)) { cgt.removeConnectionListItem(con); break; }
connectionType
- the connection to remove from list.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |