• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java HsqlDatabaseProperties类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



HsqlDatabaseProperties类属于org.hsqldb.persist包,在下文中一共展示了HsqlDatabaseProperties类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: setLocalVariables

import org.hsqldb.persist.HsqlDatabaseProperties; //导入依赖的package包/类
private void setLocalVariables() {
    if (connProperties == null) {
        return;
    }

    isCloseResultSet = connProperties.isPropertyTrue(
        HsqlDatabaseProperties.url_close_result, false);
    isUseColumnName = connProperties.isPropertyTrue(
        HsqlDatabaseProperties.url_get_column_name, true);
    isEmptyBatchAllowed = connProperties.isPropertyTrue(
        HsqlDatabaseProperties.url_allow_empty_batch, false);
    isTranslateTTIType = clientProperties.isPropertyTrue(
        HsqlDatabaseProperties.jdbc_translate_tti_types, true);
    isStoreLiveObject = clientProperties.isPropertyTrue(
        HsqlDatabaseProperties.sql_live_object, false);

    if (isStoreLiveObject)  {
        String connType = connProperties.getProperty("connection_type");
        if(!DatabaseURL.S_MEM.equals(connType))
        isStoreLiveObject = false;
    }

}
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:24,代码来源:JDBCConnection.java


示例2: getHead

import org.hsqldb.persist.HsqlDatabaseProperties; //导入依赖的package包/类
/**
 * Retrieves an HTTP protocol header given the supplied arguments.
 *
 * @param responseCodeString the HTTP response code
 * @param addInfo true if additional header info is to be added
 * @param mimeType the Content-Type field value
 * @param length the Content-Length field value
 * @return an HTTP protocol header
 */
String getHead(String responseCodeString, boolean addInfo,
               String mimeType, int length) {

    StringBuffer sb = new StringBuffer(128);

    sb.append(responseCodeString).append("\r\n");

    if (addInfo) {
        sb.append("Allow: GET, HEAD, POST\nMIME-Version: 1.0\r\n");
        sb.append("Server: ").append(
            HsqlDatabaseProperties.PRODUCT_NAME).append("\r\n");
    }

    if (mimeType != null) {
        sb.append("Cache-Control: no-cache\r\n");    // DB-traffic should not be cached by proxy's
        sb.append("Content-Type: ").append(mimeType).append("\r\n");

        //sb.append("Content-Length: ").append(length).append("\r\n");
    }

    sb.append("\r\n");

    return sb.toString();
}
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:34,代码来源:WebServerConnection.java


示例3: init

import org.hsqldb.persist.HsqlDatabaseProperties; //导入依赖的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 conn the JDBCConnection
 *  @throws SQLException if a database access error occurs
 */
void init(ResultMetaData meta, JDBCConnection conn) 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 = true;

    if (conn == null) {
        return;
    }

    useColumnName = conn.isUseColumnName;

    if (conn.clientProperties != null) {
        translateTTIType = conn.clientProperties.isPropertyTrue(
            HsqlDatabaseProperties.jdbc_translate_tti_types);
    }
}
 
开发者ID:Julien35,项目名称:dev-courses,代码行数:32,代码来源:JDBCResultSetMetaData.java


示例4: JDBCConnection

import org.hsqldb.persist.HsqlDatabaseProperties; //导入依赖的package包/类
/**
 * Constructor for use with connection pooling and XA.
 */
public JDBCConnection(JDBCConnection c,
                      JDBCConnectionEventListener eventListener) {

    sessionProxy      = c.sessionProxy;
    connProperties    = c.connProperties;
    clientProperties  = c.clientProperties;
    isPooled          = true;
    poolEventListener = eventListener;

    if (connProperties != null) {
        isCloseResultSet = connProperties.isPropertyTrue(
            HsqlDatabaseProperties.url_close_result, false);
        isUseColumnName = connProperties.isPropertyTrue(
            HsqlDatabaseProperties.url_get_column_name, true);
    }
}
 
开发者ID:Julien35,项目名称:dev-courses,代码行数:20,代码来源:JDBCConnection.java


示例5: JDBCResultSet

import org.hsqldb.persist.HsqlDatabaseProperties; //导入依赖的package包/类
public JDBCResultSet(JDBCConnection conn, Result r,
                     ResultMetaData metaData) {

    this.session    = conn == null ? null
                                   : conn.sessionProxy;
    this.result     = r;
    this.connection = conn;
    rsProperties    = r.rsProperties;
    navigator       = r.getNavigator();
    resultMetaData  = metaData;
    columnCount     = resultMetaData.getColumnCount();

    if (conn != null) {
        if (conn.clientProperties != null) {
            translateTTIType = conn.clientProperties.isPropertyTrue(
                HsqlDatabaseProperties.jdbc_translate_tti_types);
        }
    }
}
 
