當前位置: 首頁>>代碼示例>>Java>>正文


Java DataSpaceManager類代碼示例

本文整理匯總了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();
    }
 
開發者ID:tiweGH,項目名稱:OpenDiabetes,代碼行數:15,代碼來源:Table.java

示例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);
        }
    }
 
開發者ID:tiweGH,項目名稱:OpenDiabetes,代碼行數:44,代碼來源:TableWorks.java

示例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);
        }
    }
 
開發者ID:Julien35,項目名稱:dev-courses,代碼行數:44,代碼來源:TableWorks.java


注:本文中的org.hsqldb.persist.DataSpaceManager類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。