asjava.uniclientlibs
Class UniDataSet

java.lang.Object
  extended byasjava.uniclientlibs.UniDataSet
All Implemented Interfaces:
java.io.Serializable

public class UniDataSet
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

Field Summary
protected  int formatType
           
protected  java.util.Vector rowSet
           
 
Constructor Summary
UniDataSet()
          A UniDataSet object is a collection object.
UniDataSet(java.lang.Object initVal)
          A UniDataSet object is a collection object.
UniDataSet(java.lang.Object initVal, java.lang.String delimiter)
          A UniDataSet object is a collection object.
UniDataSet(UniDataSet origSet, java.lang.Object newSet, java.lang.Object retSet, java.lang.Object statSet, int returnCode, java.lang.String delimiter)
          A UniDataSet object is a collection object.
 
Method Summary
 boolean absolute(int rowNum)
          specifies the absolute position within the UniDataSet that the cursor should point to
 void afterLast()
          moves the internal UniDataSet cursor to point to the end of the data set.
 boolean append(java.lang.Object rowID)
          appends a new data element at the end of the existing data set
 boolean append(java.lang.Object rowID, java.lang.Object rowData)
          appends a new data element at the end of the existing data set
 boolean append(UniRecord recordSet)
          appends a new data element at the end of the existing data set
 void close()
          closes the dataset, resetting internal values to their initial state
 boolean deleteRow()
          deletes the current row from the dataset
 boolean deleteRow(int indexLoc)
          deletes the indexLoc row from the dataset
 boolean deleteRow(java.lang.String recordID)
          deletes the row referenced by the recordID specified.
 int findRow(java.lang.String aRowVal)
          identifies the cursor position of a given row, based on the recordID passed in.
 void first()
          moves the internal UniDataSet cursor to point to the beginning of the data set.
 int getCurrentRow()
          returns the current cursor position within the dataset.
 java.lang.String getDataSet()
          returns the data contained in the dataset as a @IM separated String
 java.lang.String getIDSet()
          returns the IDs contained in the dataset as a @IM separated String
 int getRowCount()
          returns the dataset size
 java.lang.String getString()
          returns the dataset row represented by currentRow as a String
 java.lang.String getString(int columnIndex)
          returns the dataset row represented by columnIndex as a String
 java.lang.String getString(java.lang.String columnName)
          returns the dataset row represented by columnName as a String
 UniDynArray getUniDynArray()
          Extracts the row currently pointed to by the cursor position and returns it as a UniDynArray object
 UniDynArray getUniDynArray(int indexLoc)
          Extracts the row referenced by indexLoc and returns it as a UniDynArray object
 UniDynArray getUniDynArray(java.lang.String columnName)
          Extracts the row referenced by columnName and returns it as a UniDynArray object
 UniRecord getUniRecord()
          Extracts the row currently pointed to by the cursor position and returns it as a UniRecord object
 UniRecord getUniRecord(int indexLoc)
          Extracts the row currently pointed to by the cursor position and returns it as a getUniRecord object
 UniRecord getUniRecord(java.lang.String columnName)
          Extracts the row currently pointed to by the cursor name and returns it as a getUniRecord object
 UniString getUniString()
          Extracts the row currently pointed to by the cursor position and returns it as a UniString object
 UniString getUniString(int indexLoc)
          Extracts the row currently pointed to by the cursor position and returns it as a UniString object
 UniString getUniString(java.lang.String columnName)
          Extracts the row currently pointed to by the cursor position and returns it as a UniString object
 boolean insert(int indexLoc, java.lang.Object rowID)
          inserts a new row into the dataset, inserting the row at the given cursor position
 boolean insert(int indexLoc, java.lang.Object rowID, java.lang.Object rowVal)
          inserts a new row into the dataset, inserting the row at the given cursor position
 boolean insert(int indexLoc, UniRecord recordSet)
          inserts a new row into the dataset, inserting the row at the current cursor position
 boolean insert(java.lang.Object rowVal)
          inserts a new row into the dataset, inserting the row at the current cursor position.
 boolean insert(java.lang.Object rowID, java.lang.Object rowVal)
          inserts a new row into the dataset, inserting the row at the current cursor position
 boolean insert(UniRecord recordSet)
          inserts a new row into the dataset, inserting the row at the current cursor position
 boolean isAfterLast()
          determines whether or not cursor is positioned past the last row in the dataset.
 boolean isBeforeFirst()
          determines whether or not cursor is positioned before the first row in the dataset.
 boolean isFirst()
          determines whether or not cursor is positioned at the first row in the dataset.
 boolean isLast()
          determines whether or not cursor is positioned at the last row in the dataset.
 void last()
          sets the cursor to the last row in the dataset
 boolean next()
          increments the dataset cursor by one.
 boolean previous()
          decrements the dataset cursor by one.
 boolean relative(int numRows)
          positions the dataset cursor to a position numRows away from the current position.
 boolean setIndex(int indexLoc)
          sets the cursor position to the indexLoc value referenced.
 java.lang.String toString()
          Converts the dataset into it's String representation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