开发者ID:Julien35,项目名称:dev-courses,代码行数:20,代码来源:JDBCResultSet.java


示例6: Database

import org.hsqldb.persist.HsqlDatabaseProperties; //导入依赖的package包/类
/**
 *  Constructs a new Database object.
 *
 * @param type is the type of the database: "mem:", "file:", "res:"
 * @param path is the given path to the database files
 * @param canonicalPath is the canonical path
 * @param props property overrides placed on the connect URL
 * @exception  HsqlException if the specified name and path
 *      combination is illegal or unavailable, or the database files the
 *      name and path resolves to are in use by another process
 */
Database(String type, String path, String canonicalPath,
         HsqlProperties props) {

    setState(Database.DATABASE_SHUTDOWN);

    this.databaseType  = type;
    this.path          = path;
    this.canonicalPath = canonicalPath;
    this.urlProperties = props;

    if (databaseType == DatabaseURL.S_RES) {
        filesInJar    = true;
        filesReadOnly = true;
    }

    logger = new Logger(this);
    shutdownOnNoConnection =
        urlProperties.isPropertyTrue(HsqlDatabaseProperties.url_shutdown);
    recoveryMode = urlProperties.getIntegerProperty(
        HsqlDatabaseProperties.url_recover, 0);
}
 
开发者ID:Julien35,项目名称:dev-courses,代码行数:33,代码来源:Database.java


示例7: JDBCDatabaseMetaData

import org.hsqldb.persist.HsqlDatabaseProperties; //导入依赖的package包/类
/**
 * Constructs a new <code>JDBCDatabaseMetaData</code> object using the
 * specified connection.  This contructor is used by <code>JDBCConnection</code>
 * when producing a <code>DatabaseMetaData</code> object from a call to
 * {@link JDBCConnection#getMetaData() getMetaData}.
 * @param c the connection this object will use to retrieve
 *         instance-specific metadata
 * @throws SQLException never - reserved for future use
 */
JDBCDatabaseMetaData(JDBCConnection c) throws SQLException {

    // PRE: is non-null and not closed
    connection       = c;
    useSchemaDefault = c.isInternal ? false
                                    : c.connProperties
                                    .isPropertyTrue(HsqlDatabaseProperties
                                        .url_default_schema);
}
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:19,代码来源:JDBCDatabaseMetaData.java


示例8: MAX_CHAR_OR_VARCHAR_DISPLAY_SIZE

import org.hsqldb.persist.HsqlDatabaseProperties; //导入依赖的package包/类
private static int MAX_CHAR_OR_VARCHAR_DISPLAY_SIZE() {

        try {
            return Integer.getInteger(
                HsqlDatabaseProperties.system_max_char_or_varchar_display_size,
                32766).intValue();
        } catch (SecurityException e) {
            return 32766;
        }
    }
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:11,代码来源:Types.java


示例9: getDefaultTableType

import org.hsqldb.persist.HsqlDatabaseProperties; //导入依赖的package包/类
/**
 * Obtain default table types from database properties
 */
