|
BEA Systems, Inc. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--weblogic.db.jdbc.Record
A Record object is a collection of Value objects. A row returned from a database query maps to a Record object.
A Record object is contained in a DataSet, which is a collection of Records. The Schema object of the parent DataSet describes the name, data type, size, and order of each field in a Record.
For implementation and usage see the Developers Guide.
DataSet
,
Value
, Serialized FormField Summary | |
protected boolean[] |
isclean
|
protected int |
numcols
|
protected DataSet |
parentdataset
|
protected Value[] |
values
|
Constructor Summary | |
Record()
Private constructor used for serialization - do not use. |
|
Record(DataSet ds)
Record constructor used when adding records to an existing DataSet object. |
Method Summary | |
java.lang.String |
asFormattedString(java.lang.String valueseparator,
int[] maxwidths)
Returns the value of each column in a Record as a formatted String. |
DataSet |
dataset()
Returns the parent DataSet of a Record. |
java.lang.String |
getRefreshQueryString()
|
java.lang.String |
getSaveString()
Returns the SQL String used to save a Record to the database. |
Value |
getValue(int pos)
Returns the Value at the specified 1-based index position in a Record. |
Value |
getValue(java.lang.String colname)
Returns the Value for the specified column name in a Record. |
boolean |
isAZombie()
Determines whether a Record is a zombie. |
protected void |
markAsDelete()
|
protected void |
markAsInsert()
|
protected void |
markAsUpdate()
|
protected void |
markAsZombie()
|
void |
markForInsert()
|
void |
markForUpdate()
|
void |
markRecordClean()
|
Record |
markToBeDeleted()
Marks a Record object for deletion. |
void |
markValueClean(int pos)
|
void |
markValueClean(java.lang.String colname)
|
void |
markValueDirty(int pos)
|
void |
markValueDirty(java.lang.String colname)
|
boolean |
needsToBeSaved()
Determines whether a Record needs to be saved. |
boolean |
recordIsClean()
Determines whether any Value in a Record needs to be saved to the database. |
void |
refresh(java.sql.Connection conn)
Reloads the data for the row from the DBMS. |
int |
save()
Saves a Record to the database using the default Connection. |
int |
save(java.sql.Connection conn)
Saves a Record to the database using the specified Connection. |
int |
saveWithoutStatusUpdate(java.sql.Connection conn)
Saves a Record to the database using the specified Connection but without updating the status. |
Schema |
schema()
Returns the Schema associated with a Record. |
Record |
setValue(int pos,
java.math.BigDecimal val)
Sets the Value at the specified index position to a java.math.BigDecimal. |
Record |
setValue(int pos,
boolean val)
Sets the Value at the specified index position to a boolean. |
Record |
setValue(int pos,
byte[] val)
Sets the Value at the specified index position to a byte[]. |
Record |
setValue(int pos,
java.util.Date val)
Sets the Value at the specified index position to a java.util.Date. |
Record |
setValue(int pos,
java.sql.Date val)
Sets the Value at the specified index position to java.sql.Date. |
Record |
setValue(int pos,
double val)
Sets the Value at the specified index position to a double. |
Record |
setValue(int pos,
float val)
Sets the Value at the specified index position to a float. |
Record |
setValue(int pos,
int val)
Sets the Value at the specified index position to a int. |
Record |
setValue(int pos,
long val)
Sets the Value at the specified index position to a long. |
Record |
setValue(int pos,
java.lang.String val)
Sets the Value at the specified index position to a String. |
Record |
setValue(int pos,
java.sql.Time val)
Sets the Value at the specified index position to java.sql.Time. |
Record |
setValue(int pos,
java.sql.Timestamp val)
Sets the Value at the specified index position to java.sql.Timestamp. |
Record |
setValue(int pos,
Value val)
Sets the Value at the specified index position to a Value. |
Record |
setValue(java.lang.String colname,
java.math.BigDecimal val)
Sets the Value at the specified column name to a BigDecimal. |
Record |
setValue(java.lang.String colname,
boolean val)
Sets the Value at the specified column name to a boolean. |
Record |
setValue(java.lang.String colname,
byte[] val)
Sets the Value at the specified column name to a byte[]. |
Record |
setValue(java.lang.String colname,
java.sql.Date val)
Sets the Value at the specified column name to java.sql.Date. |
Record |
setValue(java.lang.String colname,
java.util.Date dateval)
Sets the Value at the specified column name to java.util.Date. |
Record |
setValue(java.lang.String colname,
double val)
Sets the Value at the specified column name to a double. |
Record |
setValue(java.lang.String colname,
float val)
Sets the Value at the specified column name to a float. |
Record |
setValue(java.lang.String colname,
int val)
Sets the Value at the specified column name to a int. |
Record |
setValue(java.lang.String colname,
long val)
Sets the Value at the specified column name to a long. |
Record |
setValue(java.lang.String colname,
java.lang.String val)
Sets the Value at the specified column name to a String. |
Record |
setValue(java.lang.String colname,
java.sql.Time val)
Sets the Value at the specified column name to java.sql.Time. |
Record |
setValue(java.lang.String colname,
java.sql.Timestamp val)
Sets the Value at the specified column name to java.sql.Timestamp. |
Record |
setValue(java.lang.String colname,
Value val)
Sets the Value at the specified column name to a Value. |
Record |
setValueNull(int pos)
Sets the Value at the specified index position to NULL. |
Record |
setValueNull(java.lang.String colname)
Sets the Value at the specified column name to NULL. |
int |
size()
Returns the number of columns in a Record. |
boolean |
toBeSavedWithDelete()
Determines whether a Record will be saved with an SQL DELETE statement. |
boolean |
toBeSavedWithInsert()
Determines whether a Record will be saved with an SQL INSERT statement. |
boolean |
toBeSavedWithUpdate()
Determines whether a Record will be saved with an SQL UPDATE statement. |
java.lang.String |
toString()
Returns a string representation of a Record. |
Record |
unmarkToBeDeleted()
Unmarks a Record that has been marked for deletion. |
void |
updateStatus()
Updates the save status of the record after a saveWithoutStatusUpdate(). |
boolean |
valueIsClean(int pos)
Determines whether a Value at a particular index in a Record needs to be saved to the database. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
protected DataSet parentdataset
protected Value[] values
protected boolean[] isclean
protected int numcols
Constructor Detail |
public Record()
public Record(DataSet ds) throws DataSetException, java.sql.SQLException
ds
- DataSet objectDataSet.addRecord()
Method Detail |
public void refresh(java.sql.Connection conn) throws DataSetException, java.sql.SQLException
public java.lang.String getRefreshQueryString() throws DataSetException, java.sql.SQLException
public boolean needsToBeSaved()
public boolean toBeSavedWithUpdate()
public boolean toBeSavedWithDelete()
public boolean toBeSavedWithInsert()
public boolean isAZombie()
public Record unmarkToBeDeleted()
markToBeDeleted()
public Record markToBeDeleted() throws DataSetException
unmarkToBeDeleted()
public DataSet dataset()
public int size()
public Schema schema() throws java.sql.SQLException, DataSetException
public java.lang.String toString()
public java.lang.String asFormattedString(java.lang.String valueseparator, int[] maxwidths) throws DataSetException
valueseparator
- Delimiter charactermaxwidths
- Array of ints that represent the widths
of the columns in the Record objectpublic Value getValue(int pos) throws DataSetException
pos
- 1-based ndex position of a column in the Record objectpublic Value getValue(java.lang.String colname) throws java.sql.SQLException, DataSetException
colname
- Name of a columnpublic void markRecordClean()
public Record setValue(int pos, Value val) throws DataSetException
pos
- 1-based index into the Record objectval
- Value valuepublic Record setValue(java.lang.String colname, Value val) throws java.sql.SQLException, DataSetException
colname
- Column name in the Record objectval
- Value valuepublic Record setValue(int pos, java.util.Date val) throws DataSetException
pos
- 1-based index into the Record objectval
- java.util.Date valuepublic Record setValue(int pos, boolean val) throws DataSetException
pos
- 1-based index into the Record objectval
- boolean valuepublic Record setValue(int pos, java.lang.String val) throws DataSetException
pos
- 1-based index into the Record objectval
- String valuepublic Record setValue(int pos, int val) throws DataSetException
pos
- 1-based index into the Record objectval
- Int valuepublic Record setValue(int pos, long val) throws DataSetException
pos
- 1-based index into the Record objectval
- long valuepublic Record setValue(int pos, float val) throws DataSetException
pos
- 1-based index into the Record objectval
- Float valuepublic Record setValue(int pos, double val) throws DataSetException
pos
- 1-based index into the Record objectval
- Double valuepublic Record setValue(int pos, java.sql.Time val) throws DataSetException, InvalidDateException
pos
- 1-based index into the Record objectval
- java.sql.Time valuepublic Record setValue(int pos, java.sql.Date val) throws DataSetException, InvalidDateException
pos
- 1-based index into the Record objectval
- java.sql.Date valuepublic Record setValue(int pos, java.sql.Timestamp val) throws DataSetException, InvalidDateException
pos
- 1-based index into the Record objectval
- java.sql.Timestamp valuepublic Record setValue(int pos, byte[] val) throws DataSetException
pos
- 1-based index into the Record objectval
- byte[] valuepublic Record setValue(int pos, java.math.BigDecimal val) throws DataSetException
pos
- 1-based index into the Record objectval
- java.math.BigDecimal valuepublic Record setValueNull(int pos) throws DataSetException
pos
- 1-based index into the Record objectpublic Record setValueNull(java.lang.String colname) throws java.sql.SQLException, DataSetException
colname
- Column name in the Record objectpublic Record setValue(java.lang.String colname, boolean val) throws java.sql.SQLException, DataSetException
colname
- Column name in the Record objectval
- boolean valuepublic Record setValue(java.lang.String colname, java.lang.String val) throws java.sql.SQLException, DataSetException
colname
- Column name in the Record objectval
- String valuepublic Record setValue(java.lang.String colname, int val) throws java.sql.SQLException, DataSetException
colname
- Column name in the Record objectval
- Int valuepublic Record setValue(java.lang.String colname, long val) throws java.sql.SQLException, DataSetException
colname
- Column name in the Record objectval
- long valuepublic Record setValue(java.lang.String colname, float val) throws java.sql.SQLException, DataSetException
colname
- Column name in the Record objectval
- Float valuepublic Record setValue(java.lang.String colname, double val) throws java.sql.SQLException, DataSetException
colname
- Column name in the Record objectval
- Double valuepublic Record setValue(java.lang.String colname, java.sql.Time val) throws InvalidDateException, java.sql.SQLException, DataSetException
colname
- Column name in the Record objectval
- java.sql.Time valuepublic Record setValue(java.lang.String colname, java.sql.Date val) throws InvalidDateException, java.sql.SQLException, DataSetException
colname
- Column name in the Record objectval
- java.sql.Date valuepublic Record setValue(java.lang.String colname, java.sql.Timestamp val) throws InvalidDateException, java.sql.SQLException, DataSetException
colname
- Column name in the Record objectval
- java.sql.Timestamp valuepublic Record setValue(java.lang.String colname, java.util.Date dateval) throws InvalidDateException, java.sql.SQLException, DataSetException
colname
- Column name in the Record objectval
- java.util.Date valuepublic Record setValue(java.lang.String colname, byte[] val) throws DataSetException, java.sql.SQLException
colname
- Column name in the Record objectval
- byte[] valuepublic Record setValue(java.lang.String colname, java.math.BigDecimal val) throws DataSetException, java.sql.SQLException
colname
- Column name in the Record objectval
- BigDecimal valuepublic void markValueDirty(int pos) throws DataSetException
public void markValueDirty(java.lang.String colname) throws java.sql.SQLException, DataSetException
public boolean valueIsClean(int pos)
pos
- 1-based index into the Record objectpublic boolean recordIsClean()
public java.lang.String getSaveString() throws java.sql.SQLException, DataSetException
public int save() throws DataSetException, java.sql.SQLException
public int save(java.sql.Connection conn) throws DataSetException, java.sql.SQLException
conn
- Connection objectpublic int saveWithoutStatusUpdate(java.sql.Connection conn) throws DataSetException, java.sql.SQLException
conn
- Connection objectpublic void markValueClean(int pos)
public void markValueClean(java.lang.String colname) throws java.sql.SQLException, DataSetException
protected void markAsUpdate()
protected void markAsInsert()
protected void markAsDelete()
protected void markAsZombie()
public void markForInsert()
public void markForUpdate()
public void updateStatus() throws java.sql.SQLException, DataSetException
|
Documentation is available at http://e-docs.bea.com/wls/docs61 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |