java.lang.Objectorg.objectweb.telosys.common.TelosysObject
org.objectweb.telosys.common.data.DataSet
Constructor Summary | |
DataSet()
|
Method Summary | |
protected int |
addRow()
Adds a new void DataRow at the end of the DataSet |
protected int |
addRow(DataRow dataRow)
Adds a DataRow at the end of the DataSet |
boolean |
getBoolean(int iRow,
int iCol)
|
byte |
getByte(int iRow,
int iCol)
|
DataRow |
getDataRow(int iRow)
|
java.util.Date |
getDate(int iRow,
int iCol)
|
double |
getDouble(int iRow,
int iCol)
|
float |
getFloat(int iRow,
int iCol)
|
int |
getInt(int iRow,
int iCol)
|
long |
getLong(int iRow,
int iCol)
|
java.lang.Object |
getObject(int iRow,
int iCol)
|
int |
getRowCount()
Returns the number of rows |
short |
getShort(int iRow,
int iCol)
|
int |
getSortColumn()
Returns the column used as current sort criteria |
java.sql.Date |
getSqlDate(int iRow,
int iCol)
|
java.lang.String |
getString(int iRow,
int iCol)
|
java.lang.String |
getString(int iRow,
int iCol,
java.lang.String sNullValue)
|
protected void |
initBeforeLoad()
Data set initialization, must be called by subclasses before each load |
boolean |
isEmpty()
Returns 'true' if the DataSet is empty. |
boolean |
isSortedBy(int iCol)
Returns true if the DataSet is currently sorted by the given column |
boolean |
isSortedInAscendingOrder()
Returns true if the DataSet is currently sorted in ascending order |
boolean |
isSortedInDescendingOrder()
Returns true if the DataSet is currently sorted in descending order |
java.util.Iterator |
iterator()
Returns an iterator over the 'datarows' in this DataSet |
abstract int |
load()
Loads the DataSet using its definition |
abstract int |
load(java.lang.Object obj)
Loads the DataSet using its definition and the given object |
protected DataRow |
replaceRow(int iRow,
DataRow dataRow)
Replaces the DataRow at the given position by a new one |
void |
sort(int iCol)
Sort the DataSet using the given column as criteria (case sensitive) in ascending order |
void |
sort(int iCol,
java.lang.String sOrder)
Sort the DataSet using the given column as criteria (case sensitive) and the specified order ( ascending or descending ) |
void |
sortIgnoreCase(int iCol)
Sort the DataSet using the given column as criteria ( ignoring case ) in ascending order |
void |
sortIgnoreCase(int iCol,
java.lang.String sOrder)
Sort the DataSet using the given field as criteria ( ignoring case ) and the specified order ( ascending or descending ) |
Methods inherited from class org.objectweb.telosys.common.TelosysObject |
error, error, error, getFlagTrace, info, setFlagTrace, trace, warn |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DataSet()
Method Detail |
protected void initBeforeLoad()
protected DataRow replaceRow(int iRow, DataRow dataRow)
iRow
- index of row to replace ( 1 to N )dataRow
- the DataRow to be stored at the specified position
protected int addRow(DataRow dataRow)
dataRow
- the DataRow to add
protected int addRow()
public abstract int load() throws java.lang.Exception
java.lang.Exception
public abstract int load(java.lang.Object obj) throws java.lang.Exception
obj
- useful parameter for the load operation ( cannot be null )java.lang.Exception
public int getRowCount()
public boolean isEmpty()
public java.util.Iterator iterator()
public DataRow getDataRow(int iRow)
public java.lang.Object getObject(int iRow, int iCol)
public java.lang.String getString(int iRow, int iCol)
public java.lang.String getString(int iRow, int iCol, java.lang.String sNullValue)
public java.util.Date getDate(int iRow, int iCol)
public java.sql.Date getSqlDate(int iRow, int iCol)
public boolean getBoolean(int iRow, int iCol)
public byte getByte(int iRow, int iCol)
public int getInt(int iRow, int iCol)
public short getShort(int iRow, int iCol)
public long getLong(int iRow, int iCol)
public float getFloat(int iRow, int iCol)
public double getDouble(int iRow, int iCol)
public int getSortColumn()
public boolean isSortedBy(int iCol)
iCol
-
public boolean isSortedInAscendingOrder()
public boolean isSortedInDescendingOrder()
public void sort(int iCol)
iCol
- public void sort(int iCol, java.lang.String sOrder)
iCol
- sOrder
- ( "asc" or "desc" )public void sortIgnoreCase(int iCol)
iCol
- public void sortIgnoreCase(int iCol, java.lang.String sOrder)
iCol
- sOrder
- ( "asc" or "desc" )