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


Java HsqlDatabaseProperties类代码示例

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


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


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