|
OSMQ v2.0.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectosmq.util.ImmutableImpl
osmq.records.DataRecordBean
Default implementation of a DataRecord. Uses a CoreRecord as an aggregate object container.
Field Summary |
Fields inherited from interface osmq.records.DataRecord |
DEFAULT_DELIMITER |
Constructor Summary | |
DataRecordBean()
|
|
DataRecordBean(byte[] value)
|
|
DataRecordBean(CoreRecord c)
|
|
DataRecordBean(int sz)
|
|
DataRecordBean(java.lang.Object[] elements)
|
|
DataRecordBean(java.lang.String value)
|
Method Summary | |
void |
clear(int posn)
Clears the value of the designated position to null (or zero if numeric) |
void |
clearAll()
Clear all the elements in the DataRecord object to null (or zero if numeric) |
java.lang.Object |
clone()
|
java.lang.Object[] |
getAsArray()
Returns an array that contains all element values in the DataRecord |
java.math.BigDecimal |
getBigDecimal(int p)
Gets the value at the designated position in the DataRecord object as a BigDecimal |
boolean |
getBoolean(int posn)
Gets the value at the designated position in the DataRecord object as a boolean |
byte |
getByte(int posn)
Gets the value at the designated position in the DataRecord object as a byte |
byte[] |
getBytes()
Returns the dataset elements as an array of bytes. |
char |
getChar(int posn)
Gets the value at the designated position in the DataRecord object as a char |
DataRecord |
getClone()
|
java.util.Date |
getDate(int posn)
Gets the value at the designated position in the DataRecord object 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 p)
Gets the value at the designated position in the DataRecord object as a double |
int |
getElementCount()
Returns the number of element positions (including those that are empty) |
float |
getFloat(int posn)
Gets the value at the designated position in the DataRecord object 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 p)
Gets the value at the designated position in the DataRecord object as an integer |
long |
getLong(int p)
Gets the value at the designated position in the DataRecord object as a long |
java.lang.Object |
getObject(int posn)
Gets the value at the designated position in the DataRecord object as an Object |
int |
getOffsetIndex()
Returns the base index currently used to reference elements in the DataRecord. |
short |
getShort(int n)
Gets the value at the designated position in the DataRecord object as a short |
java.sql.Date |
getSQLDate(int posn)
Returns the value at the designated position as a java.SQL.Date |
java.lang.String |
getString(int posn)
Gets the value at the designated position in the DataRecord object as a String |
java.lang.String |
getText()
Creates a delimited String from the DataRecord elements. |
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 n)
Returns the value at the designated position as a String with all characters forced into upper case. |
boolean |
hasADelimiter()
|
boolean |
hasAValue(int posn)
Determines whether a position has a value (versus null) |
boolean |
isADataRecord()
|
boolean |
isEmpty(int posn)
Determines if a position has no value (is empty). |
boolean |
isNull(int posn)
Determines if a position has no value (is empty). |
static void |
main(java.lang.String[] vars)
|
void |
resetSize(int newsize)
Resets the size (number of elements) in the DataRecord object, and clears all the values |
void |
setBigDecimal(int posn,
java.math.BigDecimal value)
Sets the element of the designated position in the DataRecord object to a BigDecimal value |
void |
setBoolean(int posn,
boolean value)
Sets the element of the designated position in the DataRecord object to a boolean value |
void |
setByte(int posn,
byte value)
Sets the element of the designated position in the DataRecord object to a byte value |
void |
setBytes(byte[] value)
Sets the value of element in the DataRecord to values found in a byte array |
void |
setChar(int posn,
char value)
Sets the element of the designated position in the DataRecord object to a char value |
void |
setDate(int posn,
java.util.Date value)
Sets the element of the designated position in the DataRecord object to a date/time 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 posn,
double value)
Sets the element of the designated position in the DataRecord object to a double value |
void |
setFloat(int posn,
float value)
Sets the element of the designated position in the DataRecord object to a float value |
void |
setFromArray(java.lang.Object[] s)
Sets the data elements from the values in an array. |
void |
setInt(int posn,
int value)
Sets the element of the designated position in the DataRecord object to an integer value |
void |
setLong(int posn,
long value)
Sets the element of the designated position in the DataRecord object to a long value |
void |
setNull(int posn)
Sets the element at the designated position in the DataRecord object to null |
void |
setObject(int posn,
java.lang.Object value)
Sets the element at the designated position in the DataRecord object to a Object value |
void |
setOffsetIndex(int value)
Sets the indexing scheme by indicating the index of the first element in the DataRecord. |
void |
setShort(int posn,
short value)
Sets the element of the designated position in the DataRecord object to a short value |
void |
setString(int posn,
java.lang.String s)
Sets the element at the designated position in the DataRecord object to a String value |
void |
setText(java.lang.String text)
Sets the value of element in the DataRecord to values found in a delimited String. |
void |
setTrimmedString(int posn,
java.lang.String s)
Sets the element at the designated position to a String value. |
void |
setUpperCaseString(int posn,
java.lang.String s)
Sets the element at the designated position to an upper-case String value |
java.lang.String |
toString()
|
boolean |
wasNull()
Returns true if the lastfetched element was a null object, or an object with a string length of zero. |
Methods inherited from class osmq.util.ImmutableImpl |
isImmutable, setImmutable |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface osmq.util.Immutable |
isImmutable, setImmutable |
Constructor Detail |
public DataRecordBean()
public DataRecordBean(java.lang.Object[] elements)
public DataRecordBean(int sz)
public DataRecordBean(CoreRecord c)
public DataRecordBean(java.lang.String value)
public DataRecordBean(byte[] value)
Method Detail |
public char getDefaultDelimiter()
DataRecord
getDefaultDelimiter
in interface DataRecord
public boolean hasADelimiter()
hasADelimiter
in interface ByteArray
public void clearAll() throws ImmutableException
clearAll
in interface DataRecord
ImmutableException
- if the DataRecord object is immutable.public void clear(int posn) throws ImmutableException
clear
in interface DataRecord
ImmutableException
- if the DataRecord object is immutable.clearAll()
public DataRecord getClone()
public java.lang.String toString()
public void setOffsetIndex(int value)
Typical values:
0 indicates a scheme of 0 thru n-0,
1 indicates a scheme of 1 thru n.
setOffsetIndex
in interface DataRecord
value
- the new base index valuepublic int getOffsetIndex()
getOffsetIndex
in interface DataRecord
public boolean wasNull()
getXXX()
method call.)
wasNull
in interface DataRecord
public java.lang.String getText()
getText
in interface DataRecord
public byte[] getBytes()
The first byte in the array is the element delimiter.
getBytes
in interface DataRecord
public java.lang.Object getObject(int posn)
getObject
in interface DataRecord
posn
- the relative position, based on the indexing scheme
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a
valid position.public java.lang.Object[] getAsArray()
getAsArray
in interface DataRecord
public char getChar(int posn)
getChar
in interface DataRecord
posn
- the relative position, based on the indexing scheme
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a
valid position.public byte getByte(int posn)
getByte
in interface DataRecord
posn
- the relative position, based on the indexing scheme
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a
valid position.public boolean getBoolean(int posn)
getBoolean
in interface DataRecord
posn
- the relative position, based on the indexing scheme
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a
valid position.public float getFloat(int posn)
getFloat
in interface DataRecord
posn
- the relative position, based on the indexing scheme
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a
valid position.public double getDouble(int p)
getDouble
in interface DataRecord
p
- 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 p)
getBigDecimal
in interface DataRecord
p
- the first position is 1, the second is 2, ...
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a
valid position.public int getElementCount()
DataRecord
getElementCount
in interface DataRecord
public int getInt(int p)
getInt
in interface DataRecord
p
- the first position is 1, the second is 2, ...
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a
valid position.public long getLong(int p)
getLong
in interface DataRecord
p
- the first position is 1, the second is 2, ...
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a
valid position.public short getShort(int n)
getShort
in interface DataRecord
n
- 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 posn)
getString
in interface DataRecord
posn
- the relative position, based on the indexing scheme
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a
valid position.public java.lang.String getUpperCaseString(int n)
DataRecord
getUpperCaseString
in interface DataRecord
n
- the first position is 1, the second is 2, ...
public java.util.Date getDate(int posn)
getDate
in interface DataRecord
posn
- the relative position, based on the indexing scheme
java.lang.ArrayIndexOutOfBoundsException
- if positionIndex is not a
valid position.public boolean hasAValue(int posn)
DataRecord
hasAValue
in interface DataRecord
public boolean isEmpty(int posn)
DataRecord
isEmpty
in interface DataRecord
public boolean isNull(int posn)
DataRecord
isNull
in interface DataRecord
public void resetSize(int newsize) throws ImmutableException
resetSize
in interface DataRecord
newsize
- the number of elements in the resized object
ImmutableException
- if the DataRecord object is immutablepublic void setObject(int posn, java.lang.Object value) throws ImmutableException
setObject
in interface DataRecord
posn
- the relative position of the element, based on the indexing schemevalue
- the element's new value
java.lang.ArrayIndexOutOfBoundsException
- if posn is not a valid position.
ImmutableException
- if the DataRecord object is immutable.public void setText(java.lang.String text)
setText
in interface DataRecord
text
- the delimited String of elements. The first character in the String
is assumed to be the delimiter.
ImmutableException
- if the DataRecord object is immutablepublic void setBytes(byte[] value)
setBytes
in interface DataRecord
ImmutableException
- if the DataRecord object is immutablepublic void setString(int posn, java.lang.String s) throws ImmutableException
setString
in interface DataRecord
posn
- the relative position of the element, based on the indexing schemes
- the element's new value
java.lang.ArrayIndexOutOfBoundsException
- if posn is not a valid position.
ImmutableException
- if the DataRecord object is immutable.public void setTrimmedString(int posn, java.lang.String s) throws ImmutableException
DataRecord
setTrimmedString
in interface DataRecord
posn
- the first position is 1, the second is 2, ...s
- the element's new value
ImmutableException
- if the DataRecord object is immutable.public void setNull(int posn) throws ImmutableException
setNull
in interface DataRecord
posn
- the relative position of the element, based on the indexing scheme
java.lang.ArrayIndexOutOfBoundsException
- if posn is not a valid position.
ImmutableException
- if the DataRecord object is immutable.public void setByte(int posn, byte value) throws ImmutableException
setByte
in interface DataRecord
posn
- the relative position of the element, based on the indexing schemevalue
- the element's new value
java.lang.ArrayIndexOutOfBoundsException
- if posn is not a valid position.
ImmutableException
- if the DataRecord object is immutable.public void setBoolean(int posn, boolean value) throws ImmutableException
setBoolean
in interface DataRecord
posn
- the relative position of the element, based on the indexing schemevalue
- the element's new value, either true or false.
java.lang.ArrayIndexOutOfBoundsException
- if posn is not a valid position.
ImmutableException
- if the DataRecord object is immutable.public void setChar(int posn, char value) throws ImmutableException
setChar
in interface DataRecord
posn
- the relative position of the element, based on the indexing schemevalue
- the element's new value
java.lang.ArrayIndexOutOfBoundsException
- if posn is not a valid position.
ImmutableException
- if the DataRecord object is immutable.public void setFloat(int posn, float value) throws ImmutableException
setFloat
in interface DataRecord
posn
- the element's relative position, based on the indexing schemevalue
- the element's new value
java.lang.ArrayIndexOutOfBoundsException
- if posn is not a valid position.
ImmutableException
- if the DataRecord object is immutable.public void setDouble(int posn, double value) throws ImmutableException
setDouble
in interface DataRecord
posn
- the element's relative position, based on the indexing schemevalue
- the element's new value
java.lang.ArrayIndexOutOfBoundsException
- if posn is not a valid position.
ImmutableException
- if the DataRecord object is immutable.public void setDecimalString(int posn, java.lang.String value) throws ImmutableException
DataRecord
setDecimalString
in interface DataRecord
value
- the element's new value
ImmutableException
- if the DataRecord object is immutable.public void setBigDecimal(int posn, java.math.BigDecimal value) throws ImmutableException
setBigDecimal
in interface DataRecord
posn
- the element's relative position, based on the indexing schemevalue
- the element's new value
java.lang.ArrayIndexOutOfBoundsException
- if posn is not a valid position.
ImmutableException
- if the DataRecord object is immutable.public void setDate(int posn, java.util.Date value) throws ImmutableException
setDate
in interface DataRecord
posn
- the element's relative position, based on the indexing schemevalue
- the element's new value as a Java Date object
java.lang.ArrayIndexOutOfBoundsException
- if posn 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 DataRecord
ImmutableException
public java.lang.String getUnformattedDateString(int posn)
DataRecord
getUnformattedDateString
in interface DataRecord
DataRecord.setDateString(int, String)
public java.lang.String getFormattedDateString(int posn)
DataRecord
getFormattedDateString
in interface DataRecord
public java.sql.Date getSQLDate(int posn)
DataRecord
getSQLDate
in interface DataRecord
DataRecord.setDateString(int, String)
public void setFromArray(java.lang.Object[] s) throws ImmutableException
DataRecord
setFromArray
in interface DataRecord
ImmutableException
- if the data elements are immutable.public void setInt(int posn, int value) throws ImmutableException
setInt
in interface DataRecord
posn
- the element's relative position, based on the indexing schemevalue
- the element's new value
java.lang.ArrayIndexOutOfBoundsException
- if posn is not a valid position.
ImmutableException
- if the DataRecord object is immutable.public void setLong(int posn, long value) throws ImmutableException
setLong
in interface DataRecord
posn
- the element's relative position, based on the indexing schemevalue
- the element's new value
java.lang.ArrayIndexOutOfBoundsException
- if posn is not a valid position.
ImmutableException
- if the DataRecord object is immutable.public void setShort(int posn, short value) throws ImmutableException
setShort
in interface DataRecord
posn
- the element's relative position, based on the indexing schemevalue
- the element's new value
java.lang.ArrayIndexOutOfBoundsException
- if posn is not a valid position.
ImmutableException
- if the DataRecord object is immutable.public void setUpperCaseString(int posn, java.lang.String s) throws ImmutableException
DataRecord
setUpperCaseString
in interface DataRecord
posn
- the first position is 1, the second is 2, ...s
- the element's new value
ImmutableException
- if the DataRecord object is immutable.public boolean isADataRecord()
isADataRecord
in interface ByteArray
public java.lang.Object clone()
clone
in interface DataRecord
public static void main(java.lang.String[] vars)
|
(c) 2000 - 2003 MQue Systems All Rights Reserved |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |