本文整理匯總了Java中org.hsqldb.persist.DataSpaceManager類的典型用法代碼示例。如果您正苦於以下問題:Java DataSpaceManager類的具體用法?Java DataSpaceManager怎麽用?Java DataSpaceManager使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
DataSpaceManager類屬於org.hsqldb.persist包,在下文中一共展示了DataSpaceManager類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getSQLForTableSpace
import org.hsqldb.persist.DataSpaceManager; //導入依賴的package包/類
public String getSQLForTableSpace() {
if (!isCached() || tableSpace == DataSpaceManager.tableIdDefault) {
return null;
}
StringBuffer sb = new StringBuffer(64);
sb.append(Tokens.T_SET).append(' ').append(Tokens.T_TABLE).append(' ');
sb.append(getName().getSchemaQualifiedStatementName());
sb.append(' ').append(Tokens.T_SPACE).append(' ').append(tableSpace);
return sb.toString();
}
示例2: moveData
import org.hsqldb.persist.DataSpaceManager; //導入依賴的package包/類
void moveData(Table oldTable, Table newTable, int colIndex, int adjust) {
int tableType = oldTable.getTableType();
if (tableType == Table.TEMP_TABLE) {
Session sessions[] = database.sessionManager.getAllSessions();
for (int i = 0; i < sessions.length; i++) {
sessions[i].sessionData.persistentStoreCollection.moveData(
oldTable, newTable, colIndex, adjust);
}
} else {
PersistentStore oldStore =
database.persistentStoreCollection.getStore(oldTable);
boolean newSpaceID = false;
if (newTable.isCached()) {
newSpaceID = oldTable.getSpaceID()
!= DataSpaceManager.tableIdDefault;
if (newSpaceID) {
int tableSpaceID =
database.logger.getCache().spaceManager
.getNewTableSpaceID();
newTable.setSpaceID(tableSpaceID);
}
}
PersistentStore newStore =
database.persistentStoreCollection.getStore(newTable);
try {
newStore.moveData(session, oldStore, colIndex, adjust);
} catch (HsqlException e) {
database.persistentStoreCollection.removeStore(newTable);
throw e;
}
database.persistentStoreCollection.removeStore(oldTable);
}
}
示例3: moveData
import org.hsqldb.persist.DataSpaceManager; //導入依賴的package包/類
void moveData(Table oldTable, Table newTable, int colIndex, int adjust) {
int tableType = oldTable.getTableType();
if (tableType == Table.TEMP_TABLE) {
Session sessions[] = database.sessionManager.getAllSessions();
for (int i = 0; i < sessions.length; i++) {
sessions[i].sessionData.persistentStoreCollection.moveData(
oldTable, newTable, colIndex, adjust);
}
} else {
boolean newSpaceID = false;
if (newTable.isCached()) {
newSpaceID = oldTable.getSpaceID()
!= DataSpaceManager.tableIdDefault;
}
if (newSpaceID) {
int tableSpaceID =
database.logger.getCache().spaceManager
.getNewTableSpaceID();
newTable.setSpaceID(tableSpaceID);
}
PersistentStore oldStore =
database.persistentStoreCollection.getStore(oldTable);
PersistentStore newStore =
database.persistentStoreCollection.getStore(newTable);
try {
newStore.moveData(session, oldStore, colIndex, adjust);
} catch (HsqlException e) {
database.persistentStoreCollection.removeStore(newTable);
throw e;
}
database.persistentStoreCollection.removeStore(oldTable);
}
}