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


Java Table.getNewColumnCheckList方法代码示例

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


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

示例1: getColumnList

import org.hsqldb.Table; //导入方法依赖的package包/类
private static void getColumnList(Table t, OrderedHashSet set,
                                  StringBuffer buf) {

    int       count        = 0;
    boolean[] colCheckList = t.getNewColumnCheckList();

    for (int i = 0; i < set.size(); i++) {
        HsqlName name     = (HsqlName) set.get(i);
        int      colIndex = t.findColumn(name.name);

        if (colIndex == -1) {
            continue;
        }

        colCheckList[colIndex] = true;

        count++;
    }

    if (count == 0) {
        throw Error.runtimeError(ErrorCode.U_S0500, "Right");
    }

    buf.append('(');

    for (int i = 0, colCount = 0; i < colCheckList.length; i++) {
        if (colCheckList[i]) {
            colCount++;

            buf.append(t.getColumn(i).getName().statementName);

            if (colCount < count) {
                buf.append(',');
            }
        }
    }

    buf.append(')');
}
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:40,代码来源:Right.java

示例2: setColumns

import org.hsqldb.Table; //导入方法依赖的package包/类
private static void setColumns(Table t, OrderedHashSet set) {

        int       count        = 0;
        boolean[] colCheckList = t.getNewColumnCheckList();

        for (int i = 0; i < set.size(); i++) {
            String name     = (String) set.get(i);
            int    colIndex = t.findColumn(name);

            if (colIndex == -1) {
                throw Error.error(ErrorCode.X_42501, name);
            }

            colCheckList[colIndex] = true;

            count++;
        }

        if (count == 0) {
            throw Error.error(ErrorCode.X_42501);
        }

        set.clear();

        for (int i = 0; i < colCheckList.length; i++) {
            if (colCheckList[i]) {
                set.add(t.getColumn(i).getName());
            }
        }
    }
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:31,代码来源:Right.java


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