| java.lang.Object com.versant.core.jdbc.JdbcStorageManager
JdbcStorageManager | final public class JdbcStorageManager implements StorageManager(Code) | | StorageManager implementation for JDBC.
|
Inner Class :public class OIDRefGraphIndexComparator implements Comparator | |
Method Summary | |
public SqlExp | addSelectFetchGroup(SelectExp root, FetchGroup group, boolean includeSubclasses, FgDs fgDs, boolean crossJoinFirstPass2Field) Make whatever changes are necessary to root to select group. | public SqlExp | addSelectFetchGroup(SelectExp root, FetchGroup group, boolean includeSubclasses, FgDs fgDs, SelectExp s, JdbcColumn[] lCols, JdbcField fromField) | public void | begin(boolean optimistic) | public Object | cacheTx() Get our cache transaction. | public void | clientConClosed() This is called when a JDBC Connection previously given to a client
is closed. | public void | closeQuery(RunningQuery runningQuery) | public void | commit() | public CompiledQuery | compileQuery(QueryDetails query) | public Connection | con() Get our database connection. | public OID | createOID(ClassMetaData cmd) | public State | createStateImp(ResultSet rs, OID oid, FetchGroup group, boolean forUpdate, int firstCol, MutableInt nextCol, boolean includeSubclasses, StateContainer container, FgDs fgDs, boolean fetchPass2Fields, boolean crossJoinFirstPass2Field, JoinStructure js) Create a state from rs which must contain columns as added by
addSelectFetchGroup. | public void | deletePass2(DeletePacket graph) Delete main table rows. | public void | destroy() | public ExecuteQueryReturn | executeQuery(ApplicationContext context, QueryDetails query, CompiledQuery compiledQuery, Object[] params) | public QueryResultContainer | executeQueryAll(ApplicationContext context, QueryDetails query, CompiledQuery compiledQuery, Object[] params) | public int | executeQueryCount(QueryDetails query, CompiledQuery compiledQuery, Object[] params) | public StatesReturned | fetch(ApplicationContext context, OID oid, State current, FetchGroup fetchGroup, FieldMetaData triggerField) | public StatesReturned | fetch(ApplicationContext context, OIDArray oids, FieldMetaData triggerField) | public QueryResultContainer | fetchNextQueryResult(ApplicationContext context, RunningQuery runningQuery, int skipAmount) | public int | fetchPass2Field(OID oid, State state, FetchGroupField field, boolean forUpdate, StateContainer container, boolean fetchPass2Fields, ColFieldHolder colFHolder) Fetch a pass 2 field (e.g. | public QueryResultContainer | fetchRandomAccessQueryResult(ApplicationContext context, RunningQuery runningQuery, int index, int fetchAmount) | public CharBuf | generateSql(SelectExp root) Generate SQL text for the expression. | public StorageCache | getCache() | public int | getConnectionPolicy() | public HashMap | getDatabaseTableNames(Connection con) Get the names of all tables in the database converted to lower case. | public Object | getDatastoreConnection() | public StorageManager | getInnerStorageManager() | public JdbcConnectionSource | getJdbcConnectionSource() | public JdbcMetaData | getJdbcMetaData() | public ModelMetaData | getJmd() Get the meta data. | public int | getLockingPolicy() | public LogEventStore | getPerfEventStore() | public VersantQueryPlan | getQueryPlan(QueryDetails query, CompiledQuery compiledQuery, Object[] params) | public int | getRandomAccessQueryCount(ApplicationContext context, RunningQuery runningQuery) | public SqlDriver | getSqlDriver() | public State | getState(OID oid, FetchGroup fetchGroup, StateContainer container) Return a state for the supplied oid containing at least the fetch
group specified. | public void | getState(ApplicationContext context, OID oid, FetchGroup fetchGroup, JdbcQueryResult queryResult, StateContainer container) Get a state and any prefeched states from queryResult. | public Map | getStatus() | public RuntimeException | handleException(Throwable e) Wrap an exception appropriately and return one to be thrown. | public RuntimeException | handleException(String msg, Throwable e) Wrap an exception appropriately and return one to be thrown. | public RuntimeException | handleException(String msg, Throwable e, boolean convertLockTimeout, Object failed) Wrap an exception appropriately and return one to be thrown. | public boolean | hasDatastoreConnection() | public boolean | isActive() | public boolean | isFlushed() | public boolean | isForUpdate() | public boolean | isNotifyDirty() | public boolean | isOptimistic() | public boolean | isUseBatchInsert() | public boolean | isUseBatchUpdate() | public void | logEvent(int level, String description, int ms) | public void | notifyDirty(OID oid) | public void | persistPass1(PersistGraph graph) Persist main table fields. | public void | reset() | public void | rollback() | public void | setConnectionPolicy(int policy) | public void | setLockingPolicy(int policy) | public void | setUserObject(Object o) | public int | skipState(int firstCol, FgDs fgds) Skip over states not needed from a select. | public StatesReturned | store(StatesToStore toStore, DeletePacket toDelete, boolean returnFieldsUpdatedBySM, int storeOption, boolean evictClasses) |
STATUS_OPEN_QUERY_RESULT_COUNT | final public static String STATUS_OPEN_QUERY_RESULT_COUNT(Code) | | |
addSelectFetchGroup | public SqlExp addSelectFetchGroup(SelectExp root, FetchGroup group, boolean includeSubclasses, FgDs fgDs, boolean crossJoinFirstPass2Field)(Code) | | Make whatever changes are necessary to root to select group. Root
must be a SelectExp from the table for the class of group. This will
append the fields in the group to select list of root and will
add joins to pick up references where required. It will reuse
existing joins where possible.
If includeSubclasses is true then fields from sub fetch groups will be
included. Outer joins will be done to pickup the fields for subclasses
stored in different tables if they have useSubclassJoin true.
See Also: JdbcStorageManager.getGetStateSql See Also: com.versant.core.jdbc.query.JdbcJDOQLCompiler.compile |
begin | public void begin(boolean optimistic)(Code) | | |
cacheTx | public Object cacheTx()(Code) | | Get our cache transaction. This will begin one if there is none.
|
clientConClosed | public void clientConClosed()(Code) | | This is called when a JDBC Connection previously given to a client
is closed.
|
commit | public void commit()(Code) | | |
con | public Connection con()(Code) | | Get our database connection. This will allocate one if we currently
have none. It will also start a cache transaction if there is none.
|
createStateImp | public State createStateImp(ResultSet rs, OID oid, FetchGroup group, boolean forUpdate, int firstCol, MutableInt nextCol, boolean includeSubclasses, StateContainer container, FgDs fgDs, boolean fetchPass2Fields, boolean crossJoinFirstPass2Field, JoinStructure js) throws SQLException(Code) | | Create a state from rs which must contain columns as added by
addSelectFetchGroup. If there are no main table columns in the group
then rs may be null. If includeSubclasses is true then fields from sub
classes will be also be read. The nextCol parameter is set to the
index of the column after the last column read if it is not null.
The oid parameter will be resolved from the created state.
|
destroy | public void destroy()(Code) | | |
getConnectionPolicy | public int getConnectionPolicy()(Code) | | |
getDatabaseTableNames | public HashMap getDatabaseTableNames(Connection con) throws SQLException(Code) | | Get the names of all tables in the database converted to lower case.
The lower case name is mapped to the real case name.
|
getDatastoreConnection | public Object getDatastoreConnection()(Code) | | |
getLockingPolicy | public int getLockingPolicy()(Code) | | |
getState | public State getState(OID oid, FetchGroup fetchGroup, StateContainer container)(Code) | | Return a state for the supplied oid containing at least the fetch
group specified. Additional states may be supplied to the container.
The must oid must be resolved by this call. The state returned is
added to the container.
|
hasDatastoreConnection | public boolean hasDatastoreConnection()(Code) | | Do we have a JDBC Connection?
|
isActive | public boolean isActive()(Code) | | |
isFlushed | public boolean isFlushed()(Code) | | |
isForUpdate | public boolean isForUpdate()(Code) | | |
isNotifyDirty | public boolean isNotifyDirty()(Code) | | |
isOptimistic | public boolean isOptimistic()(Code) | | |
isUseBatchInsert | public boolean isUseBatchInsert()(Code) | | |
isUseBatchUpdate | public boolean isUseBatchUpdate()(Code) | | |
logEvent | public void logEvent(int level, String description, int ms)(Code) | | |
notifyDirty | public void notifyDirty(OID oid)(Code) | | |
reset | public void reset()(Code) | | |
rollback | public void rollback()(Code) | | |
setConnectionPolicy | public void setConnectionPolicy(int policy)(Code) | | |
setLockingPolicy | public void setLockingPolicy(int policy)(Code) | | |
skipState | public int skipState(int firstCol, FgDs fgds)(Code) | | Skip over states not needed from a select. This follows the same
recursive algorithm as populateStateFromSelect but does not read
anything. It is usefull if some states have to be skipped but
others need to be read from other columns in the ResultSet.
|
|
|