int getDefaultTableType() {

    String dttName = getProperties().getProperty(
        HsqlDatabaseProperties.hsqldb_default_table_type);

    return Token.T_CACHED.equalsIgnoreCase(dttName) ? Table.CACHED_TABLE
                                                    : Table.MEMORY_TABLE;
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:12,代码来源:Database.java


示例10: getJavaName

import org.hsqldb.persist.HsqlDatabaseProperties; //导入依赖的package包/类
/**
 *  Returns the fully qualified name for the Java method corresponding to
 *  the given method alias. If there is no Java method, then returns the
 *  alias itself.
 */
String getJavaName(String name) throws HsqlException {

    String target = (String) hAlias.get(name);

    if (target == null) {
        target = name;
    }

    if (HsqlDatabaseProperties.supportsJavaMethod(target)) {
        return target;
    }

    throw Trace.error(Trace.ACCESS_IS_DENIED, target);
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:20,代码来源:Database.java


示例11: JDBCDatabaseMetaData

import org.hsqldb.persist.HsqlDatabaseProperties; //导入依赖的package包/类
/**
 * Constructs a new <code>JDBCDatabaseMetaData</code> object using the
 * specified connection.  This contructor is used by <code>JDBCConnection</code>
 * when producing a <code>DatabaseMetaData</code> object from a call to
 * {@link JDBCConnection#getMetaData() getMetaData}.
 * @param c the connection this object will use to retrieve
 *         instance-specific metadata
 * @throws SQLException never - reserved for future use
 */
JDBCDatabaseMetaData(JDBCConnection c) throws SQLException {

    // PRE: is non-null and not closed
    connection       = c;
    useSchemaDefault = c.isInternal ? false
                                    : c.connProperties
                                    .isPropertyTrue(HsqlDatabaseProperties
                                        .url_default_schema);
    supportsSchemasIn = c.isInternal || !useSchemaDefault;
}
 
开发者ID:s-store,项目名称:sstore-soft,代码行数:20,代码来源:JDBCDatabaseMetaData.java


示例12: ParserDQL

import org.hsqldb.persist.HsqlDatabaseProperties; //导入依赖的package包/类
/**
 *  Constructs a new Parser object with the given context.
 *
 * @param  session the connected context
 * @param  t the token source from which to parse commands
 */
ParserDQL(Session session, Scanner t) {

    super(t);

    this.session   = session;
    database       = session.getDatabase();
    compileContext = new CompileContext(session);
    strictSQLNames = database.getProperties().isPropertyTrue(
        HsqlDatabaseProperties.sql_enforce_keywords);
    strictSQLIdentifierParts = database.getProperties().isPropertyTrue(
        HsqlDatabaseProperties.sql_enforce_keywords);
}
 
开发者ID:s-store,项目名称:sstore-soft,代码行数:19,代码来源:ParserDQL.java


示例13: getResultMaxMemoryRows

import org.hsqldb.persist.HsqlDatabaseProperties; //导入依赖的package包/类
public int getResultMaxMemoryRows() {

        if (getTempDirectoryPath() == null) {
            return 0;
        }

        return databaseProperties.getIntegerProperty(
            HsqlDatabaseProperties.hsqldb_result_max_memory_rows, 0);
    }
 
开发者ID:s-store,项目名称:sstore-soft,代码行数:10,代码来源:Database.java


示例14: getTempDirectoryPath

import org.hsqldb.persist.HsqlDatabaseProperties; //导入依赖的package包/类
public String getTempDirectoryPath() {

        if (tempDirectoryPath == null) {
            if (databaseType == DatabaseURL.S_FILE) {
                String path = sPath + ".tmp";

                tempDirectoryPath = FileUtil.makeDirectories(path);
            } else {
                tempDirectoryPath = databaseProperties.getProperty(
                    HsqlDatabaseProperties.hsqldb_temp_directory);
            }
        }

        return tempDirectoryPath;
    }
 
开发者ID:s-store,项目名称:s-store,代码行数:16,代码来源:Database.java


示例15: JDBCParameterMetaData

import org.hsqldb.persist.HsqlDatabaseProperties; //导入依赖的package包/类
/**
 * Creates a new instance of JDBCParameterMetaData. <p>
 *
 * @param metaData A ResultMetaData object describing the statement parameters
 * @throws SQLException never - reserved for future use
 */
JDBCParameterMetaData(JDBCConnection conn,
                      ResultMetaData metaData) throws SQLException {

    rmd            = metaData;
    parameterCount = rmd.getColumnCount();

    if (conn.clientProperties != null) {
        translateTTIType = conn.clientProperties.isPropertyTrue(
            HsqlDatabaseProperties.jdbc_translate_tti_types);
    }
}
 
开发者ID:Julien35,项目名称:dev-courses,代码行数:18,代码来源:JDBCParameterMetaData.java


示例16: SYSTEM_CONNECTION_PROPERTIES

import org.hsqldb.persist.HsqlDatabaseProperties; //导入依赖的package包/类
/**
 * getClientInfoProperties
 *
 * @return Result
 *
 * <li><b>NAME</b> String=> The name of the client info property<br>
 * <li><b>MAX_LEN</b> int=> The maximum length of the value for the property<br>
 * <li><b>DEFAULT_VALUE</b> String=> The default value of the property<br>
 * <li><b>DESCRIPTION</b> String=> A description of the property.  This will typically
 *                                                  contain information as to where this property is
 *                                                  stored in the database.
 */
final Table SYSTEM_CONNECTION_PROPERTIES(Session session,
        PersistentStore store) {

    Table t = sysTables[SYSTEM_CONNECTION_PROPERTIES];

    if (t == null) {
        t = createBlankTable(
            sysTableHsqlNames[SYSTEM_CONNECTION_PROPERTIES]);

        addColumn(t, "NAME", SQL_IDENTIFIER);
        addColumn(t, "MAX_LEN", Type.SQL_INTEGER);
        addColumn(t, "DEFAULT_VALUE", SQL_IDENTIFIER);    // not null
        addColumn(t, "DESCRIPTION", SQL_IDENTIFIER);      // not null

        HsqlName name = HsqlNameManager.newInfoSchemaObjectName(
            sysTableHsqlNames[SYSTEM_CONNECTION_PROPERTIES].name, false,
            SchemaObject.INDEX);

        t.createPrimaryKeyConstraint(name, new int[]{ 0 }, true);

        return t;
    }

    Object[] row;

    // column number mappings
    final int iname          = 0;
    final int imax_len       = 1;
    final int idefault_value = 2;
    final int idescription   = 3;
    Iterator  it = HsqlDatabaseProperties.getPropertiesMetaIterator();

    while (it.hasNext()) {
        Object[] meta = (Object[]) it.next();
        int propType =
            ((Integer) meta[HsqlProperties.indexType]).intValue();

        if (propType == HsqlDatabaseProperties.FILE_PROPERTY) {
            if (HsqlDatabaseProperties.hsqldb_readonly.equals(
                    meta[HsqlProperties.indexName]) || HsqlDatabaseProperties
                        .hsqldb_files_readonly.equals(
                            meta[HsqlProperties.indexName])) {}
            else {
                continue;
            }
        } else if (propType != HsqlDatabaseProperties.SQL_PROPERTY) {
            continue;
        }

        row = t.getEmptyRowData();

        Object def = meta[HsqlProperties.indexDefaultValue];

        row[iname]          = meta[HsqlProperties.indexName];
        row[imax_len]       = ValuePool.getInt(8);
        row[idefault_value] = def == null ? null
                                          : def.toString();
        row[idescription]   = "see HyperSQL guide";

        t.insertSys(session, store, row);
    }

    return t;
}
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:77,代码来源:DatabaseInformationMain.java


示例17: init

import org.hsqldb.persist.HsqlDatabaseProperties; //导入依赖的package包/类
/**
 * Initializes this connection.
 * <p>
 * Will return (not throw) if fail to initialize the connection.
 * </p>
 */
private void init() {

    runnerThread = Thread.currentThread();
    keepAlive    = true;

    try {
        socket.setTcpNoDelay(true);

        dataInput = new DataInputStream(
            new BufferedInputStream(socket.getInputStream()));
        dataOutput = new DataOutputStream(socket.getOutputStream());

        int firstInt = handshake();

        switch (streamProtocol) {

            case HSQL_STREAM_PROTOCOL :
                if (firstInt
                        != ClientConnection
                            .NETWORK_COMPATIBILITY_VERSION_INT) {
                    if (firstInt == -1900000) {
                        firstInt = -2000000;
                    }

                    String verString =
                        ClientConnection.toNetCompVersionString(firstInt);

                    throw Error.error(
                        null, ErrorCode.SERVER_VERSIONS_INCOMPATIBLE, 0,
                        new String[] {
                        verString, HsqlDatabaseProperties.THIS_VERSION
                    });
                }

                int msgType = dataInput.readByte();

                receiveResult(msgType);
                break;

            case ODBC_STREAM_PROTOCOL :
                odbcConnect(firstInt);
                break;

            default :

                // Protocol detection failures should already have been
                // handled.
                keepAlive = false;
        }
    } catch (Exception e) {

        // Only "unexpected" failures are caught here.
        // Expected failures will have been handled (by sending feedback
        // to user-- with an output Result for normal protocols), then
        // continuing.
        StringBuffer sb = new StringBuffer(mThread
                                           + ":Failed to connect client.");

        if (user != null) {
            sb.append("  User '" + user + "'.");
        }

        server.printWithThread(sb.toString() + "  Stack trace follows.");
        server.printStackTrace(e);
    }
}
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:73,代码来源:ServerConnection.java


示例18: compileSetProperty

import org.hsqldb.persist.HsqlDatabaseProperties; //导入依赖的package包/类
private Statement compileSetProperty() {

        read();

        String                 property;
        Object                 value;
        HsqlDatabaseProperties props;

        checkIsSimpleName();
        checkIsDelimitedIdentifier();

        property = token.tokenString;
        props    = database.getProperties();

        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_42511);
        }

        int typeCode = isboolean ? Types.SQL_BOOLEAN
                                 : isintegral ? Types.SQL_INTEGER
                                              : Types.SQL_CHAR;

        read();

        if (token.tokenType == Tokens.TRUE) {
            value = Boolean.TRUE;
        } else if (token.tokenType == Tokens.FALSE) {
            value = Boolean.FALSE;
        } else {
            checkIsValue();

            value = token.tokenValue;

            if (token.dataType.typeCode != typeCode) {
                throw Error.error(ErrorCode.X_42565, token.tokenString);
            }
        }

        read();

        Object[] args = new Object[] {
            property, value
        };

        return new StatementCommand(StatementTypes.SET_DATABASE_PROPERTY,
                                    args, null, null);
    }
 
