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


Java IntValueHashMap.get方法代码示例

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


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

示例1: setReferenceableColumns

import org.hsqldb.lib.IntValueHashMap; //导入方法依赖的package包/类
void setReferenceableColumns() {

        accessibleColumns = new boolean[indexLimitVisible];

        IntValueHashMap aliases = new IntValueHashMap();

        for (int i = 0; i < indexLimitVisible; i++) {
            Expression expression = exprColumns[i];
            String     alias      = expression.getAlias();

            if (alias.length() == 0) {
                SimpleName name = HsqlNameManager.getAutoColumnName(i);

                expression.setAlias(name);

                continue;
            }

            int index = aliases.get(alias, -1);

            if (index == -1) {
                aliases.put(alias, i);

                accessibleColumns[i] = true;
            } else {
                accessibleColumns[index] = false;
            }
        }
    }
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:30,代码来源:QuerySpecification.java

示例2: getGrantedClassNames

import org.hsqldb.lib.IntValueHashMap; //导入方法依赖的package包/类
/**
 * Retrieves the distinct set of Java <code>Class</code> FQNs
 * for which this <code>User</code> object has been
 * granted <code>ALL</code> (the Class execution privilege). <p>
 * @param andToPublic if <code>true</code>, then the set includes the
 *        names of classes accessible to this <code>User</code> object
 *        through grants to its Roles + <code>PUBLIC</code>
 *        <code>User</code> object attribute, else only role grants
 *        + direct grants are included.
 * @return the distinct set of Java Class FQNs for which this
 *        this <code>User</code> object has been granted
 *        <code>ALL</code>.
 */
HashSet getGrantedClassNames(boolean andToPublic) throws HsqlException {

    IntValueHashMap rights;
    Object          key;
    int             right;
    Iterator        i;

    rights = rightsMap;

    HashSet out = getGrantedClassNamesDirect();

    if (andToPublic && pubGrantee != null) {
        rights = pubGrantee.rightsMap;
        i      = rights.keySet().iterator();

        while (i.hasNext()) {
            key = i.next();

            if (key instanceof String) {
                right = rights.get(key, 0);

                if (right == GranteeManager.ALL) {
                    out.add(key);
                }
            }
        }
    }

    Iterator it = getAllRoles().iterator();

    while (it.hasNext()) {
        out.addAll(
            ((Grantee) granteeManager.getRole(
                (String) it.next())).getGrantedClassNamesDirect());
    }

    return out;
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:52,代码来源:Grantee.java

示例3: getStatementID

import org.hsqldb.lib.IntValueHashMap; //导入方法依赖的package包/类
/**
 * Retrieves the registered compiled statement identifier associated with
 * the specified SQL String, or a value less than zero, if no such
 * statement has been registered.
 *
 * @param schema the schema id
 * @param sql the SQL String
 * @return the compiled statement identifier associated with the
 *      specified SQL String
 */
private int getStatementID(HsqlName schema, String sql) {

    IntValueHashMap sqlMap =
        (IntValueHashMap) schemaMap.get(schema.hashCode());

    if (sqlMap == null) {
        return -1;
    }

    return sqlMap.get(sql, -1);
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:22,代码来源:CompiledStatementManager.java

示例4: getGrantedClassNamesDirect

import org.hsqldb.lib.IntValueHashMap; //导入方法依赖的package包/类
/**
 * Retrieves the distinct set of Java <code>Class</code> FQNs
 * for which this <code>User</code> object has directly been
 * granted <code>ALL</code> (the Class execution privilege).
 *
 * Does NOT check nested the pubGrantee nor nested roles.
 * @return the distinct set of Java Class FQNs for which this
 *        this <code>User</code> object has been granted
 *        <code>ALL</code>.
 *
 */
HashSet getGrantedClassNamesDirect() throws HsqlException {

    IntValueHashMap rights;
    HashSet         out;
    Object          key;
    int             right;
    Iterator        i;

    rights = rightsMap;
    out    = new HashSet();
    i      = rightsMap.keySet().iterator();

    while (i.hasNext()) {
        key = i.next();

        if (key instanceof String) {
            right = rights.get(key, 0);

            if (right == GranteeManager.ALL) {
                out.add(key);
            }
        }
    }

    return out;
}
 
开发者ID:danielbejaranogonzalez,项目名称:Mobile-Network-LTE,代码行数:38,代码来源:Grantee.java

示例5: addRightsStatements

import org.hsqldb.lib.IntValueHashMap; //导入方法依赖的package包/类
/**
 * Generates the GRANT statements for users.
 *
 * When views is true, generates rights for views only. Otherwise generates
 * rights for tables and classes.
 *
 * Does not generate script for:
 *
 * grant on builtin classes to public
 * grant select on system tables
 *
 */
private static void addRightsStatements(Database dDatabase, Result r) {

    StringBuffer   a;
    HashMappedList uv = dDatabase.getUserManager().getUsers();
    Iterator       it = uv.values().iterator();

    for (; it.hasNext(); ) {
        User   u    = (User) it.next();
        String name = u.getName();

        if (!name.equals(Token.T_PUBLIC)) {
            addRow(r, u.getCreateUserDDL());
        }

        IntValueHashMap rights = u.getRights();

        if (rights == null) {
            continue;
        }

        Iterator e = rights.keySet().iterator();

        while (e.hasNext()) {
            Object object = e.next();
            int    right  = rights.get(object, 0);

            a = new StringBuffer(64);

            a.append(Token.T_GRANT).append(' ');
            a.append(UserManager.getRight(right));
            a.append(' ').append(Token.T_ON).append(' ');

            if (object instanceof String) {
                if (object.equals("java.lang.Math")
                        || object.equals("org.hsqldb.Library")) {
                    continue;
                }

                a.append("CLASS \"");
                a.append((String) object);
                a.append('\"');
            } else {

                // either table != null or is system table
                Table table =
                    dDatabase.findUserTable(((HsqlName) object).name);

                // assumes all non String objects are table names
                if (table != null) {
                    a.append(((HsqlName) object).statementName);
                } else {
                    continue;
                }
            }

            a.append(' ').append(Token.T_TO).append(' ');
            a.append(u.getName());
            addRow(r, a.toString());
        }
    }
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:74,代码来源:DatabaseScript.java


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