Skip navigation links
oracle.jbo.pcoll
Class JDBCPersistManager
java.lang.Object
oracle.jbo.pcoll.JDBCPersistManager
- All Implemented Interfaces:
- PersistManager
- Direct Known Subclasses:
- DB2PersistManager, SQLServerPersistManager
-
public abstract class JDBCPersistManager
- extends java.lang.Object
- implements PersistManager
Method Summary |
protected abstract void |
bindChangeParentDataRow(java.sql.PreparedStatement pStmt, long id, long parid, int collid)
|
protected abstract void |
bindDeleteAllDataRows(java.sql.PreparedStatement stmt, int collid)
|
protected abstract void |
bindDeleteDataRow(java.sql.PreparedStatement stmt, long id, int collid)
|
protected abstract void |
bindDeleteKeyInfo(java.sql.PreparedStatement pStmt, long id, int collid)
|
protected abstract void |
bindDeleteOldChunksDataRow(java.sql.PreparedStatement pStmt, long id, int collid, int begIndx, int endIndx)
|
protected abstract void |
bindInsertDataRow(java.sql.PreparedStatement pStmt, long id, long parid, int collid, int keyContLen, int contentLen, int contentIdx, byte[] chunk, int contentStatus)
|
protected abstract void |
bindInsertKeyInfo(java.sql.PreparedStatement pStmt, long id, int collid, int keyid, int keyhash)
|
protected abstract void |
bindRetrieveDataRow(java.sql.PreparedStatement pStmt, long id, int collid, boolean justLen)
|
protected abstract void |
bindRetrieveIdsWithKey(java.sql.PreparedStatement pStmt, int keyId, java.lang.Object keyVal, int keyHash, int collid)
|
protected abstract void |
bindUpdateDataRow(java.sql.PreparedStatement pStmt, long id, long parid, int collid, int keyContLen, int contentLen, int contentIdx, byte[] chunk, int contentStatus)
|
protected boolean |
canResetSequence()
|
void |
changeParent(long id, long parid, int collid)
|
void |
close()
|
void |
close(int flags)
|
protected static void |
closeResultSet(java.sql.ResultSet rslt)
|
protected static void |
closeStmt(java.sql.Statement stmt)
|
void |
commit()
|
protected abstract int |
contentChunkLength()
|
protected void |
createControlTable()
|
protected void |
createTable()
|
void |
delete(long id, int collid)
|
void |
deleteAll(int collid)
|
protected void |
deleteControlRow(java.lang.String controlTabName, java.lang.String tableName)
|
protected void |
deleteOldChunksDataRow(java.lang.String tabName, long id, int collid, int begIndx, int endIndx)
|
protected void |
dropOutdatedControlTable()
|
protected abstract void |
dropTable(java.lang.String tabName)
|
java.sql.Connection |
getConnection()
|
protected abstract byte[] |
getContentDataRow(java.sql.ResultSet rslt, long[] idRet, long[] parentIdRet, int[] contentLenRet, boolean justLen)
|
protected int |
getContentLenDataRow(java.lang.String tabName, long id, int collid, boolean inclKey)
|
protected abstract java.util.Date |
getCurrentTimeFromDb()
|
abstract int |
getMaxTabNameLength()
|
long |
getTableSignature(java.lang.String tableName)
|
protected boolean |
handleControlRowLockConflict(java.sql.SQLException ex, boolean forCreate, java.lang.String tableName)
|
protected void |
handleControlTableExists(java.sql.SQLException ex)
|
boolean |
holdTableName(java.lang.String tableName, boolean forCreate)
|
void |
init(int flags)
|
void |
insert(long id, long parid, int collid, PCollKeyInfo[] keyArr, byte[] content)
|
void |
insert(long id, long parid, int collid, PCollKeyInfo[] keyArr, byte[] content, int off, int len)
|
boolean |
isPersistent()
|
void |
notifyPCollEvent(int id, java.lang.Object obj, java.lang.Object otherInfo)
|
long |
queryNextCollectionId()
|
long |
queryNextNodeId(int colId)
|
long |
queryNextObjId(int colId)
|
java.lang.Object[] |
retrieve(long id, int collid, boolean keyonly, long[] parentIdRet)
|
long[] |
retrieveIdsWithKey(int keyId, java.lang.Object keyVal, int collid)
|
void |
setCommitThreshhold(int value)
|
void |
setPCollManager(PCollManager mgr)
|
void |
setPersistent(boolean pers)
|
void |
setTableCreated(boolean tableCreated)
|
void |
setTableName(java.lang.String tableName)
|
protected abstract java.lang.String |
sqlAddKeyContColumn(java.lang.String tabName)
|
protected abstract java.lang.String |
sqlChangeParentDataRow(java.lang.String tabName, long id, long parid, int collid)
|
protected abstract java.lang.String |
sqlCreateControlTable(java.lang.String controlTabName)
|
protected abstract java.lang.String |
sqlCreateIndex(java.lang.String tabName)
|
protected abstract java.lang.String |
sqlCreateKeyInfoIdIndex(java.lang.String keyInfoIndexName, java.lang.String keyInfoTabName)
|
protected abstract java.lang.String |
sqlCreateKeyInfoKeyIndex(java.lang.String keyInfoIndexName, java.lang.String keyInfoTabName)
|
protected abstract java.lang.String |
sqlCreateKeyInfoTable(java.lang.String keyInfoTabName)
|
protected java.lang.String |
sqlCreateSequence(java.lang.String seqName)
|
protected abstract java.lang.String |
sqlCreateTable(java.lang.String tabName)
|
protected abstract java.lang.String |
sqlDeleteAllDataRows(java.lang.String tabName, int collid)
|
protected abstract java.lang.String |
sqlDeleteControlRow(java.lang.String controlTabName, java.lang.String tabName)
|
protected abstract java.lang.String |
sqlDeleteDataRow(java.lang.String tabName, long id, int collid)
|
protected abstract java.lang.String |
sqlDeleteKeyInfo(java.lang.String keyInfoTabName, long id)
|
protected abstract java.lang.String |
sqlDeleteOldChunksDataRow(java.lang.String tabName, long id, int collid, int begIndx, int endIndx)
|
protected abstract java.lang.String |
sqlDropKeyInfoTable(java.lang.String keyInfoTabName)
|
protected abstract java.lang.String |
sqlInsertControlRow(java.lang.String controlTabName, java.lang.String tabName)
|
protected abstract java.lang.String |
sqlInsertDataRow(java.lang.String tabName, long id, long parid, int collid)
|
protected abstract java.lang.String |
sqlInsertKeyInfo(java.lang.String keyInfoTabName)
|
protected abstract int |
sqlLockConflictErrorCode()
|
protected abstract java.lang.String |
sqlLockControlRow(java.lang.String controlTabName, java.lang.String tabName)
|
protected abstract long |
sqlNextSequenceVal(java.lang.String seqName)
|
protected abstract java.lang.String |
sqlRetrieveDataRow(java.lang.String tabName, long id, int collid, boolean justLen, boolean keyonly)
|
protected abstract java.lang.String |
sqlRetrieveIdsWithKey(java.lang.String tabName, java.lang.String keyInfoTabName, int keyId, java.lang.Object keyval, int collid)
|
protected abstract int |
sqlTableExistsErrorCode()
|
protected abstract java.lang.String |
sqlUpdateControlRow(java.lang.String controlTabName, java.lang.String tabName, java.lang.String dateColName)
|
protected abstract java.lang.String |
sqlUpdateDataRow(java.lang.String tabName, long id, long parid, int collid)
|
void |
update(long id, long parid, int collid, PCollKeyInfo[] keyArr, byte[] content)
|
void |
update(long id, long parid, int collid, PCollKeyInfo[] keyArr, byte[] content, int off, int len)
|
protected void |
updateControlRow(java.lang.String tableName, java.lang.String dateColName)
|
void |
updateKeyInfo(long id, int collid, PCollKeyInfo[] keyArr)
|
boolean |
waitForTableName(java.lang.String tableName)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CONTSTAT_FIRST_PART
public static final int CONTSTAT_FIRST_PART
-
- See Also:
- Constant Field Values
CONTSTAT_FIRST_AND_SECOND_PART
public static final int CONTSTAT_FIRST_AND_SECOND_PART
-
- See Also:
- Constant Field Values
CONTSTAT_SECOND_PART
public static final int CONTSTAT_SECOND_PART
-
- See Also:
- Constant Field Values
mDebugOn
public static final boolean mDebugOn
-
- See Also:
- Constant Field Values
JDBCPersistManager
public JDBCPersistManager()
getMaxTabNameLength
public abstract int getMaxTabNameLength()
-
- Specified by:
getMaxTabNameLength
in interface PersistManager
sqlCreateControlTable
protected abstract java.lang.String sqlCreateControlTable(java.lang.String controlTabName)
sqlTableExistsErrorCode
protected abstract int sqlTableExistsErrorCode()
dropTable
protected abstract void dropTable(java.lang.String tabName)
sqlAddKeyContColumn
protected abstract java.lang.String sqlAddKeyContColumn(java.lang.String tabName)
sqlDropKeyInfoTable
protected abstract java.lang.String sqlDropKeyInfoTable(java.lang.String keyInfoTabName)
sqlCreateKeyInfoTable
protected abstract java.lang.String sqlCreateKeyInfoTable(java.lang.String keyInfoTabName)
sqlCreateKeyInfoKeyIndex
protected abstract java.lang.String sqlCreateKeyInfoKeyIndex(java.lang.String keyInfoIndexName,
java.lang.String keyInfoTabName)
sqlCreateKeyInfoIdIndex
protected abstract java.lang.String sqlCreateKeyInfoIdIndex(java.lang.String keyInfoIndexName,
java.lang.String keyInfoTabName)
sqlCreateTable
protected abstract java.lang.String sqlCreateTable(java.lang.String tabName)
sqlCreateIndex
protected abstract java.lang.String sqlCreateIndex(java.lang.String tabName)
sqlNextSequenceVal
protected abstract long sqlNextSequenceVal(java.lang.String seqName)
getCurrentTimeFromDb
protected abstract java.util.Date getCurrentTimeFromDb()
sqlDeleteControlRow
protected abstract java.lang.String sqlDeleteControlRow(java.lang.String controlTabName,
java.lang.String tabName)
sqlUpdateControlRow
protected abstract java.lang.String sqlUpdateControlRow(java.lang.String controlTabName,
java.lang.String tabName,
java.lang.String dateColName)
sqlLockControlRow
protected abstract java.lang.String sqlLockControlRow(java.lang.String controlTabName,
java.lang.String tabName)
sqlInsertControlRow
protected abstract java.lang.String sqlInsertControlRow(java.lang.String controlTabName,
java.lang.String tabName)
sqlLockConflictErrorCode
protected abstract int sqlLockConflictErrorCode()
contentChunkLength
protected abstract int contentChunkLength()
sqlDeleteKeyInfo
protected abstract java.lang.String sqlDeleteKeyInfo(java.lang.String keyInfoTabName,
long id)
bindDeleteKeyInfo
protected abstract void bindDeleteKeyInfo(java.sql.PreparedStatement pStmt,
long id,
int collid)
throws java.sql.SQLException
-
- Throws:
java.sql.SQLException
sqlInsertKeyInfo
protected abstract java.lang.String sqlInsertKeyInfo(java.lang.String keyInfoTabName)
bindInsertKeyInfo
protected abstract void bindInsertKeyInfo(java.sql.PreparedStatement pStmt,
long id,
int collid,
int keyid,
int keyhash)
throws java.sql.SQLException
-
- Throws:
java.sql.SQLException
sqlInsertDataRow
protected abstract java.lang.String sqlInsertDataRow(java.lang.String tabName,
long id,
long parid,
int collid)
bindInsertDataRow
protected abstract void bindInsertDataRow(java.sql.PreparedStatement pStmt,
long id,
long parid,
int collid,
int keyContLen,
int contentLen,
int contentIdx,
byte[] chunk,
int contentStatus)
throws java.sql.SQLException
-
- Throws:
java.sql.SQLException
sqlDeleteOldChunksDataRow
protected abstract java.lang.String sqlDeleteOldChunksDataRow(java.lang.String tabName,
long id,
int collid,
int begIndx,
int endIndx)
bindDeleteOldChunksDataRow
protected abstract void bindDeleteOldChunksDataRow(java.sql.PreparedStatement pStmt,
long id,
int collid,
int begIndx,
int endIndx)
throws java.sql.SQLException
-
- Throws:
java.sql.SQLException
sqlUpdateDataRow
protected abstract java.lang.String sqlUpdateDataRow(java.lang.String tabName,
long id,
long parid,
int collid)
bindUpdateDataRow
protected abstract void bindUpdateDataRow(java.sql.PreparedStatement pStmt,
long id,
long parid,
int collid,
int keyContLen,
int contentLen,
int contentIdx,
byte[] chunk,
int contentStatus)
throws java.sql.SQLException
-
- Throws:
java.sql.SQLException
sqlChangeParentDataRow
protected abstract java.lang.String sqlChangeParentDataRow(java.lang.String tabName,
long id,
long parid,
int collid)
bindChangeParentDataRow
protected abstract void bindChangeParentDataRow(java.sql.PreparedStatement pStmt,
long id,
long parid,
int collid)
throws java.sql.SQLException
-
- Throws:
java.sql.SQLException
sqlDeleteDataRow
protected abstract java.lang.String sqlDeleteDataRow(java.lang.String tabName,
long id,
int collid)
bindDeleteDataRow
protected abstract void bindDeleteDataRow(java.sql.PreparedStatement stmt,
long id,
int collid)
throws java.sql.SQLException
-
- Throws:
java.sql.SQLException
sqlDeleteAllDataRows
protected abstract java.lang.String sqlDeleteAllDataRows(java.lang.String tabName,
int collid)
bindDeleteAllDataRows
protected abstract void bindDeleteAllDataRows(java.sql.PreparedStatement stmt,
int collid)
throws java.sql.SQLException
-
- Throws:
java.sql.SQLException
sqlRetrieveDataRow
protected abstract java.lang.String sqlRetrieveDataRow(java.lang.String tabName,
long id,
int collid,
boolean justLen,
boolean keyonly)
bindRetrieveDataRow
protected abstract void bindRetrieveDataRow(java.sql.PreparedStatement pStmt,
long id,
int collid,
boolean justLen)
throws java.sql.SQLException
-
- Throws:
java.sql.SQLException
getContentDataRow
protected abstract byte[] getContentDataRow(java.sql.ResultSet rslt,
long[] idRet,
long[] parentIdRet,
int[] contentLenRet,
boolean justLen)
throws java.sql.SQLException
-
- Throws:
java.sql.SQLException
sqlRetrieveIdsWithKey
protected abstract java.lang.String sqlRetrieveIdsWithKey(java.lang.String tabName,
java.lang.String keyInfoTabName,
int keyId,
java.lang.Object keyval,
int collid)
bindRetrieveIdsWithKey
protected abstract void bindRetrieveIdsWithKey(java.sql.PreparedStatement pStmt,
int keyId,
java.lang.Object keyVal,
int keyHash,
int collid)
throws java.sql.SQLException
-
- Throws:
java.sql.SQLException
close
public void close()
-
- Specified by:
close
in interface PersistManager
close
public void close(int flags)
-
- Specified by:
close
in interface PersistManager
setPCollManager
public void setPCollManager(PCollManager mgr)
-
- Specified by:
setPCollManager
in interface PersistManager
getConnection
public java.sql.Connection getConnection()
setTableName
public void setTableName(java.lang.String tableName)
-
- Specified by:
setTableName
in interface PersistManager
setCommitThreshhold
public void setCommitThreshhold(int value)
-
- Specified by:
setCommitThreshhold
in interface PersistManager
isPersistent
public boolean isPersistent()
setPersistent
public void setPersistent(boolean pers)
-
- Specified by:
setPersistent
in interface PersistManager
setTableCreated
public void setTableCreated(boolean tableCreated)
-
- Specified by:
setTableCreated
in interface PersistManager
closeStmt
protected static void closeStmt(java.sql.Statement stmt)
closeResultSet
protected static void closeResultSet(java.sql.ResultSet rslt)
commit
public void commit()
-
- Specified by:
commit
in interface PersistManager
handleControlTableExists
protected void handleControlTableExists(java.sql.SQLException ex)
dropOutdatedControlTable
protected void dropOutdatedControlTable()
createControlTable
protected void createControlTable()
createTable
protected void createTable()
sqlCreateSequence
protected java.lang.String sqlCreateSequence(java.lang.String seqName)
canResetSequence
protected boolean canResetSequence()
deleteControlRow
protected void deleteControlRow(java.lang.String controlTabName,
java.lang.String tableName)
updateControlRow
protected void updateControlRow(java.lang.String tableName,
java.lang.String dateColName)
handleControlRowLockConflict
protected boolean handleControlRowLockConflict(java.sql.SQLException ex,
boolean forCreate,
java.lang.String tableName)
getTableSignature
public long getTableSignature(java.lang.String tableName)
-
- Specified by:
getTableSignature
in interface PersistManager
init
public void init(int flags)
-
- Specified by:
init
in interface PersistManager
waitForTableName
public boolean waitForTableName(java.lang.String tableName)
-
- Specified by:
waitForTableName
in interface PersistManager
holdTableName
public boolean holdTableName(java.lang.String tableName,
boolean forCreate)
-
- Specified by:
holdTableName
in interface PersistManager
queryNextCollectionId
public long queryNextCollectionId()
-
- Specified by:
queryNextCollectionId
in interface PersistManager
queryNextObjId
public long queryNextObjId(int colId)
-
- Specified by:
queryNextObjId
in interface PersistManager
queryNextNodeId
public long queryNextNodeId(int colId)
-
- Specified by:
queryNextNodeId
in interface PersistManager
updateKeyInfo
public void updateKeyInfo(long id,
int collid,
PCollKeyInfo[] keyArr)
throws java.sql.SQLException
-
- Throws:
java.sql.SQLException
insert
public void insert(long id,
long parid,
int collid,
PCollKeyInfo[] keyArr,
byte[] content)
-
- Specified by:
insert
in interface PersistManager
insert
public void insert(long id,
long parid,
int collid,
PCollKeyInfo[] keyArr,
byte[] content,
int off,
int len)
-
- Specified by:
insert
in interface PersistManager
deleteOldChunksDataRow
protected void deleteOldChunksDataRow(java.lang.String tabName,
long id,
int collid,
int begIndx,
int endIndx)
update
public void update(long id,
long parid,
int collid,
PCollKeyInfo[] keyArr,
byte[] content)
-
- Specified by:
update
in interface PersistManager
update
public void update(long id,
long parid,
int collid,
PCollKeyInfo[] keyArr,
byte[] content,
int off,
int len)
-
- Specified by:
update
in interface PersistManager
changeParent
public void changeParent(long id,
long parid,
int collid)
-
- Specified by:
changeParent
in interface PersistManager
delete
public void delete(long id,
int collid)
-
- Specified by:
delete
in interface PersistManager
deleteAll
public void deleteAll(int collid)
-
- Specified by:
deleteAll
in interface PersistManager
getContentLenDataRow
protected int getContentLenDataRow(java.lang.String tabName,
long id,
int collid,
boolean inclKey)
retrieve
public java.lang.Object[] retrieve(long id,
int collid,
boolean keyonly,
long[] parentIdRet)
-
- Specified by:
retrieve
in interface PersistManager
retrieveIdsWithKey
public long[] retrieveIdsWithKey(int keyId,
java.lang.Object keyVal,
int collid)
-
- Specified by:
retrieveIdsWithKey
in interface PersistManager
notifyPCollEvent
public void notifyPCollEvent(int id,
java.lang.Object obj,
java.lang.Object otherInfo)
-
- Specified by:
notifyPCollEvent
in interface PersistManager
Skip navigation links
Copyright © 1997, 2011, Oracle. All rights reserved.