开发者ID:s-store,项目名称:sstore-soft,代码行数:52,代码来源:ParserCommand.java


示例19: getProperties

import org.hsqldb.persist.HsqlDatabaseProperties; //导入依赖的package包/类
/**
 *  Returns the database properties.
 */
public HsqlDatabaseProperties getProperties() {
    return databaseProperties;
}
 
开发者ID:s-store,项目名称:sstore-soft,代码行数:7,代码来源:Database.java


示例20: SYSTEM_CONNECTION_PROPERTIES

import org.hsqldb.persist.HsqlDatabaseProperties; //导入依赖的package包/类
/**
 * getClientInfoProperties
 *
 * @return Result
 *
 * <li><b>NAME</b> String=> The name of the client info property<br>
 * <li><b>MAX_LEN</b> int=> The maximum length of the value for the property<br>
 * <li><b>DEFAULT_VALUE</b> String=> The default value of the property<br>
 * <li><b>DESCRIPTION</b> String=> A description of the property.  This will typically
 *                                                  contain information as to where this property is
 *                                                  stored in the database.
 */
final Table SYSTEM_CONNECTION_PROPERTIES(Session session,
        PersistentStore store) {

    Table t = sysTables[SYSTEM_CONNECTION_PROPERTIES];

    if (t == null) {
        t = createBlankTable(
            sysTableHsqlNames[SYSTEM_CONNECTION_PROPERTIES]);

        addColumn(t, "NAME", SQL_IDENTIFIER);
        addColumn(t, "MAX_LEN", Type.SQL_INTEGER);
        addColumn(t, "DEFAULT_VALUE", SQL_IDENTIFIER);    // not null
        addColumn(t, "DESCRIPTION", SQL_IDENTIFIER);      // not null

        HsqlName name = HsqlNameManager.newInfoSchemaObjectName(
            sysTableHsqlNames[SYSTEM_PRIMARYKEYS].name, false,
            SchemaObject.INDEX);

        t.createPrimaryKeyConstraint(name, new int[]{ 0 }, true);

        return t;
    }

    Object[] row;

    // column number mappings
    final int iname          = 0;
    final int imax_len       = 1;
    final int idefault_value = 2;
    final int idescription   = 3;
    Iterator  it = HsqlDatabaseProperties.getPropertiesMetaIterator();

    while (it.hasNext()) {
        Object[] meta = (Object[]) it.next();
        int propType =
            ((Integer) meta[HsqlProperties.indexType]).intValue();

        if (propType == HsqlDatabaseProperties.FILE_PROPERTY) {
            if (HsqlDatabaseProperties.hsqldb_readonly.equals(
                    meta[HsqlProperties.indexName]) || HsqlDatabaseProperties
                        .hsqldb_files_readonly.equals(
                            meta[HsqlProperties.indexName])) {}
            else {
                continue;
            }
        } else if (propType != HsqlDatabaseProperties.SQL_PROPERTY) {
            continue;
        }

        row = t.getEmptyRowData();

        Object def = meta[HsqlProperties.indexDefaultValue];

        row[iname]          = meta[HsqlProperties.indexName];
        row[imax_len]       = ValuePool.getInt(8);
        row[idefault_value] = def == null ? null
                                          : def.toString();
        row[idescription]   = "see HyperSQL guide";

        t.insertSys(session, store, row);
    }

    return t;
}
 
开发者ID:Julien35,项目名称:dev-courses,代码行数:77,代码来源:DatabaseInformationMain.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java PriorityProto类代码示例发布时间:2022-05-22
下一篇:
Java Sort类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap