Package org.hsqldb

Examples of org.hsqldb.TableBase


        this.session = session;
    }

    public void setStore(Object key, PersistentStore store) {

        TableBase table = (TableBase) key;

        switch (table.persistenceScope) {

            case TableBase.SCOPE_STATEMENT :
                if (store == null) {
                    rowStoreMapStatement.remove(table.getPersistenceId());
                } else {
                    rowStoreMapStatement.put(table.getPersistenceId(), store);
                }
                break;

            // SYSTEM_TABLE
            case TableBase.SCOPE_FULL :
            case TableBase.SCOPE_TRANSACTION :
                if (store == null) {
                    rowStoreMapTransaction.remove(table.getPersistenceId());
                } else {
                    rowStoreMapTransaction.put(table.getPersistenceId(),
                                               store);
                }
                break;

            case TableBase.SCOPE_SESSION :
                if (store == null) {
                    rowStoreMapSession.remove(table.getPersistenceId());
                } else {
                    rowStoreMapSession.put(table.getPersistenceId(), store);
                }
                break;

            default :
                throw Error.runtimeError(ErrorCode.U_S0500,
View Full Code Here


    }

    public PersistentStore getStore(Object key) {

        try {
            TableBase       table = (TableBase) key;
            PersistentStore store;

            switch (table.persistenceScope) {

                case TableBase.SCOPE_STATEMENT :
                    store = (PersistentStore) rowStoreMapStatement.get(
                        table.getPersistenceId());

                    if (store == null) {
                        store = session.database.logger.newStore(session,
                                this, table, true);
                    }

                    return store;

                // SYSTEM_TABLE
                case TableBase.SCOPE_FULL :
                case TableBase.SCOPE_TRANSACTION :
                    store = (PersistentStore) rowStoreMapTransaction.get(
                        table.getPersistenceId());

                    if (store == null) {
                        store = session.database.logger.newStore(session,
                                this, table, true);
                    }

                    return store;

                case TableBase.SCOPE_SESSION :
                    store = (PersistentStore) rowStoreMapSession.get(
                        table.getPersistenceId());

                    if (store == null) {
                        store = session.database.logger.newStore(session,
                                this, table, true);
                    }
View Full Code Here

        this.session = session;
    }

    synchronized public void setStore(Object key, PersistentStore store) {

        TableBase table = (TableBase) key;

        switch (table.persistenceScope) {

            case TableBase.SCOPE_ROUTINE :
                if (store == null) {
                    rowStoreMapRoutine.remove(table.getPersistenceId());
                } else {
                    rowStoreMapRoutine.put(table.getPersistenceId(), store);
                }
                break;

            case TableBase.SCOPE_STATEMENT :
                if (store == null) {
                    rowStoreMapStatement.remove(table.getPersistenceId());
                } else {
                    rowStoreMapStatement.put(table.getPersistenceId(), store);
                }
                break;

            // TEMP TABLE default, SYSTEM_TABLE + INFO_SCHEMA_TABLE
            case TableBase.SCOPE_FULL :
            case TableBase.SCOPE_TRANSACTION :
                if (store == null) {
                    rowStoreMapTransaction.remove(table.getPersistenceId());
                } else {
                    rowStoreMapTransaction.put(table.getPersistenceId(),
                                               store);
                }
                break;

            case TableBase.SCOPE_SESSION :
                if (store == null) {
                    rowStoreMapSession.remove(table.getPersistenceId());
                } else {
                    rowStoreMapSession.put(table.getPersistenceId(), store);
                }
                break;

            default :
                throw Error.runtimeError(ErrorCode.U_S0500,
View Full Code Here

        return (PersistentStore) rowStoreMapStatement.get(persistenceId);
    }

    synchronized public PersistentStore getStore(Object key) {

        TableBase       table = (TableBase) key;
        PersistentStore store;

        switch (table.persistenceScope) {

            case TableBase.SCOPE_ROUTINE :
                store = (PersistentStore) rowStoreMapRoutine.get(
                    table.getPersistenceId());

                if (store == null) {
                    store = session.database.logger.newStore(session, this,
                            table);
                }

                return store;

            case TableBase.SCOPE_STATEMENT :
                store = (PersistentStore) rowStoreMapStatement.get(
                    table.getPersistenceId());

                if (store == null) {
                    store = session.database.logger.newStore(session, this,
                            table);
                }

                return store;

            // TEMP TABLE default, SYSTEM_TABLE + INFO_SCHEMA_TABLE
            case TableBase.SCOPE_FULL :
            case TableBase.SCOPE_TRANSACTION :
                store = (PersistentStore) rowStoreMapTransaction.get(
                    table.getPersistenceId());

                if (store == null) {
                    store = session.database.logger.newStore(session, this,
                            table);
                }

                if (table.getTableType() == TableBase.INFO_SCHEMA_TABLE) {
                    session.database.dbInfo.setStore(session, (Table) table,
                                                     store);
                }

                return store;

            case TableBase.SCOPE_SESSION :
                store = (PersistentStore) rowStoreMapSession.get(
                    table.getPersistenceId());

                if (store == null) {
                    store = session.database.logger.newStore(session, this,
                            table);
                }
View Full Code Here

            if (store == null) {
                continue;
            }

            TableBase table = store.getTable();

            if (table.getTableType() == TableBase.CACHED_TABLE) {
                TableSpaceManager tableSpace =
                    dataCache.spaceManager.getTableSpace(table.getSpaceID());

                store.setSpaceManager(tableSpace);
            }
        }
    }
View Full Code Here

        this.session = session;
    }

    public void setStore(Object key, PersistentStore store) {

        TableBase table = (TableBase) key;

        switch (table.persistenceScope) {

            case TableBase.SCOPE_STATEMENT :
                if (store == null) {
                    rowStoreMapStatement.remove(table.getPersistenceId());
                } else {
                    rowStoreMapStatement.put(table.getPersistenceId(), store);
                }
                break;

            // SYSTEM_TABLE + INFO_SCHEMA_TABLE
            case TableBase.SCOPE_FULL :
            case TableBase.SCOPE_TRANSACTION :
                if (store == null) {
                    rowStoreMapTransaction.remove(table.getPersistenceId());
                } else {
                    rowStoreMapTransaction.put(table.getPersistenceId(),
                                               store);
                }
                break;

            case TableBase.SCOPE_SESSION :
                if (store == null) {
                    rowStoreMapSession.remove(table.getPersistenceId());
                } else {
                    rowStoreMapSession.put(table.getPersistenceId(), store);
                }
                break;

            default :
                throw Error.runtimeError(ErrorCode.U_S0500,
View Full Code Here

    }

    public PersistentStore getStore(Object key) {

        try {
            TableBase       table = (TableBase) key;
            PersistentStore store;

            switch (table.persistenceScope) {

                case TableBase.SCOPE_STATEMENT :
                    store = (PersistentStore) rowStoreMapStatement.get(
                        table.getPersistenceId());

                    if (store == null) {
                        store = session.database.logger.newStore(session,
                                this, table);
                    }

                    return store;

                // SYSTEM_TABLE + INFO_SCHEMA_TABLE
                case TableBase.SCOPE_FULL :
                case TableBase.SCOPE_TRANSACTION :
                    store = (PersistentStore) rowStoreMapTransaction.get(
                        table.getPersistenceId());

                    if (store == null) {
                        store = session.database.logger.newStore(session,
                                this, table);
                    }

                    if (table.getTableType() == TableBase.INFO_SCHEMA_TABLE) {
                        session.database.dbInfo.setStore(session,
                                                         (Table) table, store);
                    }

                    return store;

                case TableBase.SCOPE_SESSION :
                    store = (PersistentStore) rowStoreMapSession.get(
                        table.getPersistenceId());

                    if (store == null) {
                        store = session.database.logger.newStore(session,
                                this, table);
                    }
View Full Code Here

        this.session = session;
    }

    public void setStore(Object key, PersistentStore store) {

        TableBase table = (TableBase) key;

        switch (table.persistenceScope) {

            case TableBase.SCOPE_STATEMENT :
                if (store == null) {
                    rowStoreMapStatement.remove(table.getPersistenceId());
                } else {
                    rowStoreMapStatement.put(table.getPersistenceId(), store);
                }
                break;

            // SYSTEM_TABLE + INFO_SCHEMA_TABLE
            case TableBase.SCOPE_FULL :
            case TableBase.SCOPE_TRANSACTION :
                if (store == null) {
                    rowStoreMapTransaction.remove(table.getPersistenceId());
                } else {
                    rowStoreMapTransaction.put(table.getPersistenceId(),
                                               store);
                }
                break;

            case TableBase.SCOPE_SESSION :
                if (store == null) {
                    rowStoreMapSession.remove(table.getPersistenceId());
                } else {
                    rowStoreMapSession.put(table.getPersistenceId(), store);
                }
                break;

            default :
                throw Error.runtimeError(ErrorCode.U_S0500,
View Full Code Here

    }

    public PersistentStore getStore(Object key) {

        try {
            TableBase       table = (TableBase) key;
            PersistentStore store;

            switch (table.persistenceScope) {

                case TableBase.SCOPE_STATEMENT :
                    store = (PersistentStore) rowStoreMapStatement.get(
                        table.getPersistenceId());

                    if (store == null) {
                        store = session.database.logger.newStore(session,
                                this, table);
                    }

                    return store;

                // SYSTEM_TABLE + INFO_SCHEMA_TABLE
                case TableBase.SCOPE_FULL :
                case TableBase.SCOPE_TRANSACTION :
                    store = (PersistentStore) rowStoreMapTransaction.get(
                        table.getPersistenceId());

                    if (store == null) {
                        store = session.database.logger.newStore(session,
                                this, table);
                    }

                    if (table.getTableType() == TableBase.INFO_SCHEMA_TABLE) {
                        session.database.dbInfo.setStore(session,
                                                         (Table) table, store);
                    }

                    return store;

                case TableBase.SCOPE_SESSION :
                    store = (PersistentStore) rowStoreMapSession.get(
                        table.getPersistenceId());

                    if (store == null) {
                        store = session.database.logger.newStore(session,
                                this, table);
                    }
View Full Code Here

        this.session = session;
    }

    public void setStore(Object key, PersistentStore store) {

        TableBase table = (TableBase) key;

        switch (table.persistenceScope) {

            case TableBase.SCOPE_STATEMENT :
                if (store == null) {
                    rowStoreMapStatement.remove(table.getPersistenceId());
                } else {
                    rowStoreMapStatement.put(table.getPersistenceId(), store);
                }
                break;

            case TableBase.SCOPE_TRANSACTION :
                if (store == null) {
                    rowStoreMapTransaction.remove(table.getPersistenceId());
                } else {
                    rowStoreMapTransaction.put(table.getPersistenceId(),
                                               store);
                }
                break;

            case TableBase.SCOPE_SESSION :
                if (store == null) {
                    rowStoreMapSession.remove(table.getPersistenceId());
                } else {
                    rowStoreMapSession.put(table.getPersistenceId(), store);
                }
                break;

            default :
                throw Error.runtimeError(ErrorCode.U_S0500,
View Full Code Here

TOP

Related Classes of org.hsqldb.TableBase

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.