formatType

protected int formatType

rowSet

protected java.util.Vector rowSet
Constructor Detail

UniDataSet

public UniDataSet()
A UniDataSet object is a collection object. It provides a collection interface for sets of UniRecord objects, which can then be used to perform bulk or batch style operations with one network operation.

Since:
UNICLIENTLIBS 1.0

UniDataSet

public UniDataSet(java.lang.Object initVal)
A UniDataSet object is a collection object. It provides a collection interface for sets of UniRecord objects, which can then be used to perform bulk or batch style operations with one network operation.

Parameters:
initVal - string representing the initial recordIDs to be stored in the dataset, which are separated by the UniTokens.AT_FM character
Since:
UNICLIENTLIBS 1.0

UniDataSet

public UniDataSet(java.lang.Object initVal,
                  java.lang.String delimiter)
A UniDataSet object is a collection object. It provides a collection interface for sets of UniRecord objects, which can then be used to perform bulk or batch style operations with one network operation.

Parameters:
initVal - string representing the initial recordIDs to be stored in the dataset
delimiter - string representing the delimiter to use to separate the recordID string
Since:
UNICLIENTLIBS 1.0

UniDataSet

public UniDataSet(UniDataSet origSet,
                  java.lang.Object newSet,
                  java.lang.Object retSet,
                  java.lang.Object statSet,
                  int returnCode,
                  java.lang.String delimiter)
A UniDataSet object is a collection object. It provides a collection interface for sets of UniRecord objects, which can then be used to perform bulk or batch style operations with one network operation. *FOR INTERNAL USE ONLY*

Parameters:
origSet - UniDataSet object containing the recordIDs that will be copied into the new dataset object
newSet - delimited string containing the data for the new collection
retSet - delimited string containing the return values for the new collection
statSet - delimited string containing the status values for the new collection
returnCode - integer representing the overall dataset status
delimiter - string representing the delimiter to use to separate the strings
Since:
UNICLIENTLIBS 1.0
Method Detail

absolute

public boolean absolute(int rowNum)
specifies the absolute position within the UniDataSet that the cursor should point to

Parameters:
rowNum - integer which specifies the absolute position within the UniDataSet
Returns:
boolean specifying whether the operation was successful.
Since:
UNICLIENTLIBS 1.0
See Also:
relative(int)

afterLast

public void afterLast()
moves the internal UniDataSet cursor to point to the end of the data set.

Since:
UNICLIENTLIBS 1.0
See Also:
isBeforeFirst()

append

public boolean append(java.lang.Object rowID)
appends a new data element at the end of the existing data set

Parameters:
rowID - Object that specifies the data to be added
Returns:
boolean representing whether the operation was successful
Since:
UNICLIENTLIBS 1.0

append

public boolean append(java.lang.Object rowID,
                      java.lang.Object rowData)
appends a new data element at the end of the existing data set

Parameters:
rowID - object that identifies the data added
rowData - object that specifies the data to be added
Returns:
boolean representing whether the operation was successful
Since:
UNICLIENTLIBS 1.0

append

public boolean append(UniRecord recordSet)
appends a new data element at the end of the existing data set

Parameters:
recordSet - UniRecord object that specifies the data to be added
Returns:
boolean representing whether the operation was successful
Since:
UNICLIENTLIBS 1.0

close

public void close()
closes the dataset, resetting internal values to their initial state

Since:
UNICLIENTLIBS 1.0

deleteRow

public boolean deleteRow()
deletes the current row from the dataset

Returns:
boolean denoting whether the operation was successful
Since:
UNICLIENTLIBS 1.0

deleteRow

public boolean deleteRow(int indexLoc)
deletes the indexLoc row from the dataset

Parameters:
indexLoc - integer repesenting which row to be deleted
Returns:
boolean denoting whether the operation was successful
Since:
UNICLIENTLIBS 1.0

deleteRow

public boolean deleteRow(java.lang.String recordID)
deletes the row referenced by the recordID specified. If the recordID does not exist in the dataset, it will return false

Parameters:
recordID - integer repesenting which row to be deleted
Returns:
boolean denoting whether the operation was successful
Since:
UNICLIENTLIBS 1.0

