public class RowImpl extends java.lang.Object implements Row, java.lang.Cloneable
Row implementation.| Modifier and Type | Field and Description |
|---|---|
protected byte |
flags |
static java.lang.Object |
NULL |
static int |
RAW |
protected static int |
VALID |
ACTION_DELETE, ACTION_INSERT, ACTION_UNKNOWN, ACTION_UPDATE| Modifier | Constructor and Description |
|---|---|
protected |
RowImpl(Column[] cols,
int action) |
|
RowImpl(Table table,
int action)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
canSet(ColumnIO io,
int i,
boolean nullValue)
Return true if the given column index is settable.
|
protected boolean |
canSetAny(ColumnIO io,
int i,
boolean nullValue)
Return true if any of the given column indexes are settable.
|
void |
clearForeignKey(ForeignKey fk)
Clear a circular foreign key.
|
void |
clearRelationId(Column col)
Clear a circular relation id.
|
java.lang.Object |
clone()
Performs a proper deep clone.
|
void |
copyInto(RowImpl row,
boolean whereOnly)
Copy all values from this row into the given one.
|
void |
flush(java.sql.PreparedStatement stmnt,
DBDictionary dict,
JDBCStore store)
Flush the row's values to the given prepared statement.
|
void |
flush(java.sql.PreparedStatement stmnt,
int idx,
DBDictionary dict,
JDBCStore store)
Flush the row's values to the given prepared statement.
|
protected java.lang.String |
generateSQL(DBDictionary dict)
Generate the SQL for this row; the result of this method is cached.
|
int |
getAction()
Return the action for this row.
|
Column[] |
getColumns() |
java.lang.Object |
getFailedObject()
This implementation does not track failed objects.
|
int |
getParameterCount()
The number of parameters that will be set for this row.
|
OpenJPAStateManager |
getPrimaryKey()
This implementation does not track primary keys.
|
java.lang.Object |
getSet(Column col)
Return the value set for update on the given column.
|
java.lang.String |
getSQL(DBDictionary dict)
Return the SQL for the operation on this row.
|
Table |
getTable()
Return the table for this row.
|
int[] |
getTypes() |
java.lang.Object[] |
getVals() |
java.lang.Object |
getWhere(Column col)
Return the value set for where on the given column.
|
boolean |
isDependent()
Secondary rows cannot be dependent.
|
boolean |
isFlushed() |
boolean |
isValid()
Whether this row has information set on it.
|
protected RowImpl |
newInstance(Column[] cols,
int action)
Return a new row.
|
void |
setArray(Column col,
java.sql.Array val)
Set the value of the given column in this row.
|
void |
setAsciiStream(Column col,
java.io.InputStream val,
int length)
Set the value of the given column in this row.
|
void |
setBigDecimal(Column col,
java.math.BigDecimal val)
Set the value of the given column in this row.
|
void |
setBigInteger(Column col,
java.math.BigInteger val)
Set the value of the given column in this row.
|
void |
setBinaryStream(Column col,
java.io.InputStream val,
int length)
Set the value of the given column in this row.
|
void |
setBlob(Column col,
java.sql.Blob val)
Set the value of the given column in this row.
|
void |
setBoolean(Column col,
boolean val)
Set the value of the given column in this row.
|
void |
setByte(Column col,
byte val)
Set the value of the given column in this row.
|
void |
setBytes(Column col,
byte[] val)
Set the value of the given column in this row.
|
void |
setCalendar(Column col,
java.util.Calendar val)
Set the value of the given column in this row.
|
void |
setChar(Column col,
char val)
Set the value of the given column in this row.
|
void |
setCharacterStream(Column col,
java.io.Reader val,
int length)
Set the value of the given column in this row.
|
void |
setClob(Column col,
java.sql.Clob val)
Set the value of the given column in this row.
|
void |
setDate(Column col,
java.util.Date val)
Set the value of the given column in this row.
|
void |
setDate(Column col,
java.sql.Date val,
java.util.Calendar cal)
Set the value of the given column in this row.
|
void |
setDouble(Column col,
double val)
Set the value of the given column in this row.
|
void |
setFailedObject(java.lang.Object failed)
This implementation does not track failed objects.
|
void |
setFloat(Column col,
float val)
Set the value of the given column in this row.
|
void |
setFlushed(boolean isFlushed) |
void |
setForeignKey(ForeignKey fk,
ColumnIO io,
OpenJPAStateManager sm)
Set the value of the given foreign key to the given object.
|
void |
setForeignKey(ForeignKey fk,
OpenJPAStateManager sm)
Set the value of the given foreign key to the given object.
|
void |
setInt(Column col,
int val)
Set the value of the given column in this row.
|
void |
setLocale(Column col,
java.util.Locale val)
Set the value of the given column in this row.
|
void |
setLong(Column col,
long val)
Set the value of the given column in this row.
|
void |
setNull(Column col)
Set the value of the given column in this row.
|
void |
setNull(Column col,
boolean overrideDefault)
Set the value of the given column in this row.
|
void |
setNumber(Column col,
java.lang.Number val)
Set the value of the given column in this row.
|
void |
setObject(Column col,
java.lang.Object val)
Set the value of the given column in this row.
|
protected void |
setObject(Column col,
java.lang.Object val,
int metaType,
boolean overrideDefault)
All set column methods delegate to this one.
|
void |
setPrimaryKey(ColumnIO io,
OpenJPAStateManager sm)
Set the primary key to represent the given object.
|
void |
setPrimaryKey(OpenJPAStateManager sm)
Set the primary key to represent the given object.
|
void |
setRaw(Column col,
java.lang.String val)
Set a DB understood value for the given column.
|
void |
setRelationId(Column col,
OpenJPAStateManager sm,
RelationId rel)
Set the value of the given column to the identity of given instance,
using the given callback to create the column value.
|
void |
setShort(Column col,
short val)
Set the value of the given column in this row.
|
void |
setString(Column col,
java.lang.String val)
Set the value of the given column in this row.
|
void |
setTime(Column col,
java.sql.Time val,
java.util.Calendar cal)
Set the value of the given column in this row.
|
void |
setTimestamp(Column col,
java.sql.Timestamp val,
java.util.Calendar cal)
Set the value of the given column in this row.
|
void |
setValid(boolean valid)
Whether this row has information set on it.
|
void |
whereArray(Column col,
java.sql.Array val)
Set an equality condition on the value of the given column in this row.
|
void |
whereAsciiStream(Column col,
java.io.InputStream val,
int length)
Set an equality condition on the value of the given column in this row.
|
void |
whereBigDecimal(Column col,
java.math.BigDecimal val)
Set an equality condition on the value of the given column in this row.
|
void |
whereBigInteger(Column col,
java.math.BigInteger val)
Set an equality condition on the value of the given column in this row.
|
void |
whereBinaryStream(Column col,
java.io.InputStream val,
int length)
Set an equality condition on the value of the given column in this row.
|
void |
whereBlob(Column col,
java.sql.Blob val)
Set an equality condition on the value of the given column in this row.
|
void |
whereBoolean(Column col,
boolean val)
Set an equality condition on the value of the given column in this row.
|
void |
whereByte(Column col,
byte val)
Set an equality condition on the value of the given column in this row.
|
void |
whereBytes(Column col,
byte[] val)
Set an equality condition on the value of the given column in this row.
|
void |
whereCalendar(Column col,
java.util.Calendar val)
Set an equality condition on the value of the given column in this row.
|
void |
whereChar(Column col,
char val)
Set an equality condition on the value of the given column in this row.
|
void |
whereCharacterStream(Column col,
java.io.Reader val,
int length)
Set an equality condition on the value of the given column in this row.
|
void |
whereClob(Column col,
java.sql.Clob val)
Set an equality condition on the value of the given column in this row.
|
void |
whereDate(Column col,
java.util.Date val)
Set an equality condition on the value of the given column in this row.
|
void |
whereDate(Column col,
java.sql.Date val,
java.util.Calendar cal)
Set an equality condition on the value of the given column in this row.
|
void |
whereDouble(Column col,
double val)
Set an equality condition on the value of the given column in this row.
|
void |
whereFloat(Column col,
float val)
Set an equality condition on the value of the given column in this row.
|
void |
whereForeignKey(ForeignKey fk,
OpenJPAStateManager sm)
Set the foreign key equality criteria to link to the given object.
|
void |
whereInt(Column col,
int val)
Set an equality condition on the value of the given column in this row.
|
void |
whereLocale(Column col,
java.util.Locale val)
Set an equality condition on the value of the given column in this row.
|
void |
whereLong(Column col,
long val)
Set an equality condition on the value of the given column in this row.
|
void |
whereNull(Column col)
Set an equality condition on the value of the given column in this row.
|
void |
whereNumber(Column col,
java.lang.Number val)
Set an equality condition on the value of the given column in this row.
|
void |
whereObject(Column col,
java.lang.Object val)
Set an equality condition on the value of the given column in this row.
|
protected void |
whereObject(Column col,
java.lang.Object val,
int metaType)
All where column methods delegate to this one.
|
void |
wherePrimaryKey(OpenJPAStateManager sm)
Set the primary key equality criteria for this row.
|
void |
whereRaw(Column col,
java.lang.String val)
Set a DB understood where condition for the given column.
|
void |
whereShort(Column col,
short val)
Set an equality condition on the value of the given column in this row.
|
void |
whereString(Column col,
java.lang.String val)
Set an equality condition on the value of the given column in this row.
|
void |
whereTime(Column col,
java.sql.Time val,
java.util.Calendar cal)
Set an equality condition on the value of the given column in this row.
|
void |
whereTimestamp(Column col,
java.sql.Timestamp val,
java.util.Calendar cal)
Set an equality condition on the value of the given column in this row.
|
public static final java.lang.Object NULL
protected static final int VALID
public static final int RAW
protected byte flags
public RowImpl(Table table, int action)
table - the table the row is a part ofaction - the action on the rowprotected RowImpl(Column[] cols, int action)
public Table getTable()
Rowpublic Column[] getColumns()
public int getAction()
Rowpublic boolean isValid()
Rowpublic void setValid(boolean valid)
Rowpublic OpenJPAStateManager getPrimaryKey()
getPrimaryKey in interface Rowpublic java.lang.Object getFailedObject()
getFailedObject in interface Rowpublic void setFailedObject(java.lang.Object failed)
setFailedObject in interface Rowpublic boolean isDependent()
public java.lang.Object getSet(Column col)
public java.lang.Object getWhere(Column col)
public void setPrimaryKey(OpenJPAStateManager sm) throws java.sql.SQLException
RowsetPrimaryKey in interface Rowjava.sql.SQLExceptionpublic void setPrimaryKey(ColumnIO io, OpenJPAStateManager sm) throws java.sql.SQLException
RowsetPrimaryKey in interface Rowio - information on which columns are settable; may be nulljava.sql.SQLExceptionpublic void wherePrimaryKey(OpenJPAStateManager sm) throws java.sql.SQLException
RowwherePrimaryKey in interface Rowjava.sql.SQLExceptionpublic void setForeignKey(ForeignKey fk, OpenJPAStateManager sm) throws java.sql.SQLException
RowsetForeignKey in interface Rowjava.sql.SQLExceptionpublic void setForeignKey(ForeignKey fk, ColumnIO io, OpenJPAStateManager sm) throws java.sql.SQLException
RowsetForeignKey in interface Rowio - information on which columns are settable; may be nulljava.sql.SQLExceptionpublic void whereForeignKey(ForeignKey fk, OpenJPAStateManager sm) throws java.sql.SQLException
RowwhereForeignKey in interface Rowjava.sql.SQLExceptionpublic void clearForeignKey(ForeignKey fk) throws java.sql.SQLException
java.sql.SQLExceptionprotected boolean canSetAny(ColumnIO io, int i, boolean nullValue)
protected boolean canSet(ColumnIO io, int i, boolean nullValue)
public void setRelationId(Column col, OpenJPAStateManager sm, RelationId rel) throws java.sql.SQLException
RowsetRelationId in interface Rowjava.sql.SQLExceptionpublic void clearRelationId(Column col) throws java.sql.SQLException
java.sql.SQLExceptionpublic void setArray(Column col, java.sql.Array val) throws java.sql.SQLException
Rowpublic void setAsciiStream(Column col, java.io.InputStream val, int length) throws java.sql.SQLException
RowsetAsciiStream in interface Rowjava.sql.SQLExceptionpublic void setBigDecimal(Column col, java.math.BigDecimal val) throws java.sql.SQLException
RowsetBigDecimal in interface Rowjava.sql.SQLExceptionpublic void setBigInteger(Column col, java.math.BigInteger val) throws java.sql.SQLException
RowsetBigInteger in interface Rowjava.sql.SQLExceptionpublic void setBinaryStream(Column col, java.io.InputStream val, int length) throws java.sql.SQLException
RowsetBinaryStream in interface Rowjava.sql.SQLExceptionpublic void setBlob(Column col, java.sql.Blob val) throws java.sql.SQLException
Rowpublic void setBoolean(Column col, boolean val) throws java.sql.SQLException
RowsetBoolean in interface Rowjava.sql.SQLExceptionpublic void setByte(Column col, byte val) throws java.sql.SQLException
Rowpublic void setBytes(Column col, byte[] val) throws java.sql.SQLException
Rowpublic void setCalendar(Column col, java.util.Calendar val) throws java.sql.SQLException
RowsetCalendar in interface Rowjava.sql.SQLExceptionpublic void setChar(Column col, char val) throws java.sql.SQLException
Rowpublic void setCharacterStream(Column col, java.io.Reader val, int length) throws java.sql.SQLException
RowsetCharacterStream in interface Rowjava.sql.SQLExceptionpublic void setClob(Column col, java.sql.Clob val) throws java.sql.SQLException
Rowpublic void setDate(Column col, java.util.Date val) throws java.sql.SQLException
Rowpublic void setDate(Column col, java.sql.Date val, java.util.Calendar cal) throws java.sql.SQLException
Rowpublic void setDouble(Column col, double val) throws java.sql.SQLException
Rowpublic void setFloat(Column col, float val) throws java.sql.SQLException
Rowpublic void setInt(Column col, int val) throws java.sql.SQLException
Rowpublic void setLong(Column col, long val) throws java.sql.SQLException
Rowpublic void setLocale(Column col, java.util.Locale val) throws java.sql.SQLException
Rowpublic void setNull(Column col) throws java.sql.SQLException
Rowpublic void setNull(Column col, boolean overrideDefault) throws java.sql.SQLException
Rowpublic void setNumber(Column col, java.lang.Number val) throws java.sql.SQLException
Rowpublic void setRaw(Column col, java.lang.String val) throws java.sql.SQLException
Rowpublic void setShort(Column col, short val) throws java.sql.SQLException
Rowpublic void setString(Column col, java.lang.String val) throws java.sql.SQLException
Rowpublic void setTime(Column col, java.sql.Time val, java.util.Calendar cal) throws java.sql.SQLException
Rowpublic void setTimestamp(Column col, java.sql.Timestamp val, java.util.Calendar cal) throws java.sql.SQLException
RowsetTimestamp in interface Rowjava.sql.SQLExceptionpublic void setObject(Column col, java.lang.Object val) throws java.sql.SQLException
Rowpublic void whereArray(Column col, java.sql.Array val) throws java.sql.SQLException
RowwhereArray in interface Rowjava.sql.SQLExceptionpublic void whereAsciiStream(Column col, java.io.InputStream val, int length) throws java.sql.SQLException
RowwhereAsciiStream in interface Rowjava.sql.SQLExceptionpublic void whereBigDecimal(Column col, java.math.BigDecimal val) throws java.sql.SQLException
RowwhereBigDecimal in interface Rowjava.sql.SQLExceptionpublic void whereBigInteger(Column col, java.math.BigInteger val) throws java.sql.SQLException
RowwhereBigInteger in interface Rowjava.sql.SQLExceptionpublic void whereBinaryStream(Column col, java.io.InputStream val, int length) throws java.sql.SQLException
RowwhereBinaryStream in interface Rowjava.sql.SQLExceptionpublic void whereBlob(Column col, java.sql.Blob val) throws java.sql.SQLException
Rowpublic void whereBoolean(Column col, boolean val) throws java.sql.SQLException
RowwhereBoolean in interface Rowjava.sql.SQLExceptionpublic void whereByte(Column col, byte val) throws java.sql.SQLException
Rowpublic void whereBytes(Column col, byte[] val) throws java.sql.SQLException
RowwhereBytes in interface Rowjava.sql.SQLExceptionpublic void whereCalendar(Column col, java.util.Calendar val) throws java.sql.SQLException
RowwhereCalendar in interface Rowjava.sql.SQLExceptionpublic void whereChar(Column col, char val) throws java.sql.SQLException
Rowpublic void whereCharacterStream(Column col, java.io.Reader val, int length) throws java.sql.SQLException
RowwhereCharacterStream in interface Rowjava.sql.SQLExceptionpublic void whereClob(Column col, java.sql.Clob val) throws java.sql.SQLException
Rowpublic void whereDate(Column col, java.util.Date val) throws java.sql.SQLException
Rowpublic void whereDate(Column col, java.sql.Date val, java.util.Calendar cal) throws java.sql.SQLException
Rowpublic void whereDouble(Column col, double val) throws java.sql.SQLException
RowwhereDouble in interface Rowjava.sql.SQLExceptionpublic void whereFloat(Column col, float val) throws java.sql.SQLException
RowwhereFloat in interface Rowjava.sql.SQLExceptionpublic void whereInt(Column col, int val) throws java.sql.SQLException
Rowpublic void whereLong(Column col, long val) throws java.sql.SQLException
Rowpublic void whereLocale(Column col, java.util.Locale val) throws java.sql.SQLException
RowwhereLocale in interface Rowjava.sql.SQLExceptionpublic void whereNull(Column col) throws java.sql.SQLException
Rowpublic void whereNumber(Column col, java.lang.Number val) throws java.sql.SQLException
RowwhereNumber in interface Rowjava.sql.SQLExceptionpublic void whereRaw(Column col, java.lang.String val) throws java.sql.SQLException
Rowpublic void whereShort(Column col, short val) throws java.sql.SQLException
RowwhereShort in interface Rowjava.sql.SQLExceptionpublic void whereString(Column col, java.lang.String val) throws java.sql.SQLException
RowwhereString in interface Rowjava.sql.SQLExceptionpublic void whereTime(Column col, java.sql.Time val, java.util.Calendar cal) throws java.sql.SQLException
Rowpublic void whereTimestamp(Column col, java.sql.Timestamp val, java.util.Calendar cal) throws java.sql.SQLException
RowwhereTimestamp in interface Rowjava.sql.SQLExceptionpublic void whereObject(Column col, java.lang.Object val) throws java.sql.SQLException
RowwhereObject in interface Rowcol - the column being setval - the value for the columnjava.sql.SQLExceptionprotected void setObject(Column col, java.lang.Object val, int metaType, boolean overrideDefault) throws java.sql.SQLException
java.sql.SQLExceptionprotected void whereObject(Column col, java.lang.Object val, int metaType) throws java.sql.SQLException
java.sql.SQLExceptionpublic java.lang.String getSQL(DBDictionary dict)
protected java.lang.String generateSQL(DBDictionary dict)
public int getParameterCount()
public void flush(java.sql.PreparedStatement stmnt,
DBDictionary dict,
JDBCStore store)
throws java.sql.SQLException
java.sql.SQLExceptionpublic void flush(java.sql.PreparedStatement stmnt,
int idx,
DBDictionary dict,
JDBCStore store)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.lang.Object clone()
clone in class java.lang.Objectpublic void copyInto(RowImpl row, boolean whereOnly)
whereOnly - if true, only copy where conditionspublic java.lang.Object[] getVals()
public int[] getTypes()
public boolean isFlushed()
public void setFlushed(boolean isFlushed)
Copyright © 2006-2013 Apache Software Foundation. All Rights Reserved.