| java.lang.Object com.versant.core.jdbc.metadata.JdbcField com.versant.core.jdbc.metadata.JdbcCollectionField com.versant.core.jdbc.metadata.JdbcLinkCollectionField
All known Subclasses: com.versant.core.jdbc.metadata.JdbcMapField,
JdbcLinkCollectionField | public class JdbcLinkCollectionField extends JdbcCollectionField (Code) | | A field that is a Collection, Map or array stored in a link table.
|
Inner Class :public static class LinkRow | |
Method Summary | |
protected void | addFetchAllRowsKey(SqlExp e, SelectExp se) Hook for JdbcMapField to add its key columns to the row. | protected void | completeKeyAndValueColumnMetaData(JdbcClass jdbcClass, ArrayList cols, JdoElement context, JdoExtension[] linkNested, JdbcMetaDataBuilder mdb, boolean quiet) Complete the key and value column related meta data. | protected List | createConstraints(boolean pkConstraint, String pkConstraintName) Create all the constraints for our link table. | protected void | createLinkTablePK() Set the PK of the link table. | 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(PrintStream out, String indent) | protected void | execLinkTableBatchDeletes(int delCount, PreparedStatement psdel, String psdelSql, PreparedStatement psdelAll, String psdelAllSql) | protected void | execLinkTableBatchInserts(PreparedStatement psins, String psinsSql) | public int | fetch(JdbcStorageManager sm, OID oid, State state, FetchGroupField field, boolean forUpdate, StateContainer container, boolean fetchPass2Fields, ColFieldHolder colFHolder) Fetch the values for this field. | public int | fetchFrom(ResultSet rs, OID oid, State state, FetchGroupField field, boolean forUpdate, StateContainer container, boolean fetchPass2Fields, int colIndex, FetchInfo fetchInfo, JdbcStorageManager sm) Fetch the values for this field. | public int | fetchWithFilter(JdbcStorageManager sm, StateContainer oidStates, FetchGroupField field, ResultSet rs, boolean forUpdate, OID oidToCheckOn, OID[] lastReadStateOID, ClassMetaData cmd, ColFieldHolder colFHolder) Fetch the values for this field using parallel query processing. | public void | fillStateWithEmpty(FetchGroupField field, State state) | protected String | getDeleteAllLinkTableRowsSql(CharBuf s) Get SQL to delete all rows from our link table. | protected void | getDeleteAllLinkTableRowsSqlWithInList(CharBuf s) Get SQL to delete all rows from our link table with a 'IN' List. | protected String | getDeleteLinkTableRowSql(CharBuf s) Get SQL to delete a row from our link table. | public String | getFetchAllRowsSql(JdbcStorageManager sm) Return SQL that will fetch all the rows in the link table.
This is used when bulk copying one database to another. | public String | getInsertLinkTableRowSql(CharBuf s) Get SQL to insert a row into our link table. | protected SelectExp | getSelectExp(JdbcStorageManager sm, FetchGroupField field, FgDs[] fgDses) Get a SelectExp to select all the rows in this collection using the
supplied fetch group field to control joins and so on. | public SelectExp | getSelectExpFrom(JdbcStorageManager sm, SelectExp joinToExp, FetchGroupField field, FgDs owningFgDs) | public SelectExp | getSelectExpFromImp(SelectExp joinToExp, FetchGroupField field, JdbcStorageManager sm, FgDs owningFgDs) | public SelectExp | getSelectFilterExp(JdbcStorageManager sm, FetchGroupField field, ColFieldHolder colFHolder) Get a SelectExp to select all the rows in this collection using the
supplied fetch group field to control joins and so on. | public SelectExp | getSelectFilterJoinExp(boolean value, SelectExp lhSe, SelectExp rootSe, boolean addRootJoin) | public void | getTables(HashSet tables) Add all tables that belong to this field to the set. | protected void | nameKeyAndValueColumns(JdbcNameGenerator namegen, String linkTableNameForNamegen) Name the key and value columns. | protected void | nameLinkTable(JdbcNameGenerator namegen, JdbcClass jdbcClass) Name our linkTable. | 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 | processMetaData(JdoElement context, JdbcMetaDataBuilder mdb, boolean quiet) Complete the meta data for this collection. | public int | readRow(ResultSet rs, LinkRow row) Fetch a row of values for this field. | public SqlExp | toContainsSqlExp(JdbcJDOQLCompiler comp, SelectExp root, Node args) Convert this field into a contains expression. | protected SqlExp | toContainsSqlExp(JdbcColumn[] cols, ClassMetaData colsCmd, JdbcJDOQLCompiler comp, SelectExp root, Node args) | public SqlExp | toIsEmptySqlExp(JdbcJDOQLCompiler comp, SelectExp root) Convert this field into an isEmpty expression. | public void | writeRow(PreparedStatement ps, LinkRow row) Set a row of values for this field on a PreparedStatement. |
avgRowCount | protected transient float avgRowCount(Code) | | |
expansionCount | protected transient int expansionCount(Code) | | |
fetchCount | protected transient int fetchCount(Code) | | |
readOnly | public boolean readOnly(Code) | | Is this the read-only half of a many-to-many?
|
valueColumns | public JdbcColumn[] valueColumns(Code) | | The column(s) holding the values. This array will have length 1
unless the values are of a PC class with a composite primary key.
|
valuesAreOIDs | public boolean valuesAreOIDs(Code) | | Are the values OID's?
|
addFetchAllRowsKey | protected void addFetchAllRowsKey(SqlExp e, SelectExp se)(Code) | | Hook for JdbcMapField to add its key columns to the row. The returned
SqlExp must be the last one in the list.
|
createConstraints | protected List createConstraints(boolean pkConstraint, String pkConstraintName)(Code) | | Create all the constraints for our link table.
|
createLinkTablePK | protected void createLinkTablePK()(Code) | | Set the PK of the link table.
|
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.
|
getDeleteAllLinkTableRowsSql | protected String getDeleteAllLinkTableRowsSql(CharBuf s)(Code) | | Get SQL to delete all rows from our link table.
|
getDeleteAllLinkTableRowsSqlWithInList | protected void getDeleteAllLinkTableRowsSqlWithInList(CharBuf s)(Code) | | Get SQL to delete all rows from our link table with a 'IN' List. This is only
supported if there is a single pk column.
|
getDeleteLinkTableRowSql | protected String getDeleteLinkTableRowSql(CharBuf s)(Code) | | Get SQL to delete a row from our link table.
|
getInsertLinkTableRowSql | public String getInsertLinkTableRowSql(CharBuf s)(Code) | | Get SQL to insert a row into our link table.
|
getTables | public void getTables(HashSet tables)(Code) | | Add all tables that belong to this field to the set.
|
nameKeyAndValueColumns | protected void nameKeyAndValueColumns(JdbcNameGenerator namegen, String linkTableNameForNamegen)(Code) | | Name the key and value columns.
|
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.
|
processMetaData | public void processMetaData(JdoElement context, JdbcMetaDataBuilder mdb, boolean quiet)(Code) | | Complete the meta data for this collection. This must use info
already supplied in the .jdo file and add anything else needed.
|
readRow | public int readRow(ResultSet rs, LinkRow row) throws SQLException(Code) | | Fetch a row of values for this field. This is used when bulk copying
one database to another to read all the rows in a given link table.
Return the index of the last column read + 1.
|
writeRow | public void writeRow(PreparedStatement ps, LinkRow row) throws SQLException(Code) | | Set a row of values for this field on a PreparedStatement.
This is used when bulk copying one database to another.
|
Methods inherited from com.versant.core.jdbc.metadata.JdbcCollectionField | protected boolean checkKeyOid(ResultSet rs, int colIndex, FetchInfo fetchInfo, boolean mustBreak, OID oid) throws SQLException(Code)(Java Doc) protected void cleanup(Statement s)(Code)(Java Doc) protected void cleanup(ResultSet rs)(Code)(Java Doc) public void deletePass2Block(DeletePacket graph, int blockStart, int blockEnd, CharBuf s, Connection con, boolean batch) throws SQLException(Code)(Java Doc) public void dump(PrintStream out, String indent)(Code)(Java Doc) abstract public int fetch(JdbcStorageManager sm, OID oid, State state, FetchGroupField field, boolean forUpdate, StateContainer container, boolean fetchPass2Fields, ColFieldHolder colFHolder) throws SQLException(Code)(Java Doc) abstract public int fetchFrom(ResultSet rs, OID oid, State state, FetchGroupField field, boolean forUpdate, StateContainer container, boolean fetchPass2Fields, int colIndex, FetchInfo fetchInfo, JdbcStorageManager sm) throws SQLException(Code)(Java Doc) abstract public int fetchWithFilter(JdbcStorageManager sm, StateContainer oidStates, FetchGroupField field, ResultSet rs, boolean forUpdate, OID oidToCheckOn, OID[] lastReadStateOID, ClassMetaData cmd, ColFieldHolder colFHolder) throws SQLException(Code)(Java Doc) abstract public void fillStateWithEmpty(FetchGroupField field, State state)(Code)(Java Doc) abstract public SelectExp getSelectExpFrom(JdbcStorageManager sm, SelectExp joinToExp, FetchGroupField field, FgDs owningFgDs)(Code)(Java Doc) abstract public SelectExp getSelectFilterExp(JdbcStorageManager sm, FetchGroupField field, ColFieldHolder colFHolder)(Code)(Java Doc) abstract public SelectExp getSelectFilterJoinExp(boolean value, SelectExp lhSe, SelectExp rootSe, boolean addRootJoin)(Code)(Java Doc) public void processMetaData(JdoElement context, JdbcMetaDataBuilder mdb, boolean quiet)(Code)(Java Doc) protected boolean updateForFirstRow(FetchInfo fetchInfo, boolean mustBreak, ResultSet rs, int colIndex, OID oid) throws SQLException(Code)(Java Doc)
|
Methods inherited from com.versant.core.jdbc.metadata.JdbcField | public void addConstraints(ArrayList cons)(Code)(Java Doc) public void addMainTableCols(ArrayList a)(Code)(Java Doc) public void appendInsertColumnList(CharBuf s)(Code)(Java Doc) public boolean appendInsertValueList(CharBuf s, State state)(Code)(Java Doc) public boolean appendUpdate(CharBuf s, State state)(Code)(Java Doc) public void appendWhere(CharBuf s, SqlDriver sqlDriver)(Code)(Java Doc) public void appendWhereIsNull(CharBuf s, SqlDriver sqlDriver)(Code)(Java Doc) public ColumnExp createOwningTableColumnExpList(SelectExp se)(Code)(Java Doc) public void deletePass2Block(DeletePacket graph, int blockStart, int blockEnd, CharBuf s, Connection con, boolean batch) throws SQLException(Code)(Java Doc) public void dump()(Code)(Java Doc) public void dump(PrintStream out, String indent)(Code)(Java Doc) public JdbcColumn findMainTableColumn(String columnName)(Code)(Java Doc) public String getContext()(Code)(Java Doc) public SqlDriver getSqlDriver()(Code)(Java Doc) public void getTables(HashSet tables)(Code)(Java Doc) public int getUseKeyJoin()(Code)(Java Doc) public void initMainTableCols()(Code)(Java Doc) public void initMainTableColsForUpdate()(Code)(Java Doc) public boolean isOracleStyleLOB()(Code)(Java Doc) public RuntimeException mapException(Throwable cause, String message)(Code)(Java Doc) public void nameColumns(String tableName, JdbcNameGenerator nameGen)(Code)(Java Doc) public void nameLinkTableIndexes(JdbcNameGenerator namegen)(Code)(Java Doc) public void persistPass2Block(PersistGraph graph, int blockStart, int blockEnd, CharBuf s, Connection con, boolean batchInserts, boolean batchUpdates) throws SQLException(Code)(Java Doc) public void prepareFetch(FetchSpec spec, FetchOptions options)(Code)(Java Doc) public void setMainTable(JdbcTable table)(Code)(Java Doc) public int setQueryParam(PreparedStatement ps, int firstParam, Object value) throws SQLException(Code)(Java Doc) public ColumnExp toColumnExp(SelectExp se, boolean joinToSuper)(Code)(Java Doc) public ColumnExp toColumnExpForNullLiteralCompare(SelectExp se)(Code)(Java Doc) public SqlExp toContainsKeySqlExp(JdbcJDOQLCompiler comp, SelectExp root, Node args)(Code)(Java Doc) public SqlExp toContainsSqlExp(JdbcJDOQLCompiler comp, SelectExp root, Node args)(Code)(Java Doc) public SqlExp toIsEmptySqlExp(JdbcJDOQLCompiler comp, SelectExp root)(Code)(Java Doc) public String toString()(Code)(Java Doc) public static String toUseJoinString(int useJoin)(Code)(Java Doc)
|
|
|