findRow

public int findRow(java.lang.String aRowVal)
identifies the cursor position of a given row, based on the recordID passed in. If the recordID is found, the index value is passed back. If it is not found, a -1 is returned

Parameters:
aRowVal - name of the field to reference
Returns:
integer denoting the cursor position of the requested recordID name. If the recordID was not found, -1 is returned.
Since:
UNICLIENTLIBS 1.0

first

public void first()
moves the internal UniDataSet cursor to point to the beginning of the data set.

Since:
UNICLIENTLIBS 1.0
See Also:
isBeforeFirst()

getCurrentRow

public int getCurrentRow()
returns the current cursor position within the dataset.

Returns:
integer representing the current cursor positions
Since:
UNICLIENTLIBS 1.0

getDataSet

public java.lang.String getDataSet()
returns the data contained in the dataset as a @IM separated String

Returns:
String representing an @IM separated String of the dataset data
Since:
UNICLIENTLIBS 1.0

getIDSet

public java.lang.String getIDSet()
returns the IDs contained in the dataset as a @IM separated String

Returns:
String representing an @IM separated String of the dataset IDs
Since:
UNICLIENTLIBS 1.0

getString

public java.lang.String getString()
returns the dataset row represented by currentRow as a String

Returns:
String representing the requested dataset row
Since:
UNICLIENTLIBS 1.0

getString

public java.lang.String getString(int columnIndex)
returns the dataset row represented by columnIndex as a String

Parameters:
columnIndex - integer representing which dataset row to retrieve
Returns:
String representing the requested dataset row
Since:
UNICLIENTLIBS 1.0

getString

public java.lang.String getString(java.lang.String columnName)
returns the dataset row represented by columnName as a String

Parameters:
columnName - String representing the recordID to be retrieved.
Returns:
String representing the requested dataset row
Since:
UNICLIENTLIBS 1.0

getUniDynArray

public UniDynArray getUniDynArray()
Extracts the row currently pointed to by the cursor position and returns it as a UniDynArray object

Returns:
UniDynArray representing the current row of the dataset as a UniDynArray
Since:
UNICLIENTLIBS 1.0

getUniDynArray

public UniDynArray getUniDynArray(int indexLoc)
Extracts the row referenced by indexLoc and returns it as a UniDynArray object

Parameters:
indexLoc - integer representing the cursor row to return
Returns:
UniDynArray representing the current row of the dataset as a UniDynArray
Since:
UNICLIENTLIBS 1.0

getUniDynArray

public UniDynArray getUniDynArray(java.lang.String columnName)
Extracts the row referenced by columnName and returns it as a UniDynArray object

Parameters:
columnName - string representing the record ID of the row to return
Returns:
UniDynArray representing the current row of the dataset as a UniDynArray
Since:
UNICLIENTLIBS 1.0

getUniRecord

public UniRecord getUniRecord()
Extracts the row currently pointed to by the cursor position and returns it as a UniRecord object

Returns:
UniRecord representing the current row of the dataset as a UniString
Since:
UNICLIENTLIBS 1.0

getUniRecord

public UniRecord getUniRecord(int indexLoc)
Extracts the row currently pointed to by the cursor position and returns it as a getUniRecord object

Returns:
UniRecord representing the current row of the dataset as a UniString
Since:
UNICLIENTLIBS 1.0

getUniRecord

public UniRecord getUniRecord(java.lang.String columnName)
Extracts the row currently pointed to by the cursor name and returns it as a getUniRecord object

Returns:
UniRecord representing the current row of the dataset as a UniString
Since:
UNICLIENTLIBS 1.0

getUniString

public UniString getUniString()
Extracts the row currently pointed to by the cursor position and returns it as a UniString object

Returns:
UniDynArray representing the current row of the dataset as a UniString
Since:
UNICLIENTLIBS 1.0

getUniString

public UniString getUniString(int indexLoc)
Extracts the row currently pointed to by the cursor position and returns it as a UniString object

Parameters:
indexLoc - integer representing the cursor row to return
Returns:
UniDynArray representing the current row of the dataset as a UniString
Since:
UNICLIENTLIBS 1.0

getUniString

public UniString getUniString(java.lang.String columnName)
Extracts the row currently pointed to by the cursor position and returns it as a UniString object

Parameters:
columnName - String representing the record ID of the cursor row to return
Returns:
UniDynArray representing the current row of the dataset as a UniString
Since:
UNICLIENTLIBS 1.0

getRowCount

public int getRowCount()
returns the dataset size

Returns:
integer representing the size of the dataset
Since:
UNICLIENTLIBS 1.0

insert

