|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.openjpa.jdbc.sql.RowImpl
public class RowImpl
Basic Row implementation.
| Field Summary | |
|---|---|
protected byte |
flags
|
static Object |
NULL
|
static int |
RAW
|
protected static int |
VALID
|
| Fields inherited from interface org.apache.openjpa.jdbc.sql.Row |
|---|
ACTION_DELETE, ACTION_INSERT, ACTION_UNKNOWN, ACTION_UPDATE |
| Constructor Summary | |
|---|---|
protected |
RowImpl(Column[] cols,
int action)
|
|
RowImpl(Table table,
int action)
Constructor. |
| Method Summary | |
|---|---|
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. |
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(PreparedStatement stmnt,
DBDictionary dict,
JDBCStore store)
Flush the row's values to the given prepared statement. |
void |
flush(PreparedStatement stmnt,
int idx,
DBDictionary dict,
JDBCStore store)
Flush the row's values to the given prepared statement. |
protected 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()
|
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. |
Object |
getSet(Column col)
Return the value set for update on the given column. |
String |
getSQL(DBDictionary dict)
Return the SQL for the operation on this row. |
Table |
getTable()
Return the table for this row. |
int[] |
getTypes()
|
Object[] |
getVals()
|
Object |
getWhere(Column col)
Return the value set for where on the given column. |
boolean |
isDependent()
Secondary rows cannot be dependent. |
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,
Array val)
Set the value of the given column in this row. |
void |
setAsciiStream(Column col,
InputStream val,
int length)
Set the value of the given column in this row. |
void |
setBigDecimal(Column col,
BigDecimal val)
Set the value of the given column in this row. |
void |
setBigInteger(Column col,
BigInteger val)
Set the value of the given column in this row. |
void |
setBinaryStream(Column col,
InputStream val,
int length)
Set the value of the given column in this row. |
void |
setBlob(Column col,
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,
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,
Reader val,
int length)
Set the value of the given column in this row. |
void |
setClob(Column col,
Clob val)
Set the value of the given column in this row. |
void |
setDate(Column col,
Date val)
Set the value of the given column in this row. |
void |
setDate(Column col,
Date val,
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(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 |
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,
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,
Number val)
Set the value of the given column in this row. |
void |
setObject(Column col,
Object val)
Set the value of the given column in this row. |
protected void |
setObject(Column col,
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,
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,
String val)
Set the value of the given column in this row. |
void |
setTime(Column col,
Time val,
Calendar cal)
Set the value of the given column in this row. |
void |
setTimestamp(Column col,
Timestamp val,
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,
Array val)
Set an equality condition on the value of the given column in this row. |
void |
whereAsciiStream(Column col,
InputStream val,
int length)
Set an equality condition on the value of the given column in this row. |
void |
whereBigDecimal(Column col,
BigDecimal val)
Set an equality condition on the value of the given column in this row. |
void |
whereBigInteger(Column col,
BigInteger val)
Set an equality condition on the value of the given column in this row. |
void |
whereBinaryStream(Column col,
InputStream val,
int length)
Set an equality condition on the value of the given column in this row. |
void |
whereBlob(Column col,
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,
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,
Reader val,
int length)
Set an equality condition on the value of the given column in this row. |
void |
whereClob(Column col,
Clob val)
Set an equality condition on the value of the given column in this row. |
void |
whereDate(Column col,
Date val)
Set an equality condition on the value of the given column in this row. |
void |
whereDate(Column col,
Date val,
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,
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,
Number val)
Set an equality condition on the value of the given column in this row. |
void |
whereObject(Column col,
Object val)
Set an equality condition on the value of the given column in this row. |
protected void |
whereObject(Column col,
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,
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,
String val)
Set an equality condition on the value of the given column in this row. |
void |
whereTime(Column col,
Time val,
Calendar cal)
Set an equality condition on the value of the given column in this row. |
void |
whereTimestamp(Column col,
Timestamp val,
Calendar cal)
Set an equality condition on the value of the given column in this row. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final Object NULL
protected static final int VALID
public static final int RAW
protected byte flags
| Constructor Detail |
|---|
public RowImpl(Table table,
int action)
table - the table the row is a part ofaction - the action on the row
protected RowImpl(Column[] cols,
int action)
| Method Detail |
|---|
public Table getTable()
Row
getTable in interface Rowpublic Column[] getColumns()
public int getAction()
Row
getAction in interface Rowpublic boolean isValid()
Row
isValid in interface Rowpublic void setValid(boolean valid)
Row
setValid in interface Rowpublic OpenJPAStateManager getPrimaryKey()
getPrimaryKey in interface Rowpublic Object getFailedObject()
getFailedObject in interface Rowpublic void setFailedObject(Object failed)
setFailedObject in interface Rowpublic boolean isDependent()
public Object getSet(Column col)
public Object getWhere(Column col)
public void setPrimaryKey(OpenJPAStateManager sm)
throws SQLException
Row
setPrimaryKey in interface RowSQLException
public void setPrimaryKey(ColumnIO io,
OpenJPAStateManager sm)
throws SQLException
Row
setPrimaryKey in interface Rowio - information on which columns are settable; may be null
SQLException
public void wherePrimaryKey(OpenJPAStateManager sm)
throws SQLException
Row
wherePrimaryKey in interface RowSQLException
public void setForeignKey(ForeignKey fk,
OpenJPAStateManager sm)
throws SQLException
Row
setForeignKey in interface RowSQLException
public void setForeignKey(ForeignKey fk,
ColumnIO io,
OpenJPAStateManager sm)
throws SQLException
Row
setForeignKey in interface Rowio - information on which columns are settable; may be null
SQLException
public void whereForeignKey(ForeignKey fk,
OpenJPAStateManager sm)
throws SQLException
Row
whereForeignKey in interface RowSQLException
public void clearForeignKey(ForeignKey fk)
throws SQLException
SQLException
protected 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 SQLException
Row
setRelationId in interface RowSQLException
public void clearRelationId(Column col)
throws SQLException
SQLException
public void setArray(Column col,
Array val)
throws SQLException
Row
setArray in interface RowSQLException
public void setAsciiStream(Column col,
InputStream val,
int length)
throws SQLException
Row
setAsciiStream in interface RowSQLException
public void setBigDecimal(Column col,
BigDecimal val)
throws SQLException
Row
setBigDecimal in interface RowSQLException
public void setBigInteger(Column col,
BigInteger val)
throws SQLException
Row
setBigInteger in interface RowSQLException
public void setBinaryStream(Column col,
InputStream val,
int length)
throws SQLException
Row
setBinaryStream in interface RowSQLException
public void setBlob(Column col,
Blob val)
throws SQLException
Row
setBlob in interface RowSQLException
public void setBoolean(Column col,
boolean val)
throws SQLException
Row
setBoolean in interface RowSQLException
public void setByte(Column col,
byte val)
throws SQLException
Row
setByte in interface RowSQLException
public void setBytes(Column col,
byte[] val)
throws SQLException
Row
setBytes in interface RowSQLException
public void setCalendar(Column col,
Calendar val)
throws SQLException
Row
setCalendar in interface RowSQLException
public void setChar(Column col,
char val)
throws SQLException
Row
setChar in interface RowSQLException
public void setCharacterStream(Column col,
Reader val,
int length)
throws SQLException
Row
setCharacterStream in interface RowSQLException
public void setClob(Column col,
Clob val)
throws SQLException
Row
setClob in interface RowSQLException
public void setDate(Column col,
Date val)
throws SQLException
Row
setDate in interface RowSQLException
public void setDate(Column col,
Date val,
Calendar cal)
throws SQLException
Row
setDate in interface RowSQLException
public void setDouble(Column col,
double val)
throws SQLException
Row
setDouble in interface RowSQLException
public void setFloat(Column col,
float val)
throws SQLException
Row
setFloat in interface RowSQLException
public void setInt(Column col,
int val)
throws SQLException
Row
setInt in interface RowSQLException
public void setLong(Column col,
long val)
throws SQLException
Row
setLong in interface RowSQLException
public void setLocale(Column col,
Locale val)
throws SQLException
Row
setLocale in interface RowSQLException
public void setNull(Column col)
throws SQLException
Row
setNull in interface RowSQLException
public void setNull(Column col,
boolean overrideDefault)
throws SQLException
Row
setNull in interface RowoverrideDefault - whether to set this column to null even if this
is an insert and the column has a default
SQLException
public void setNumber(Column col,
Number val)
throws SQLException
Row
setNumber in interface RowSQLException
public void setRaw(Column col,
String val)
throws SQLException
Row
setRaw in interface RowSQLException
public void setShort(Column col,
short val)
throws SQLException
Row
setShort in interface RowSQLException
public void setString(Column col,
String val)
throws SQLException
Row
setString in interface RowSQLException
public void setTime(Column col,
Time val,
Calendar cal)
throws SQLException
Row
setTime in interface RowSQLException
public void setTimestamp(Column col,
Timestamp val,
Calendar cal)
throws SQLException
Row
setTimestamp in interface RowSQLException
public void setObject(Column col,
Object val)
throws SQLException
Row
setObject in interface Rowcol - the column being setval - the value for the column
SQLException
public void whereArray(Column col,
Array val)
throws SQLException
Row
whereArray in interface RowSQLException
public void whereAsciiStream(Column col,
InputStream val,
int length)
throws SQLException
Row
whereAsciiStream in interface RowSQLException
public void whereBigDecimal(Column col,
BigDecimal val)
throws SQLException
Row
whereBigDecimal in interface RowSQLException
public void whereBigInteger(Column col,
BigInteger val)
throws SQLException
Row
whereBigInteger in interface RowSQLException
public void whereBinaryStream(Column col,
InputStream val,
int length)
throws SQLException
Row
whereBinaryStream in interface RowSQLException
public void whereBlob(Column col,
Blob val)
throws SQLException
Row
whereBlob in interface RowSQLException
public void whereBoolean(Column col,
boolean val)
throws SQLException
Row
whereBoolean in interface RowSQLException
public void whereByte(Column col,
byte val)
throws SQLException
Row
whereByte in interface RowSQLException
public void whereBytes(Column col,
byte[] val)
throws SQLException
Row
whereBytes in interface RowSQLException
public void whereCalendar(Column col,
Calendar val)
throws SQLException
Row
whereCalendar in interface RowSQLException
public void whereChar(Column col,
char val)
throws SQLException
Row
whereChar in interface RowSQLException
public void whereCharacterStream(Column col,
Reader val,
int length)
throws SQLException
Row
whereCharacterStream in interface RowSQLException
public void whereClob(Column col,
Clob val)
throws SQLException
Row
whereClob in interface RowSQLException
public void whereDate(Column col,
Date val)
throws SQLException
Row
whereDate in interface RowSQLException
public void whereDate(Column col,
Date val,
Calendar cal)
throws SQLException
Row
whereDate in interface RowSQLException
public void whereDouble(Column col,
double val)
throws SQLException
Row
whereDouble in interface RowSQLException
public void whereFloat(Column col,
float val)
throws SQLException
Row
whereFloat in interface RowSQLException
public void whereInt(Column col,
int val)
throws SQLException
Row
whereInt in interface RowSQLException
public void whereLong(Column col,
long val)
throws SQLException
Row
whereLong in interface RowSQLException
public void whereLocale(Column col,
Locale val)
throws SQLException
Row
whereLocale in interface RowSQLException
public void whereNull(Column col)
throws SQLException
Row
whereNull in interface RowSQLException
public void whereNumber(Column col,
Number val)
throws SQLException
Row
whereNumber in interface RowSQLException
public void whereRaw(Column col,
String val)
throws SQLException
Row
whereRaw in interface RowSQLException
public void whereShort(Column col,
short val)
throws SQLException
Row
whereShort in interface RowSQLException
public void whereString(Column col,
String val)
throws SQLException
Row
whereString in interface RowSQLException
public void whereTime(Column col,
Time val,
Calendar cal)
throws SQLException
Row
whereTime in interface RowSQLException
public void whereTimestamp(Column col,
Timestamp val,
Calendar cal)
throws SQLException
Row
whereTimestamp in interface RowSQLException
public void whereObject(Column col,
Object val)
throws SQLException
Row
whereObject in interface Rowcol - the column being setval - the value for the column
SQLException
protected void setObject(Column col,
Object val,
int metaType,
boolean overrideDefault)
throws SQLException
SQLException
protected void whereObject(Column col,
Object val,
int metaType)
throws SQLException
SQLExceptionpublic String getSQL(DBDictionary dict)
protected String generateSQL(DBDictionary dict)
public int getParameterCount()
public void flush(PreparedStatement stmnt,
DBDictionary dict,
JDBCStore store)
throws SQLException
SQLException
public void flush(PreparedStatement stmnt,
int idx,
DBDictionary dict,
JDBCStore store)
throws SQLException
SQLExceptionpublic Object clone()
clone in class Object
protected RowImpl newInstance(Column[] cols,
int action)
public void copyInto(RowImpl row,
boolean whereOnly)
whereOnly - if true, only copy where conditionspublic Object[] getVals()
public int[] getTypes()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||