|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.openjpa.jdbc.sql.RowImpl
org.apache.openjpa.jdbc.sql.PrimaryRow
public class PrimaryRow
Primary table row that tracks foreign keys and auto-inc columns.
| Field Summary |
|---|
| Fields inherited from class org.apache.openjpa.jdbc.sql.RowImpl |
|---|
flags, NULL, RAW, VALID |
| Fields inherited from interface org.apache.openjpa.jdbc.sql.Row |
|---|
ACTION_DELETE, ACTION_INSERT, ACTION_UNKNOWN, ACTION_UPDATE |
| Constructor Summary | |
|---|---|
protected |
PrimaryRow(Column[] cols,
int action,
OpenJPAStateManager owner)
|
|
PrimaryRow(Table table,
int action,
OpenJPAStateManager owner)
Constructor; supply table and action. |
| Method Summary | |
|---|---|
(package private) boolean |
allowsUpdate(Column col,
Object old,
Object cur)
Allow the given column value to be updated only if old or current value is a default value or was not set and the column is not a primary key. |
void |
clearForeignKey(ForeignKey fk)
Clear a circular foreign key. |
void |
clearRelationId(Column col)
Clear a circular relation id. |
void |
copyInto(RowImpl row,
boolean whereOnly)
Copy all values from this row into the given one. |
protected String |
generateSQL(DBDictionary dict)
Generate the SQL for this row; the result of this method is cached. |
Object |
getFailedObject()
This implementation does not track failed objects. |
ColumnIO |
getForeignKeyIO(ForeignKey fk)
Return the I/O information for the given set foreign key. |
OpenJPAStateManager |
getForeignKeySet(ForeignKey fk)
Return the value for the given foreign key. |
OpenJPAStateManager |
getForeignKeyWhere(ForeignKey fk)
Return the value for the given foreign key. |
int |
getIndex()
The index of this row in ordered row list. |
OpenJPAStateManager |
getPrimaryKey()
This implementation does not track primary keys. |
RelationId |
getRelationIdCallback(Column col)
Return the recorded callbacks for the given relation id column. |
OpenJPAStateManager |
getRelationIdSet(Column col)
Return the recorded value for the given relation id column. |
(package private) boolean |
isDefaultValue(Object val)
|
boolean |
isDependent()
Mark this row as dependent on some other row. |
protected RowImpl |
newInstance(Column[] cols,
int action)
Return a new row. |
void |
setDependent(boolean dependent)
Mark this row as dependent on some other row. |
void |
setFailedObject(Object failed)
This implementation does not track failed objects. |
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 |
setIndex(int idx)
The index of this row in ordered row list. |
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 |
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 |
whereForeignKey(ForeignKey fk,
OpenJPAStateManager sm)
Set the foreign key equality criteria to link to the given object. |
void |
wherePrimaryKey(OpenJPAStateManager sm)
Set the primary key equality criteria for this row. |
| Methods inherited from class org.apache.openjpa.jdbc.sql.RowImpl |
|---|
canSet, canSetAny, clone, flush, flush, getAction, getColumns, getParameterCount, getSet, getSQL, getTable, getTypes, getVals, getWhere, isFlushed, isValid, setArray, setAsciiStream, setBigDecimal, setBigInteger, setBinaryStream, setBlob, setBoolean, setByte, setBytes, setCalendar, setChar, setCharacterStream, setClob, setDate, setDate, setDouble, setFloat, setFlushed, setInt, setLocale, setLong, setNull, setNull, setNumber, setObject, setRaw, setShort, setString, setTime, setTimestamp, setValid, whereArray, whereAsciiStream, whereBigDecimal, whereBigInteger, whereBinaryStream, whereBlob, whereBoolean, whereByte, whereBytes, whereCalendar, whereChar, whereCharacterStream, whereClob, whereDate, whereDate, whereDouble, whereFloat, whereInt, whereLocale, whereLong, whereNull, whereNumber, whereObject, whereObject, whereRaw, whereShort, whereString, whereTime, whereTimestamp |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PrimaryRow(Table table,
int action,
OpenJPAStateManager owner)
protected PrimaryRow(Column[] cols,
int action,
OpenJPAStateManager owner)
| Method Detail |
|---|
public boolean isDependent()
isDependent in class RowImplpublic void setDependent(boolean dependent)
public int getIndex()
public void setIndex(int idx)
public Object getFailedObject()
RowImpl
getFailedObject in interface RowgetFailedObject in class RowImplpublic void setFailedObject(Object failed)
RowImpl
setFailedObject in interface RowsetFailedObject in class RowImplpublic OpenJPAStateManager getPrimaryKey()
RowImpl
getPrimaryKey in interface RowgetPrimaryKey in class RowImpl
public void setPrimaryKey(OpenJPAStateManager sm)
throws SQLException
Row
setPrimaryKey in interface RowsetPrimaryKey in class RowImplSQLException
public void setPrimaryKey(ColumnIO io,
OpenJPAStateManager sm)
Row
setPrimaryKey in interface RowsetPrimaryKey in class RowImplio - information on which columns are settable; may be null
public void wherePrimaryKey(OpenJPAStateManager sm)
throws SQLException
Row
wherePrimaryKey in interface RowwherePrimaryKey in class RowImplSQLExceptionpublic ColumnIO getForeignKeyIO(ForeignKey fk)
public OpenJPAStateManager getForeignKeySet(ForeignKey fk)
public OpenJPAStateManager getForeignKeyWhere(ForeignKey fk)
public void setForeignKey(ForeignKey fk,
OpenJPAStateManager sm)
throws SQLException
Row
setForeignKey in interface RowsetForeignKey in class RowImplSQLException
public void setForeignKey(ForeignKey fk,
ColumnIO io,
OpenJPAStateManager sm)
throws SQLException
Row
setForeignKey in interface RowsetForeignKey in class RowImplio - information on which columns are settable; may be null
SQLException
public void whereForeignKey(ForeignKey fk,
OpenJPAStateManager sm)
throws SQLException
Row
whereForeignKey in interface RowwhereForeignKey in class RowImplSQLException
public void clearForeignKey(ForeignKey fk)
throws SQLException
RowImpl
clearForeignKey in class RowImplSQLExceptionpublic OpenJPAStateManager getRelationIdSet(Column col)
public RelationId getRelationIdCallback(Column col)
public void setRelationId(Column col,
OpenJPAStateManager sm,
RelationId rel)
throws SQLException
Row
setRelationId in interface RowsetRelationId in class RowImplSQLException
public void clearRelationId(Column col)
throws SQLException
RowImpl
clearRelationId in class RowImplSQLException
protected void setObject(Column col,
Object val,
int metaType,
boolean overrideDefault)
throws SQLException
RowImpl
setObject in class RowImplSQLException
boolean allowsUpdate(Column col,
Object old,
Object cur)
boolean isDefaultValue(Object val)
protected String generateSQL(DBDictionary dict)
RowImpl
generateSQL in class RowImpl
protected RowImpl newInstance(Column[] cols,
int action)
RowImpl
newInstance in class RowImpl
public void copyInto(RowImpl row,
boolean whereOnly)
RowImpl
copyInto in class RowImplwhereOnly - if true, only copy where conditions
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||