|
OSMQ v2.0.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A multi-element container that sets and returns its elements as either Strings or scalar data types. The DataRecord supports mapping data as an int, double, long, char, String, and Date. The elements are referenced positionally (1-n). (Note that the indexing scheme can be changed by calling the method setOffsetIndex(int).) The getElementCount() method returns the number of elements in the container. This interface is modeled after the getXXX and setXXX methods implemented by the JDBC ResultSet and Statement classes.
Field Summary | |
static char |
DEFAULT_DELIMITER
|
Method Summary | |
void |
clear(int positionIndex)
Clears the value at the designated position, setting it to null (or zero if numeric) |
void |
clearAll()
Clears all the elements, setting them to null (or zero if numeric) |
java.lang.Object |
clone()
|
java.lang.Object[] |
getAsArray()
Returns an array that contains all element values |
java.math.BigDecimal |
getBigDecimal(int positionIndex)
Returns the value at the designated position as a BigDecimal |
boolean |
getBoolean(int positionIndex)
Returns the value at the designated position as a boolean |
byte |
getByte(int positionIndex)
Returns the value at the designated position as a byte |
byte[] |
getBytes()
Returns the elements as an array of bytes. |
char |
getChar(int positionIndex)
Returns the value at the designated position as a char |
java.util.Date |
getDate(int positionIndex)
Returns the value at the designated position as a Date |
char |
getDefaultDelimiter()
Returns the character that is used to delimit the various elements when the elements are strung together. |
double |
getDouble(int positionIndex)
Returns the value at the designated position as a double |
int |
getElementCount()
Returns the number of element positions (including those that are empty) |
float |
getFloat(int positionIndex)
Returns the value at the designated position as a float |
java.lang.String |
getFormattedDateString(int posn)
Returns the value at the designated position as a formatted date string in CCYY-MM-DD format. |
int |
getInt(int positionIndex)
Returns the value at the designated position as an integer |
long |
getLong(int positionIndex)
Returns the value at the designated position as a long integer |
java.lang.Object |
getObject(int positionIndex)
Returns the value of the designated position. |
int |
getOffsetIndex()
Returns the base index currently used to reference elements. |
short |
getShort(int positionIndex)
Returns the value at the designated position as a short integer |
java.sql.Date |
getSQLDate(int posn)
Returns the value at the designated position as a java.SQL.Date |
java.lang.String |
getString(int positionIndex)
Returns the value of the designated position as a String |
java.lang.String |
getText()
Creates a delimited String from the elements The first character in the String is assumed to be the delimiting character. |
java.lang.String |
getUnformattedDateString(int posn)
Returns the value at the designated position as an unformatted date string in CCYYMMDD format. |
java.lang.String |
getUpperCaseString(int positionIndex)
Returns the value at the designated position as a String with all characters forced into upper case. |
boolean |
hasAValue(int n)
Determines whether a position has a value (versus null) |
boolean |
isEmpty(int n)
Determines if a position has no value (is empty). |
boolean |
isNull(int n)
Determines if a position has no value (is empty). |
void |
resetSize(int size)
Resets the size (number of elements), and clears all the values |
void |
setBigDecimal(int positionIndex,
java.math.BigDecimal value)
Sets the element at the designated position to a BigDecimal value |
void |
setBoolean(int positionIndex,
boolean value)
Sets the element at the designated position to a boolean value |
void |
setByte(int positionIndex,
byte value)
Sets the element at the designated position to a byte value |
void |
setBytes(byte[] value)
Sets the elements to the values found in a delimited array of bytes. |
void |
setChar(int positionIndex,
char value)
Sets the element at the designated position to a char value |
void |
setDate(int positionIndex,
java.util.Date value)
Sets the element at the designated position to a Date value |
void |
setDateString(int posn,
java.lang.String value)
|
void |
setDecimalString(int posn,
java.lang.String value)
Sets the element at the designated position to a String value that represents a decimal value. |
void |
setDouble(int positionIndex,
double value)
Sets the element at the designated position to a double value |
void |
setFloat(int positionIndex,
float value)
Sets the element at the designated position to a float value |
void |
setFromArray(java.lang.Object[] v)
Sets the data elements from the values in an array. |
void |
setInt(int positionIndex,
int value)
Sets the element at the designated position to an int value |
void |
setLong(int positionIndex,
long value)
Sets the element at the designated position to a long value |
void |
setNull(int positionIndex)
Sets the value at the designated position to null |
void |
setObject(int positionIndex,
java.lang.Object value)
Sets the value at the designated position |
void |
setOffsetIndex(int value)
Sets the base index used to reference elements. |
void |
setShort(int positionIndex,
short value)
Sets the element at the designated position to a short value |
void |
setString(int positionIndex,
java.lang.String value)
Sets the element at the designated position to a String value |
void |
setText(java.lang.String value)
Sets the elements to the values found in a delimited String. |
void |
setTrimmedString(int positionIndex,
java.lang.String value)
Sets the element at the designated position to a String value. |
void |
setUpperCaseString(int positionIndex,
java.lang.String value)
Sets the element at the designated position to an upper-case String value |
boolean |
wasNull()
Returns true if the last fetched element was a null object, or the last fetched has a string length of zero. |
Methods inherited from interface osmq.util.Immutable |
isImmutable, setImmutable |
Methods inherited from interface osmq.util.ByteArray |
hasADelimiter, isADataRecord |
Field Detail |
public static final char DEFAULT_DELIMITER
Method Detail |
public boolean hasAValue(int n)
hasAValue
in interface osmq.datarows.DataRow
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a valid position.public boolean isEmpty(int n)
isEmpty
in interface osmq.datarows.DataRow
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a valid position.public boolean isNull(int n)
isNull
in interface osmq.datarows.DataRow
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a valid position.public java.lang.Object getObject(int positionIndex)
getObject
in interface osmq.datarows.DataRow
positionIndex
- the first position is 1, the second is 2, ...
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a
valid position.public java.lang.String getString(int positionIndex)
getString
in interface osmq.datarows.DataRow
positionIndex
- the first position is 1, the second is 2, ...
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a valid position.public java.lang.String getUpperCaseString(int positionIndex)
getUpperCaseString
in interface osmq.datarows.DataRow
positionIndex
- the first position is 1, the second is 2, ...
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a valid element position.public boolean getBoolean(int positionIndex)
getBoolean
in interface osmq.datarows.DataRow
positionIndex
- the first position is 1, the second is 2, ...
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a valid position.public char getChar(int positionIndex)
getChar
in interface osmq.datarows.DataRow
positionIndex
- the first position is 1, the second is 2, ...
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a valid position.public byte getByte(int positionIndex)
getByte
in interface osmq.datarows.DataRow
positionIndex
- the first position is 1, the second is 2, ...
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a valid position.public int getInt(int positionIndex)
getInt
in interface osmq.datarows.DataRow
positionIndex
- the first position is 1, the second is 2, ...
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a valid position.public short getShort(int positionIndex)
getShort
in interface osmq.datarows.DataRow
positionIndex
- the first position is 1, the second is 2, ...
java.lang.ArrayIndexOutOfBoundsException
- if columnIndex is not a valid element position.public long getLong(int positionIndex)
getLong
in interface osmq.datarows.DataRow
positionIndex
- the first position is 1, the second is 2, ...
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a valid position.public double getDouble(int positionIndex)
getDouble
in interface osmq.datarows.DataRow
positionIndex
- the first position is 1, the second is 2, ...
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a
valid position.public float getFloat(int positionIndex)
getFloat
in interface osmq.datarows.DataRow
positionIndex
- the first position is 1, the second is 2, ...
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a
valid position.public java.math.BigDecimal getBigDecimal(int positionIndex)
getBigDecimal
in interface osmq.datarows.DataRow
positionIndex
- the first position is 1, the second is 2, ...
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a
valid position.public java.util.Date getDate(int positionIndex)
getDate
in interface osmq.datarows.DataRow
positionIndex
- the first position is 1, the second is 2, ...
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a
valid position.public java.lang.String getFormattedDateString(int posn)
getFormattedDateString
in interface osmq.datarows.DataRow
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a
valid position.public java.lang.String getUnformattedDateString(int posn)
getUnformattedDateString
in interface osmq.datarows.DataRow
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a
valid position.setDateString(int, String)
public java.sql.Date getSQLDate(int posn)
getSQLDate
in interface osmq.datarows.DataRow
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a
valid position.setDateString(int, String)
public int getOffsetIndex()
getOffsetIndex
in interface osmq.datarows.DataRow
public int getElementCount()
getElementCount
in interface osmq.datarows.DataRow
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a valid position.public void clear(int positionIndex)
clear
in interface osmq.datarows.DataRow
ImmutableDataException
- if the DataRecord object is immutable.public void setObject(int positionIndex, java.lang.Object value) throws ImmutableException
setObject
in interface osmq.datarows.DataRow
positionIndex
- the first position is 1, the second is 2, ...value
- the element's new value
java.lang.ArrayIndexOutOfBoundsException
- if p is not a valid element position.
ImmutableException
- if the DataRecord object is immutable.public void setNull(int positionIndex) throws ImmutableException
setNull
in interface osmq.datarows.DataRow
positionIndex
- the first position is 1, the second is 2, ...
java.lang.ArrayIndexOutOfBoundsException
- if p is not a valid element position.
ImmutableException
- if the DataRecord object is immutable.public void setString(int positionIndex, java.lang.String value) throws ImmutableException
setString
in interface osmq.datarows.DataRow
value
- the element's new value
java.lang.ArrayIndexOutOfBoundsException
- if p is not a valid element position.
ImmutableException
- if the DataRecord object is immutable.public void setTrimmedString(int positionIndex, java.lang.String value) throws ImmutableException
setTrimmedString
in interface osmq.datarows.DataRow
positionIndex
- the first position is 1, the second is 2, ...value
- the element's new value
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a valid position.
ImmutableException
- if the DataRecord object is immutable.public void setDecimalString(int posn, java.lang.String value) throws ImmutableException
setDecimalString
in interface osmq.datarows.DataRow
value
- the element's new value
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a valid position.
ImmutableException
- if the DataRecord object is immutable.public void setBoolean(int positionIndex, boolean value) throws ImmutableException
setBoolean
in interface osmq.datarows.DataRow
positionIndex
- the first position is 1, the second is 2, ...value
- the element's new value
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a valid position.
ImmutableException
- if the DataRecord object is immutable.public void setUpperCaseString(int positionIndex, java.lang.String value) throws ImmutableException
setUpperCaseString
in interface osmq.datarows.DataRow
positionIndex
- the first position is 1, the second is 2, ...value
- the element's new value
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a valid position.
ImmutableException
- if the DataRecord object is immutable.public void setInt(int positionIndex, int value) throws ImmutableException
setInt
in interface osmq.datarows.DataRow
positionIndex
- the first position is 1, the second is 2, ...value
- the element's new value
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a valid position.
ImmutableException
- if the DataRecord object is immutable.public void setChar(int positionIndex, char value) throws ImmutableException
setChar
in interface osmq.datarows.DataRow
positionIndex
- the first position is 1, the second is 2, ...value
- the element's new value
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a valid position.
ImmutableException
- if the DataRecord object is immutable.public void setByte(int positionIndex, byte value) throws ImmutableException
setByte
in interface osmq.datarows.DataRow
positionIndex
- the first position is 1, the second is 2, ...value
- the element's new value
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a valid position.
ImmutableException
- if the DataRecord object is immutable.public void setShort(int positionIndex, short value) throws ImmutableException
setShort
in interface osmq.datarows.DataRow
positionIndex
- the first position is 1, the second is 2, ...value
- the element's new value
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a valid position.
ImmutableException
- if the DataRecord object is immutable.public void setLong(int positionIndex, long value) throws ImmutableException
setLong
in interface osmq.datarows.DataRow
positionIndex
- the first position is 1, the second is 2, ...value
- the element's new value
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a valid position.
ImmutableException
- if the DataRecord object is immutable.public void setDouble(int positionIndex, double value) throws ImmutableException
setDouble
in interface osmq.datarows.DataRow
positionIndex
- the first position is 1, the second is 2, ...value
- the element's new value
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a valid position.
ImmutableException
- if the DataRecord object is immutable.public void setFloat(int positionIndex, float value) throws ImmutableException
setFloat
in interface osmq.datarows.DataRow
positionIndex
- the first position is 1, the second is 2, ...value
- the element's new value
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a valid position.
ImmutableException
- if the DataRecord object is immutable.public void setDate(int positionIndex, java.util.Date value) throws ImmutableException
setDate
in interface osmq.datarows.DataRow
positionIndex
- the first position is 1, the second is 2, ...value
- the element's new value
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a valid position.
ImmutableException
- if the DataRecord object is immutable.public void setDateString(int posn, java.lang.String value) throws ImmutableException
setDateString
in interface osmq.datarows.DataRow
ImmutableException
public void setBigDecimal(int positionIndex, java.math.BigDecimal value) throws ImmutableException
setBigDecimal
in interface osmq.datarows.DataRow
positionIndex
- the first position is 1, the second is 2, ...value
- the element's new value
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a valid position.
ImmutableException
- if the DataRecord object is immutable.public void setOffsetIndex(int value)
setOffsetIndex
in interface osmq.datarows.DataRow
value
- the new base index valuepublic char getDefaultDelimiter()
public byte[] getBytes()
getBytes
in interface ByteArray
public java.lang.String getText()
public void setText(java.lang.String value)
ImmutableDataException
- if the DataRecord object is immutable.public void setBytes(byte[] value)
setBytes
in interface ByteArray
ImmutableDataException
- if the DataRecord object is immutable.public java.lang.Object[] getAsArray()
public void resetSize(int size) throws ImmutableException
size
- the number of elements in the resized object
ImmutableDataException
- if the DataRecord object is immutable
ImmutableException
public void clearAll() throws ImmutableException
ImmutableDataException
- if the DataRecord object is immutable.
ImmutableException
public void setFromArray(java.lang.Object[] v) throws ImmutableException
ImmutableException
- if the data elements are immutable.public boolean wasNull()
getXXX()
method call.)
public java.lang.Object clone()
|
(c) 2000 - 2003 MQue Systems All Rights Reserved |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |