Package org.apache.openjpa.jdbc.sql
Class SecondaryRow
- java.lang.Object
-
- org.apache.openjpa.jdbc.sql.RowImpl
-
- org.apache.openjpa.jdbc.sql.SecondaryRow
-
-
Field Summary
-
Fields inherited from interface org.apache.openjpa.jdbc.sql.Row
ACTION_DELETE, ACTION_INSERT, ACTION_UNKNOWN, ACTION_UPDATE
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSecondaryRow(Column[] cols, int action)SecondaryRow(Table table, int action)Constructor; supply table and action.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcopyInto(RowImpl row, boolean whereOnly)Copy all values from this row into the given one.protected java.lang.StringgenerateSQL(DBDictionary dict)Generate the SQL for this row; the result of this method is cached.protected RowImplnewInstance(Column[] cols, int action)Return a new row.voidsetForeignKey(ForeignKey fk, ColumnIO io, OpenJPAStateManager sm)Set the value of the given foreign key to the given object.voidsetForeignKey(ForeignKey fk, OpenJPAStateManager sm)Set the value of the given foreign key to the given object.voidsetRelationId(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.-
Methods inherited from class org.apache.openjpa.jdbc.sql.RowImpl
canSet, canSetAny, clearForeignKey, clearRelationId, clone, flush, flush, getAction, getColumns, getFailedObject, getParameterCount, getPrimaryKey, getSet, getSQL, getTable, getTypes, getVals, getWhere, isDependent, isFlushed, isValid, setArray, setAsciiStream, setBigDecimal, setBigInteger, setBinaryStream, setBlob, setBoolean, setByte, setBytes, setCalendar, setChar, setCharacterStream, setClob, setDate, setDate, setDouble, setFailedObject, setFloat, setFlushed, setInt, setLocale, setLong, setNull, setNull, setNumber, setObject, setObject, setPrimaryKey, setPrimaryKey, setRaw, setShort, setString, setTime, setTimestamp, setValid, whereArray, whereAsciiStream, whereBigDecimal, whereBigInteger, whereBinaryStream, whereBlob, whereBoolean, whereByte, whereBytes, whereCalendar, whereChar, whereCharacterStream, whereClob, whereDate, whereDate, whereDouble, whereFloat, whereForeignKey, whereInt, whereLocale, whereLong, whereNull, whereNumber, whereObject, whereObject, wherePrimaryKey, whereRaw, whereShort, whereString, whereTime, whereTimestamp
-
-
-
-
Method Detail
-
setForeignKey
public void setForeignKey(ForeignKey fk, OpenJPAStateManager sm) throws java.sql.SQLException
Description copied from interface:RowSet the value of the given foreign key to the given object. If the related type uses table-per-class mappings, the foreign key may be targeted at an independent superclass table.- Specified by:
setForeignKeyin interfaceRow- Overrides:
setForeignKeyin classRowImpl- Throws:
java.sql.SQLException
-
setForeignKey
public void setForeignKey(ForeignKey fk, ColumnIO io, OpenJPAStateManager sm) throws java.sql.SQLException
Description copied from interface:RowSet the value of the given foreign key to the given object. If the related type uses table-per-class mappings, the foreign key may be targeted at an independent superclass table.- Specified by:
setForeignKeyin interfaceRow- Overrides:
setForeignKeyin classRowImplio- information on which columns are settable; may be null- Throws:
java.sql.SQLException
-
setRelationId
public void setRelationId(Column col, OpenJPAStateManager sm, RelationId rel) throws java.sql.SQLException
Description copied from interface:RowSet the value of the given column to the identity of given instance, using the given callback to create the column value. This method is used for mappings that store some serialized form of id values, but must make sure that the related object's id is assigned (which might require an insert if the instance uses auto-increment) before it is serialized.- Specified by:
setRelationIdin interfaceRow- Overrides:
setRelationIdin classRowImpl- Throws:
java.sql.SQLException
-
generateSQL
protected java.lang.String generateSQL(DBDictionary dict)
Description copied from class:RowImplGenerate the SQL for this row; the result of this method is cached.- Overrides:
generateSQLin classRowImpl
-
newInstance
protected RowImpl newInstance(Column[] cols, int action)
Description copied from class:RowImplReturn a new row.- Overrides:
newInstancein classRowImpl
-
-