Examples of HsqlProperties


Examples of org.hsqldb.persist.HsqlProperties

                dbAlias[i] = null;

                continue;
            }

            HsqlProperties dbURL = DatabaseURL.parseURL(path, false);

            if (dbURL == null) {
                dbAlias[i] = null;

                continue;
            }

            dbPath[i= dbURL.getProperty("database");
            dbType[i= dbURL.getProperty("connection_type");
            dbProps[i] = dbURL;
        }
    }
View Full Code Here

Examples of org.hsqldb.persist.HsqlProperties

                return;
            }
        }

        HsqlProperties props = HsqlProperties.argArrayToProps(arg, "server");

        webserver  = props.isPropertyTrue("server.webserver", false);
        defaulturl = webserver ? "jdbc:hsqldb:http://localhost"
                               : "jdbc:hsqldb:hsql://localhost";

        int defaultport = webserver ? 80
                                    : 9001;

        port        = props.getIntegerProperty("server.port", defaultport);
        url = props.getProperty("server.url", defaulturl + ":" + port);
        user        = props.getProperty("server.user", "sa");
        password    = props.getProperty("server.password", "");
        shutdownarg = props.getProperty("server.shutdownarg", "");

        try {
            Class.forName(driver);       // Load the driver

            Connection connection = DriverManager.getConnection(url, user,
View Full Code Here

Examples of org.hsqldb.persist.HsqlProperties

        if (!dbStr.equals(".") && "true".equalsIgnoreCase(useWebInfStr)) {
            dbStr = getServletContext().getRealPath("/") + "WEB-INF" + dbStr;
        }

// end WEB-INF patch
        HsqlProperties dbURL = DatabaseURL.parseURL(dbStr, false);

        log("Database filename = " + dbStr);

        if (dbURL == null) {
            errorStr = "Bad Database name";
        } else {
            dbPath = dbURL.getProperty("database");
            dbType = dbURL.getProperty("connection_type");

            try {

// loosecannon1@users 1.7.2 patch properties on the JDBC URL
                DatabaseManager.getDatabase(dbType, dbPath, dbURL);
View Full Code Here

Examples of org.hsqldb.persist.HsqlProperties

        Iterator       tables;
        Table          table;
        DITableInfo    ti;
        int[]          cols;
        Object[]       row;
        HsqlProperties p;

        // Column number mappings
        final int iscope          = 0;
        final int icolumn_name    = 1;
        final int idata_type      = 2;
        final int itype_name      = 3;
        final int icolumn_size    = 4;
        final int ibuffer_length  = 5;
        final int idecimal_digits = 6;
        final int ipseudo_column  = 7;
        final int itable_cat      = 8;
        final int itable_schem    = 9;
        final int itable_name     = 10;
        final int inullable       = 11;
        final int iinKey          = 12;

        // Initialization
        ti     = new DITableInfo();
        p      = database.getProperties();
        tables = p.isPropertyTrue("hsqldb.system_table_bri") ? allTables()
                                                             : database
                                                             .schemaManager
                                                                 .allTablesIterator();

        // Do it.
View Full Code Here

Examples of org.hsqldb.persist.HsqlProperties

        int[]          cols;
        int            col;
        int            colCount;
        Object[]       row;
        DITableInfo    ti;
        HsqlProperties p;

        // column number mappings
        final int itable_cat        = 0;
        final int itable_schem      = 1;
        final int itable_name       = 2;
        final int inon_unique       = 3;
        final int iindex_qualifier  = 4;
        final int iindex_name       = 5;
        final int itype             = 6;
        final int iordinal_position = 7;
        final int icolumn_name      = 8;
        final int iasc_or_desc      = 9;
        final int icardinality      = 10;
        final int ipages            = 11;
        final int ifilter_condition = 12;
        final int irow_cardinality  = 13;

        // Initialization
        ti = new DITableInfo();
        p  = database.getProperties();
        tables = p.isPropertyTrue("hsqldb.system_table_indexinfo")
                 ? allTables()
                 : database.schemaManager.allTablesIterator();

        // Do it.
        while (tables.hasNext()) {
View Full Code Here

Examples of org.hsqldb.persist.HsqlProperties

        Table          table;
        Object[]       row;
        Constraint     constraint;
        int[]          cols;
        int            colCount;
        HsqlProperties p;

        // column number mappings
        final int itable_cat   = 0;
        final int itable_schem = 1;
        final int itable_name  = 2;
        final int icolumn_name = 3;
        final int ikey_seq     = 4;
        final int ipk_name     = 5;

        // Initialization
        p = database.getProperties();
        tables = p.isPropertyTrue("hsqldb.system_table_primarykeys")
                 ? allTables()
                 : database.schemaManager.allTablesIterator();

        while (tables.hasNext()) {
            table = (Table) tables.next();
View Full Code Here

Examples of org.hsqldb.persist.HsqlProperties

    private HsqlServerFactory() {}

    public static HsqlSocketRequestHandler createHsqlServer(String dbFilePath,
            boolean debugMessages, boolean silentMode) throws SQLException {

        HsqlProperties props = new HsqlProperties();

        props.setProperty("server.database.0", dbFilePath);
        props.setProperty("server.trace", debugMessages);
        props.setProperty("server.silent", silentMode);

        Server server = new Server();

        try {
            server.setProperties(props);
View Full Code Here

Examples of org.hsqldb.persist.HsqlProperties

        if (StringUtil.isEmpty(path)) {
            return null;
        }

        HsqlProperties p = new HsqlProperties(path);

        try {
            p.load();
        } catch (Exception e) {}

        return p;
    }
View Full Code Here

Examples of org.hsqldb.persist.HsqlProperties

     *
     * @return a new default properties object
     */
    public static HsqlProperties newDefaultProperties(int protocol) {

        HsqlProperties p = new HsqlProperties();

        p.setProperty(SC_KEY_AUTORESTART_SERVER,
                      SC_DEFAULT_SERVER_AUTORESTART);
        p.setProperty(SC_KEY_ADDRESS, SC_DEFAULT_ADDRESS);
        p.setProperty(SC_KEY_NO_SYSTEM_EXIT, SC_DEFAULT_NO_SYSTEM_EXIT);

        boolean isTls = SC_DEFAULT_TLS;

        try {
            isTls = System.getProperty("javax.net.ssl.keyStore") != null;
        } catch (Exception e) {}

        p.setProperty(SC_KEY_PORT, getDefaultPort(protocol, isTls));
        p.setProperty(SC_KEY_SILENT, SC_DEFAULT_SILENT);
        p.setProperty(SC_KEY_TLS, isTls);
        p.setProperty(SC_KEY_TRACE, SC_DEFAULT_TRACE);
        p.setProperty(SC_KEY_WEB_DEFAULT_PAGE, SC_DEFAULT_WEB_PAGE);
        p.setProperty(SC_KEY_WEB_ROOT, SC_DEFAULT_WEB_ROOT);

        return p;
    }
View Full Code Here

Examples of org.hsqldb.persist.HsqlProperties

        for (int i = 0; i < names.length; i++)
        {
            getLogger().debug(names[i] + " --> " + cfg.getAttribute(names[i]));
        }

        this.serverProperties = new HsqlProperties();
        this.serverProperties.setProperty("server.database.0", cfg.getAttribute("database"));
        this.serverProperties.setProperty("server.dbname.0", cfg.getAttribute("dbname"));
        this.serverProperties.setProperty("server.trace", cfg.getAttributeAsBoolean("trace", false));
        this.serverProperties.setProperty("server.silent", cfg.getAttributeAsBoolean("silent", true));
        this.serverProperties.setProperty("server.port", cfg.getAttribute("port"));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.