| java.lang.Object com.versant.core.jdbc.metadata.JdbcField
All known Subclasses: com.versant.core.jdbc.metadata.JdbcCollectionField, com.versant.core.jdbc.metadata.JdbcRefField, com.versant.core.jdbc.metadata.JdbcSimpleField, com.versant.core.jdbc.metadata.JdbcPolyRefField,
JdbcField | abstract public class JdbcField implements Serializable(Code) | | Extra meta data for a field stored in JDBC. There are different subclasses
for different types of fields (e.g. simple, persistent class reference,
mem etc.).
|
Field Summary | |
final public static int | USE_JOIN_INNER Use an inner join to resolve this field. | final public static int | USE_JOIN_NO Do not join to resolve this field. | final public static int | USE_JOIN_OUTER Use an outer join to resolve this field. | public boolean | fake Is this a fake field created to store some extra data (e.g. | public FieldMetaData | fmd Our JDO field. | public boolean | includeForChangedLocking Should this field be included in the where clause when using changed
optimistic locking? This default to false for fields mapped to columns
that have equalityTest false. | public JdbcTable | mainTable Our main table. | public JdbcColumn[] | mainTableCols | public JdbcColumn[] | mainTableColsForUpdate Our main table columns that need to be updated and inserted. | public int | stateFieldNo Our state fieldNo. | public int | useJoin Should a join be done to pick up the fields for referenced classes
when this field is read? This only makes sense for fields that
reference other PC classes in some way. |
Method Summary | |
public void | addConstraints(ArrayList cons) Add all of this fields main table constraints to cons. | public void | addMainTableCols(ArrayList a) Flatten all of this fields main table columns to a. | public void | appendInsertColumnList(CharBuf s) Append part of the insert list for us to s (e.g. | public boolean | appendInsertValueList(CharBuf s, State state) Append part of the insert value list for us to s (e.g. | public boolean | appendUpdate(CharBuf s, State state) Append part of an update statement for us to s (e.g col = ?). | public void | appendWhere(CharBuf s, SqlDriver sqlDriver) Append part of a where clause for us to s (e.g cola = ? and colb = ?). | public void | appendWhereIsNull(CharBuf s, SqlDriver sqlDriver) Append part of a is null where clause for us to s (e.g cola is null
and colb is null). | public ColumnExp | createOwningTableColumnExpList(SelectExp se) Create a list of ColumnExp's for this field or null if it has no
columns stored in any of the tables for its owning class. | public void | deletePass2Block(DeletePacket graph, int blockStart, int blockEnd, CharBuf s, Connection con, boolean batch) Delete a pass 2 field for a block of graph entries all with
the same class. | public void | dump() | public void | dump(PrintStream out, String indent) | public JdbcColumn | findMainTableColumn(String columnName) If there a columnName in our main table columns array then return it
else return null. | public String | getContext() Get context information for this field from its .jdo meta data or
the .jdo meta data of its class. | public SqlDriver | getSqlDriver() Get the current SqlDriver. | public void | getTables(HashSet tables) Add all tables that belong to this field to the set. | public int | getUseKeyJoin() Get the useKeyJoin value for this field. | public void | initMainTableCols() Init the mainTableCols field to all our main table columns. | public void | initMainTableColsForUpdate() Init the mainTableColsForUpdate field to all our main table columns
that are for update. | public boolean | isOracleStyleLOB() | public RuntimeException | mapException(Throwable cause, String message) Map an exception using the current SqlDriver. | public void | nameColumns(String tableName, JdbcNameGenerator nameGen) Make sure all of this fields main table columns have names. | public void | nameLinkTableIndexes(JdbcNameGenerator namegen) | public void | persistPass2Block(PersistGraph graph, int blockStart, int blockEnd, CharBuf s, Connection con, boolean batchInserts, boolean batchUpdates) Persist pass 2 field for a block of graph entries all with
the same class. | public void | prepareFetch(FetchSpec spec, FetchOptions options) Adjust spec so this field will be fetched. | public void | setMainTable(JdbcTable table) Set the table field on all our main table columns. | public int | setQueryParam(PreparedStatement ps, int firstParam, Object value) Set this field on a PreparedStatement. | public ColumnExp | toColumnExp(SelectExp se, boolean joinToSuper) Convert this field into a list of ColumnExp's or null if this is
not possible. | public ColumnExp | toColumnExpForNullLiteralCompare(SelectExp se) Convert this field into a list of ColumnExp's to be compared to
a null literal. | public SqlExp | toContainsKeySqlExp(JdbcJDOQLCompiler comp, SelectExp root, Node args) Convert this field into an containsKey expression. | public SqlExp | toContainsSqlExp(JdbcJDOQLCompiler comp, SelectExp root, Node args) Convert this field into an contains expression. | public SqlExp | toIsEmptySqlExp(JdbcJDOQLCompiler comp, SelectExp root) Convert this field into an isEmpty expression. | public String | toString() | public static String | toUseJoinString(int useJoin) Convert a useJoin field value to a String. |
USE_JOIN_INNER | final public static int USE_JOIN_INNER(Code) | | Use an inner join to resolve this field.
|
USE_JOIN_NO | final public static int USE_JOIN_NO(Code) | | Do not join to resolve this field.
|
USE_JOIN_OUTER | final public static int USE_JOIN_OUTER(Code) | | Use an outer join to resolve this field.
|
fake | public boolean fake(Code) | | Is this a fake field created to store some extra data (e.g. row version
column values).
|
includeForChangedLocking | public boolean includeForChangedLocking(Code) | | Should this field be included in the where clause when using changed
optimistic locking? This default to false for fields mapped to columns
that have equalityTest false.
|
mainTableColsForUpdate | public JdbcColumn[] mainTableColsForUpdate(Code) | | Our main table columns that need to be updated and inserted.
|
stateFieldNo | public int stateFieldNo(Code) | | Our state fieldNo.
|
useJoin | public int useJoin(Code) | | Should a join be done to pick up the fields for referenced classes
when this field is read? This only makes sense for fields that
reference other PC classes in some way.
|
addConstraints | public void addConstraints(ArrayList cons)(Code) | | Add all of this fields main table constraints to cons.
|
addMainTableCols | public void addMainTableCols(ArrayList a)(Code) | | Flatten all of this fields main table columns to a.
|
appendInsertColumnList | public void appendInsertColumnList(CharBuf s)(Code) | | Append part of the insert list for us to s (e.g. cola, colb)).
|
appendInsertValueList | public boolean appendInsertValueList(CharBuf s, State state)(Code) | | Append part of the insert value list for us to s (e.g. ?, ?)). This
must return true if a replacable parameter was not added (e.g.
columns using Oracle LOBs which put in empty_clob() or whatever).
|
appendUpdate | public boolean appendUpdate(CharBuf s, State state)(Code) | | Append part of an update statement for us to s (e.g col = ?). This
must return true if a replacable parameter was not added (e.g.
columns using Oracle LOBs which put in empty_clob() or whatever).
|
appendWhere | public void appendWhere(CharBuf s, SqlDriver sqlDriver)(Code) | | Append part of a where clause for us to s (e.g cola = ? and colb = ?).
This is used for generating the where clause for changed locking.
|
appendWhereIsNull | public void appendWhereIsNull(CharBuf s, SqlDriver sqlDriver)(Code) | | Append part of a is null where clause for us to s (e.g cola is null
and colb is null).
This is used for generating the where clause for changed locking.
|
createOwningTableColumnExpList | public ColumnExp createOwningTableColumnExpList(SelectExp se)(Code) | | Create a list of ColumnExp's for this field or null if it has no
columns stored in any of the tables for its owning class.
|
deletePass2Block | public void deletePass2Block(DeletePacket graph, int blockStart, int blockEnd, CharBuf s, Connection con, boolean batch) throws SQLException(Code) | | Delete a pass 2 field for a block of graph entries all with
the same class. The same ps'es can be used for all entries in the block.
|
findMainTableColumn | public JdbcColumn findMainTableColumn(String columnName)(Code) | | If there a columnName in our main table columns array then return it
else return null.
|
getContext | public String getContext()(Code) | | Get context information for this field from its .jdo meta data or
the .jdo meta data of its class.
|
getSqlDriver | public SqlDriver getSqlDriver()(Code) | | Get the current SqlDriver.
|
getTables | public void getTables(HashSet tables)(Code) | | Add all tables that belong to this field to the set.
|
getUseKeyJoin | public int getUseKeyJoin()(Code) | | Get the useKeyJoin value for this field. This is only valid for maps.
|
initMainTableCols | public void initMainTableCols()(Code) | | Init the mainTableCols field to all our main table columns.
|
initMainTableColsForUpdate | public void initMainTableColsForUpdate()(Code) | | Init the mainTableColsForUpdate field to all our main table columns
that are for update.
|
isOracleStyleLOB | public boolean isOracleStyleLOB()(Code) | | Does this field require the sucky Oracle LOB support on insert/update?
|
nameColumns | public void nameColumns(String tableName, JdbcNameGenerator nameGen)(Code) | | Make sure all of this fields main table columns have names.
|
nameLinkTableIndexes | public void nameLinkTableIndexes(JdbcNameGenerator namegen)(Code) | | Make sure all the indexes on our link tables (if any) have names,
|
persistPass2Block | public void persistPass2Block(PersistGraph graph, int blockStart, int blockEnd, CharBuf s, Connection con, boolean batchInserts, boolean batchUpdates) throws SQLException(Code) | | Persist pass 2 field for a block of graph entries all with
the same class. The same ps'es can be used for all entries in the block.
|
setMainTable | public void setMainTable(JdbcTable table)(Code) | | Set the table field on all our main table columns.
|
setQueryParam | public int setQueryParam(PreparedStatement ps, int firstParam, Object value) throws SQLException(Code) | | Set this field on a PreparedStatement. This is used to set parameters
for queries.
Index of the parameter after the last one we set in ps |
toColumnExp | public ColumnExp toColumnExp(SelectExp se, boolean joinToSuper)(Code) | | Convert this field into a list of ColumnExp's or null if this is
not possible.
|
toColumnExpForNullLiteralCompare | public ColumnExp toColumnExpForNullLiteralCompare(SelectExp se)(Code) | | Convert this field into a list of ColumnExp's to be compared to
a null literal. This should only include non-shared columns i.e.
columns that are updated. If all columns are shared then all should
be included.
|
toUseJoinString | public static String toUseJoinString(int useJoin)(Code) | | Convert a useJoin field value to a String.
|
|
|