Package org.hsqldb.persist

Examples of org.hsqldb.persist.HsqlDatabaseProperties


        String scope;
        String nameSpace;

        // intermediate holders
        Object[]               row;
        HsqlDatabaseProperties props;

        // First, we want the names and values for
        // all JDBC capabilities constants
        scope     = "SESSION";
        props     = database.getProperties();
        nameSpace = "database.properties";

        // boolean properties
        Iterator it = props.getUserDefinedPropertyData().iterator();

        while (it.hasNext()) {
            Object[] metaData = (Object[]) it.next();

            row         = t.getEmptyRowData();
            row[iscope] = scope;
            row[ins]    = nameSpace;
            row[iname= metaData[HsqlProperties.indexName];
            row[ivalue] = props.getProperty((String) row[iname]);
            row[iclass] = metaData[HsqlProperties.indexClass];

            t.insertSys(store, row);
        }
View Full Code Here


        read();

        String                 property;
        Object                 value;
        HsqlDatabaseProperties props = database.getProperties();

        checkIsSimpleName();
        checkIsDelimitedIdentifier();

        property = token.tokenString;

        boolean isboolean  = props.isBoolean(token.tokenString);
        boolean isintegral = props.isIntegral(token.tokenString);
        boolean isstring   = props.isString(token.tokenString);

        if (!(isboolean || isintegral || isstring)) {
            throw Error.error(ErrorCode.X_42555, property);
        }
View Full Code Here

        token = tokenizer.getSimpleToken();

        switch (Token.get(token)) {

            case Token.PROPERTY : {
                HsqlDatabaseProperties p;

                session.checkAdmin();

                token = tokenizer.getSimpleName();

                if (!tokenizer.wasQuotedIdentifier()) {
                    throw Trace.error(Trace.QUOTED_IDENTIFIER_REQUIRED);
                }

                p = database.getProperties();

                boolean isboolean  = p.isBoolean(token);
                boolean isintegral = p.isIntegral(token);
                boolean isstring   = p.isString(token);

                Trace.check(isboolean || isintegral || isstring,
                            Trace.ACCESS_IS_DENIED, token);

                int    type  = isboolean ? Types.BOOLEAN
                                         : isintegral ? Types.INTEGER
                                                      : Types.VARCHAR;
                Object value = tokenizer.getInType(type);

                if (HsqlDatabaseProperties.hsqldb_cache_file_scale.equals(
                        token)) {
                    if (database.logger.hasCache()
                            || ((Integer) value).intValue() != 8) {
                        Trace.throwerror(Trace.ACCESS_IS_DENIED, token);
                    }
                }

                p.setDatabaseProperty(token, value.toString().toLowerCase());
                p.setDatabaseVariables();

                break;
            }
            case Token.SCHEMA : {
                session.setScripting(false);
View Full Code Here

        boolean isNew;

        setState(DATABASE_OPENING);

        try {
            databaseProperties = new HsqlDatabaseProperties(this);
            isNew = !DatabaseURL.isFileBasedDatabaseType(sType)
                    || !databaseProperties.checkFileExists();

            if (isNew && urlProperties.isPropertyTrue("ifexists")) {
                throw Trace.error(Trace.DATABASE_NOT_EXISTS, sName);
View Full Code Here

        String scope;
        String nameSpace;

        // intermediate holders
        Object[]               row;
        HsqlDatabaseProperties props;

        // column number mappings
        final int iscope = 0;
        final int ins    = 1;
        final int iname  = 2;
        final int ivalue = 3;
        final int iclass = 4;

        // First, we want the names and values for
        // all JDBC capabilities constants
        scope     = "SESSION";
        props     = database.getProperties();
        nameSpace = "database.properties";

        // boolean properties
        Iterator it = props.getUserDefinedPropertyData().iterator();

        while (it.hasNext()) {
            Object[] metaData = (Object[]) it.next();

            row         = t.getEmptyRowData();
            row[iscope] = scope;
            row[ins]    = nameSpace;
            row[iname= metaData[HsqlDatabaseProperties.indexName];
            row[ivalue] = props.getProperty((String) row[iname]);
            row[iclass] = metaData[HsqlDatabaseProperties.indexClass];

            t.insertSys(row);
        }
View Full Code Here

        String scope;
        String nameSpace;

        // intermediate holders
        Object[]               row;
        HsqlDatabaseProperties props;

        // First, we want the names and values for
        // all JDBC capabilities constants
        scope     = "SESSION";
        props     = database.getProperties();
        nameSpace = "database.properties";

        // boolean properties
        Iterator it = props.getUserDefinedPropertyData().iterator();

        while (it.hasNext()) {
            Object[] metaData = (Object[]) it.next();

            row         = t.getEmptyRowData();
            row[iscope] = scope;
            row[ins]    = nameSpace;
            row[iname= metaData[HsqlProperties.indexName];
            row[ivalue] =
                database.logger.getValueStringForProperty((String) row[iname]);

            if (row[ivalue] == null) {
                row[ivalue] = props.getPropertyString((String) row[iname]);
            }

            row[iclass] = metaData[HsqlProperties.indexClass];

            t.insertSys(session, store, row);
View Full Code Here

        read();

        String                 property;
        Object                 value;
        HsqlDatabaseProperties props = database.getProperties();

        checkIsSimpleName();
        checkIsDelimitedIdentifier();

        property = token.tokenString;

        boolean isboolean  = props.isBoolean(token.tokenString);
        boolean isintegral = props.isIntegral(token.tokenString);
        boolean isstring   = props.isString(token.tokenString);

        if (!(isboolean || isintegral || isstring)) {
            throw Error.error(ErrorCode.X_42555, property);
        }
View Full Code Here

        String scope;
        String nameSpace;

        // intermediate holders
        Object[]               row;
        HsqlDatabaseProperties props;

        // First, we want the names and values for
        // all JDBC capabilities constants
        scope     = "SESSION";
        props     = database.getProperties();
        nameSpace = "database.properties";

        // boolean properties
        Iterator it = props.getUserDefinedPropertyData().iterator();

        while (it.hasNext()) {
            Object[] metaData = (Object[]) it.next();

            row         = t.getEmptyRowData();
            row[iscope] = scope;
            row[ins]    = nameSpace;
            row[iname= metaData[HsqlProperties.indexName];
            row[ivalue] =
                database.logger.getValueStringForProperty((String) row[iname]);

            if (row[ivalue] == null) {
                row[ivalue] = props.getPropertyString((String) row[iname]);
            }

            row[iclass] = metaData[HsqlProperties.indexClass];

            t.insertSys(session, store, row);
View Full Code Here

        String scope;
        String nameSpace;

        // intermediate holders
        Object[]               row;
        HsqlDatabaseProperties props;

        // First, we want the names and values for
        // all JDBC capabilities constants
        scope     = "SESSION";
        props     = database.getProperties();
        nameSpace = "database.properties";

        // boolean properties
        Iterator it = props.getUserDefinedPropertyData().iterator();

        while (it.hasNext()) {
            Object[] metaData = (Object[]) it.next();

            row         = t.getEmptyRowData();
            row[iscope] = scope;
            row[ins]    = nameSpace;
            row[iname= metaData[HsqlProperties.indexName];
            row[ivalue] =
                database.logger.getValueStringForProperty((String) row[iname]);

            if (row[ivalue] == null) {
                row[ivalue] = props.getPropertyString((String) row[iname]);
            }

            row[iclass] = metaData[HsqlProperties.indexClass];

            t.insertSys(session, store, row);
View Full Code Here

        String scope;
        String nameSpace;

        // intermediate holders
        Object[]               row;
        HsqlDatabaseProperties props;

        // column number mappings
        final int iscope = 0;
        final int ins    = 1;
        final int iname  = 2;
        final int ivalue = 3;
        final int iclass = 4;

        // First, we want the names and values for
        // all JDBC capabilities constants
        scope     = "SESSION";
        props     = database.getProperties();
        nameSpace = "database.properties";

        // boolean properties
        Iterator it = props.getUserDefinedPropertyData().iterator();

        while (it.hasNext()) {
            Object[] metaData = (Object[]) it.next();

            row         = t.getEmptyRowData();
            row[iscope] = scope;
            row[ins]    = nameSpace;
            row[iname= metaData[HsqlDatabaseProperties.indexName];
            row[ivalue] = props.getProperty((String) row[iname]);
            row[iclass] = metaData[HsqlDatabaseProperties.indexClass];

            t.insertSys(row);
        }
View Full Code Here

TOP

Related Classes of org.hsqldb.persist.HsqlDatabaseProperties

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.