public boolean insert(java.lang.Object rowVal)
inserts a new row into the dataset, inserting the row at the current cursor position.

Parameters:
rowVal - the rowID of the row being inserted
Returns:
boolean representing whether the operation was successful
Since:
UNICLIENTLIBS 1.0

insert

public boolean insert(int indexLoc,
                      java.lang.Object rowID)
inserts a new row into the dataset, inserting the row at the given cursor position

Parameters:
indexLoc - the location where the row should be inserted
rowID - the rowID of the row being inserted
Returns:
boolean representing whether the operation was successful
Since:
UNICLIENTLIBS 1.0

insert

public boolean insert(java.lang.Object rowID,
                      java.lang.Object rowVal)
inserts a new row into the dataset, inserting the row at the current cursor position

Parameters:
rowID - the recordID of this row
rowVal - the data value of this row
Returns:
boolean representing whether the operation was successful
Since:
UNICLIENTLIBS 1.0

insert

public boolean insert(int indexLoc,
                      java.lang.Object rowID,
                      java.lang.Object rowVal)
inserts a new row into the dataset, inserting the row at the given cursor position

Parameters:
indexLoc - location in the dataset to insert this row
rowID - the recordID of this row
rowVal - the data value of this row
Returns:
boolean representing whether the operation was successful
Since:
UNICLIENTLIBS 1.0

insert

public boolean insert(UniRecord recordSet)
inserts a new row into the dataset, inserting the row at the current cursor position

Parameters:
recordSet - UniRecord representing the entire row to be inserted
Returns:
boolean representing whether the operation was successful
Since:
UNICLIENTLIBS 1.0

insert

public boolean insert(int indexLoc,
                      UniRecord recordSet)
inserts a new row into the dataset, inserting the row at the current cursor position

Parameters:
indexLoc - the location where the row should be inserted
recordSet - UniRecord representing the entire row to be inserted
Returns:
boolean representing whether the operation was successful
Since:
UNICLIENTLIBS 1.0

isAfterLast

public boolean isAfterLast()
determines whether or not cursor is positioned past the last row in the dataset. It can be used for the determination of when the list is exhausted.

Returns:
boolean denoting whether the cursor is past the last row or not
Since:
UNICLIENTLIBS 1.0

isBeforeFirst

public boolean isBeforeFirst()
determines whether or not cursor is positioned before the first row in the dataset.

Returns:
boolean denoting whether the cursor is before the first row or not
Since:
UNICLIENTLIBS 1.0

isFirst

public boolean isFirst()
determines whether or not cursor is positioned at the first row in the dataset.

Returns:
boolean denoting whether the cursor is at the first row or not
Since:
UNICLIENTLIBS 1.0

isLast

public boolean isLast()
determines whether or not cursor is positioned at the last row in the dataset.

Returns:
boolean denoting whether the cursor is at the last row or not
Since:
UNICLIENTLIBS 1.0

last

public void last()
sets the cursor to the last row in the dataset

Since:
UNICLIENTLIBS 1.0

next

public boolean next()
increments the dataset cursor by one. Returns true if the cursor position could be moved. If it is already at the end of the dataset, it returns a false.

Returns:
boolean denoting whether the operation was successful
Since:
UNICLIENTLIBS 1.0

previous

public boolean previous()
decrements the dataset cursor by one. Returns true if the cursor position could be moved. If it is already at the beginning of the dataset, it returns a false.

Returns:
boolean denoting whether the operation was successful
Since:
UNICLIENTLIBS 1.0

relative

public boolean relative(int numRows)
positions the dataset cursor to a position numRows away from the current position. For example, if the cursor is already set to the third row, and UniDataSet.relative( 5 ) is referenced, it will set the cursor to the eighth position within the set. If an operation is successful, it returns a true. If the operation attempts to move the cursor past the end or before the beginning, the cursor will be set to the last row or first row respectively and the operation will return false.

Parameters:
numRows - integer representing the number of rows the cursor should be moved
Returns:
boolean denoting whether the operation was successful
Since:
UNICLIENTLIBS 1.0

setIndex

public boolean setIndex(int indexLoc)
sets the cursor position to the indexLoc value referenced. Returns truefalse if the operation attempted to position the cursor outside the dataset

Parameters:
indexLoc - the index location to be used for the dataset.
Returns:
boolean denoting whether the operation was successful
Since:
UNICLIENTLIBS 1.0

toString

public java.lang.String toString()
Converts the dataset into it's String representation. It will add a UniVerse @IM mark inbetween each row of the dataset.

Returns:
String representing the dataset as a String
Since:
UNICLIENTLIBS 1.0