|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.lapetus_ltd._2009.xml.types.XLptsXmlRowSetTableType
com.lapetus_ltd.api.db.xml.types.TLptsXmlRowSetTableType
public class TLptsXmlRowSetTableType
Class Description : This class is the wrapper for the xml row table class (XLptsXmlRowSetTableType).
It contains a table name, the column names and a list of rows.
TLptsXmlRowSetType
for a full example of how to use this and the other related
Field Summary |
---|
Fields inherited from class com.lapetus_ltd._2009.xml.types.XLptsXmlRowSetTableType |
---|
columnNamesListItem, name, rowListItem |
Constructor Summary | |
---|---|
TLptsXmlRowSetTableType()
Default constructor for the XLptsXmlRowSetTableType object. |
|
TLptsXmlRowSetTableType(java.lang.String tableName,
java.util.List<java.lang.String> columnNames)
Constructs a XLptsXmlRowSetTableType object from the table name and column names. |
|
TLptsXmlRowSetTableType(XLptsXmlRowSetTableType rowSetTableType)
Constructor for the XLptsXmlRowSetTableType object. |
Method Summary | |
---|---|
void |
addColumnNamesListItem(java.lang.String columnName)
Adds a name to the column name list. |
void |
addRowListItem(XLptsXmlRowSetSingleRowType singleRowType)
Adds to the row list of this table. |
void |
clearColumnNamesListItem()
Clears the list of column names. |
void |
clearRowListItem()
Clears (deletes) all the rows of this table. |
java.util.List<java.lang.String> |
getColumnNamesListItem()
Gets the list of column names for this table. |
int |
getColumnNamesListItemSize()
Gets the size of the column name list. |
java.util.List<XLptsXmlRowSetSingleRowType> |
getRowListItem()
Gets the list of single rows for this table. |
int |
getRowListItemSize()
Gets the size of the row list. |
void |
removeColumnNamesListItem(java.lang.String columnName)
Removes an item from the column name list. |
void |
removeRowListItem(XLptsXmlRowSetSingleRowType singleRowType)
. |
Methods inherited from class com.lapetus_ltd._2009.xml.types.XLptsXmlRowSetTableType |
---|
getName, setName |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TLptsXmlRowSetTableType()
public TLptsXmlRowSetTableType(java.lang.String tableName, java.util.List<java.lang.String> columnNames)
tableName
- The table name of the new table.columnNames
- The column names of the new table.public TLptsXmlRowSetTableType(XLptsXmlRowSetTableType rowSetTableType)
rowSetTableType
- The table object to use for instantiating a new object.Method Detail |
---|
public void addColumnNamesListItem(java.lang.String columnName)
Thread Safe : Yes
Spawns its own Thread : No
May Return NULL : N/A
Notes :
Example :
TLptsXmlRowSetSingleRowType rowSetSingleRowType = new TLptsXmlRowSetSingleRowType(); XLptsXmlRowSetTableType rst = new XLptsXmlRowSetTableType(); rst.setName("MyTable"); rst.addColumnNamesListItem("Column 1"); rst.addColumnNamesListItem("Column 2"); rst.addColumnNamesListItem("Column 3"); rowSetSingleRowType.addSubTableListItem(rst);
columnName
- The name to add.public void addRowListItem(XLptsXmlRowSetSingleRowType singleRowType)
Thread Safe : Yes
Spawns its own Thread : No
May Return NULL : N/A
Notes :
Example :
List
singleRowType
- The single row to add to this table.public void clearColumnNamesListItem()
Thread Safe : Yes
Spawns its own Thread : No
May Return NULL : N/A
Notes :
Example :
TLptsXmlRowSetTableType table = new TLptsXmlRowSetTableType(); table.setName("MyTable"); table.addColumnNamesListItem("Column Oops 1"); table.addColumnNamesListItem("Column Oops 2"); table.addColumnNamesListItem("Column Oops 3"); table.clearColumnNamesListItem();
public void clearRowListItem()
Thread Safe : Yes
Spawns its own Thread : No
May Return NULL : N/A
Notes :
Example :
System.out.println("BOSS : How many rows are in this table?"); System.out.println("Employee : We have " + getRowListItemSize() + " in that table boss"); System.out.println("BOSS : What! You must be kidding me. We need cut-backs. Get rid of them!"); System.out.println("Employee : ok boss."); clearRowListItem();
public java.util.List<java.lang.String> getColumnNamesListItem()
Thread Safe : Yes
Spawns its own Thread : No
May Return NULL : Never, an empty list is returned in the worst case.
Notes : Do not add to or remove from this list, as there is no affect to the actual list.
Example :
TLptsXmlRowSetSingleRowType rowSetSingleRowType = new TLptsXmlRowSetSingleRowType(); for (XLptsXmlRowSetTableType rst : rowSetSingleRowType.getSubTableListItem()) { System.out.println("Columns for child table " + rst.getName() + ": "); for (String column : rst.getColumnNamesListItem()) System.out.print(); }
getColumnNamesListItem
in class XLptsXmlRowSetTableType
public int getColumnNamesListItemSize()
Thread Safe : Yes
Spawns its own Thread : No
May Return NULL : N/A
Notes :
Example :
TLptsXmlRowSetTableType table = new TLptsXmlRowSetTableType(); table.setName("MyTable"); table.addColumnNamesListItem("Column 1"); table.addColumnNamesListItem("Column 2"); table.addColumnNamesListItem("Column 3"); System.out.println("MyTable has " + table.getColumnNamesListItemSize() + " columns");
public java.util.List<XLptsXmlRowSetSingleRowType> getRowListItem()
Thread Safe : Yes
Spawns its own Thread : No
May Return NULL : Never, an empty list is returned in the worst case.
Notes : Do not add to or remove from this list, as there is no affect to the actual list.
Example :
for (XLptsXmlRowSetSingleRowType rowSetSingleRowType : getRowListItem()) for (XLptsXmlRowSetRowObjectType rsot : rowSetSingleRowType.getRowObjectListItem()) System.out.println(rsot.getString());
getRowListItem
in class XLptsXmlRowSetTableType
public int getRowListItemSize()
Thread Safe : Yes
Spawns its own Thread : No
May Return NULL : N/A
Notes :
Example :
System.out.println("We have " + getRowListItemSize() + " rows in this table");
public void removeColumnNamesListItem(java.lang.String columnName)
Thread Safe : Yes
Spawns its own Thread : No
May Return NULL : N/A
Notes :
Example :
TLptsXmlRowSetTableType table = new TLptsXmlRowSetTableType(); table.setName("MyTable"); table.addColumnNamesListItem("Column 1"); table.addColumnNamesListItem("Column 2"); table.addColumnNamesListItem("Column Oops"); table.addColumnNamesListItem("Column 3"); table.removeColumnNamesListItem("Column Oops");
columnName
- The column name to be removed.public void removeRowListItem(XLptsXmlRowSetSingleRowType singleRowType)
Thread Safe : Yes
Spawns its own Thread : No
May Return NULL : N/A
Notes :
Example :
for (XLptsXmlRowSetSingleRowType singleRowType : getRowListItem()) if (singleRowType.getRowNumber()==5) removeRowListItem(singleRowType); // this is not necessarily the 5th row
singleRowType
- The row to remove from the list.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |