当前位置: 首页>>代码示例>>Java>>正文


Java HsqlProperties.isPropertyTrue方法代码示例

本文整理汇总了Java中org.hsqldb.persist.HsqlProperties.isPropertyTrue方法的典型用法代码示例。如果您正苦于以下问题:Java HsqlProperties.isPropertyTrue方法的具体用法?Java HsqlProperties.isPropertyTrue怎么用?Java HsqlProperties.isPropertyTrue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.hsqldb.persist.HsqlProperties的用法示例。


在下文中一共展示了HsqlProperties.isPropertyTrue方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: translateDefaultDatabaseProperty

import org.hsqldb.persist.HsqlProperties; //导入方法依赖的package包/类
/**
 * Translates the legacy default database form: database=...
 * to the 1.7.2 form: database.0=...
 *
 * @param p The properties object upon which to perform the translation
 */
public static void translateDefaultDatabaseProperty(HsqlProperties p) {

    if (p == null) {
        return;
    }

    if (!p.isPropertyTrue(SC_KEY_REMOTE_OPEN_DB)) {
        if (p.getProperty(SC_KEY_DATABASE + "." + 0) == null) {
            String defaultdb = p.getProperty(SC_KEY_DATABASE);

            if (defaultdb == null) {
                defaultdb = SC_DEFAULT_DATABASE;
            }

            p.setProperty(SC_KEY_DATABASE + ".0", defaultdb);
            p.setProperty(SC_KEY_DBNAME + ".0", "");
        }

        if (p.getProperty(SC_KEY_DBNAME + "." + 0) == null) {
            p.setProperty(SC_KEY_DBNAME + ".0", "");
        }
    }
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:30,代码来源:ServerConfiguration.java

示例2: translateDefaultDatabaseProperty

import org.hsqldb.persist.HsqlProperties; //导入方法依赖的package包/类
/**
 * Translates the legacy default database form: database=...
 * to the 1.7.2 form: database.0=...
 *
 * @param p The properties object upon which to perform the translation
 */
public static void translateDefaultDatabaseProperty(HsqlProperties p) {

    if (p == null) {
        return;
    }

    if (!p.isPropertyTrue(ServerProperties.sc_key_remote_open_db)) {
        if (p.getProperty(ServerProperties.sc_key_database + "." + 0)
                == null) {
            String defaultdb =
                p.getProperty(ServerProperties.sc_key_database);

            if (defaultdb == null) {
                defaultdb = SC_DEFAULT_DATABASE;
            } else {
                p.removeProperty(ServerProperties.sc_key_database);
            }

            p.setProperty(ServerProperties.sc_key_database + ".0",
                          defaultdb);
            p.setProperty(ServerProperties.sc_key_dbname + ".0", "");
        }

        if (p.getProperty(ServerProperties.sc_key_dbname + "." + 0)
                == null) {
            p.setProperty(ServerProperties.sc_key_dbname + ".0", "");
        }
    }
}
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:36,代码来源:ServerConfiguration.java

示例3: main

import org.hsqldb.persist.HsqlProperties; //导入方法依赖的package包/类
public static void main(String[] argv) {

        TestCacheSize  test  = new TestCacheSize();
        HsqlProperties props = HsqlProperties.argArrayToProps(argv, "test");

        test.bigops   = props.getIntegerProperty("test.bigops", test.bigops);
        test.bigrows  = test.bigops;
        test.smallops = test.bigops / 8;
        test.cacheScale = props.getIntegerProperty("test.scale",
                test.cacheScale);
        test.tableType = props.getProperty("test.tabletype", test.tableType);
        test.nioMode   = props.isPropertyTrue("test.nio", test.nioMode);

        if (props.getProperty("test.dbtype", "").equals("mem")) {
            test.filepath = "mem:test";
            test.filedb   = false;
            test.shutdown = false;
        }

        test.setUp();

        StopWatch sw = new StopWatch();

        test.testFillUp();
        test.checkResults();

        long time = sw.elapsedTime();

        test.storeResult("total test time", 0, (int) time, 0);
        System.out.println("total test time -- " + sw.elapsedTime() + " ms");
        test.tearDown();
    }
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:33,代码来源:TestCacheSize.java

示例4: init

import org.hsqldb.persist.HsqlProperties; //导入方法依赖的package包/类
/**
 *  Initializes this JDBCResultSetMetaData object from the specified
 *  Result and HsqlProperties objects.
 *
 *  @param meta the ResultMetaData object from which to initialize this
 *         JDBCResultSetMetaData object
 *  @param props the HsqlProperties object from which to initialize this
 *         JDBCResultSetMetaData object
 *  @throws SQLException if a database access error occurs
 */
void init(ResultMetaData meta, HsqlProperties props) throws SQLException {

    resultMetaData = meta;
    columnCount    = resultMetaData.getColumnCount();

    // fredt -  props is null for internal connections, so always use the
    //          default behaviour in this case
    // JDBCDriver.getPropertyInfo says
    // default is true
    useColumnName = (props == null) ? true
                                    : props.isPropertyTrue(
                                    "get_column_name", true);
}
 
开发者ID:s-store,项目名称:sstore-soft,代码行数:24,代码来源:JDBCResultSetMetaData.java

示例5: main

import org.hsqldb.persist.HsqlProperties; //导入方法依赖的package包/类
public static void main(String[] argv) {

        TestCacheSize  test  = new TestCacheSize();
        HsqlProperties props = HsqlProperties.argArrayToProps(argv, "test");

        test.bigops   = props.getIntegerProperty("test.bigops", test.bigops);
        test.bigrows  = test.bigops;
        test.smallops = test.bigops / 8;
        test.cacheScale = props.getIntegerProperty("test.scale",
                test.cacheScale);
        test.logType   = props.getProperty("test.logtype", test.logType);
        test.tableType = props.getProperty("test.tabletype", test.tableType);
        test.nioMode   = props.isPropertyTrue("test.nio", test.nioMode);

        if (props.getProperty("test.dbtype", "").equals("mem")) {
            test.filepath = "mem:test";
            test.filedb   = false;
            test.shutdown = false;
        }

        test.setUp();

        StopWatch sw = new StopWatch();

        test.testFillUp();
        test.checkResults();

        long time = sw.elapsedTime();

        test.storeResult("total test time", 0, (int) time, 0);
        System.out.println("total test time -- " + sw.elapsedTime() + " ms");
        test.tearDown();
    }
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:34,代码来源:TestCacheSize.java


注:本文中的org.hsqldb.persist.HsqlProperties.isPropertyTrue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。