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


Java ArrayUtil.toAdjustedColumnArray方法代码示例

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


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

示例1: createAdjustedIndex

import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
/**
 *  Create new index taking into account removal or addition of a column
 *  to the table.
 */
private Index createAdjustedIndex(Index index, int colindex,
                                  int adjust) throws HsqlException {

    int[] indexcolumns = (int[]) ArrayUtil.resizeArray(index.getColumns(),
        index.getVisibleColumns());
    int[] colarr = ArrayUtil.toAdjustedColumnArray(indexcolumns,
        colindex, adjust);

    // if a column to remove is one of the Index columns
    if (colarr.length != index.getVisibleColumns()) {
        return null;
    }

    return createIndexStructure(colarr, index.getName(), false,
                                index.isUnique(), index.isConstraint,
                                index.isForward);
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:22,代码来源:Table.java

示例2: createAdjustedIndex

import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
/**
 *  Create new index taking into account removal or addition of a column
 *  to the table.
 */
private Index createAdjustedIndex(Index index, int colindex,
                                  int adjust) throws HsqlException {

    int[] indexcolumns = (int[]) ArrayUtil.resizeArray(index.getColumns(),
        index.getVisibleColumns());
    int[] colarr = ArrayUtil.toAdjustedColumnArray(indexcolumns, colindex,
        adjust);

    // if a column to remove is one of the Index columns
    if (colarr.length != index.getVisibleColumns()) {
        return null;
    }

    return createIndexStructure(colarr, index.getName(), index.isUnique(),
                                index.isConstraint, index.isForward);
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:21,代码来源:Table.java

示例3: updateTable

import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
/**
 * Used to update constrains to reflect structural changes in a table. Prior
 * checks must ensure that this method does not throw.
 *
 * @param session Session
 * @param oldTable reference to the old version of the table
 * @param newTable reference to the new version of the table
 * @param colIndex index at which table column is added or removed
 * @param adjust -1, 0, +1 to indicate if column is added or removed
 */
void updateTable(Session session, Table oldTable, Table newTable,
                 int colIndex, int adjust) {

    if (oldTable == core.mainTable) {
        core.mainTable = newTable;

        if (core.mainIndex != null) {
            core.mainIndex =
                core.mainTable.getIndex(core.mainIndex.getName().name);
            core.mainCols = ArrayUtil.toAdjustedColumnArray(core.mainCols,
                    colIndex, adjust);
        }
    }

    if (oldTable == core.refTable) {
        core.refTable = newTable;

        if (core.refIndex != null) {
            core.refIndex =
                core.refTable.getIndex(core.refIndex.getName().name);
            core.refCols = ArrayUtil.toAdjustedColumnArray(core.refCols,
                    colIndex, adjust);
        }
    }

    // CHECK
    if (constType == SchemaObject.ConstraintTypes.CHECK) {
        recompile(session, newTable);
    }
}
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:41,代码来源:Constraint.java

示例4: updateTable

import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
/**
 * Used to update constrains to reflect structural changes in a table. Prior
 * checks must ensure that this method does not throw.
 *
 * @param session Session
 * @param oldTable reference to the old version of the table
 * @param newTable referenct to the new version of the table
 * @param colIndex index at which table column is added or removed
 * @param adjust -1, 0, +1 to indicate if column is added or removed
 * @
 */
void updateTable(Session session, Table oldTable, Table newTable,
                 int colIndex, int adjust) {

    if (oldTable == core.mainTable) {
        core.mainTable = newTable;

        if (core.mainIndex != null) {
            core.mainIndex =
                core.mainTable.getIndex(core.mainIndex.getName().name);
            core.mainCols = ArrayUtil.toAdjustedColumnArray(core.mainCols,
                    colIndex, adjust);
        }
    }

    if (oldTable == core.refTable) {
        core.refTable = newTable;

        if (core.refIndex != null) {
            core.refIndex =
                core.refTable.getIndex(core.refIndex.getName().name);
            core.refCols = ArrayUtil.toAdjustedColumnArray(core.refCols,
                    colIndex, adjust);
        }
    }

    // CHECK
    if (constType == CHECK) {
        recompile(session, newTable);
    }
}
 
开发者ID:s-store,项目名称:sstore-soft,代码行数:42,代码来源:Constraint.java

示例5: updateTable

import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
/**
 * Used to update constrains to reflect structural changes in a table. Prior
 * checks must ensure that this method does not throw.
 *
 * @param session Session
 * @param oldTable reference to the old version of the table
 * @param newTable referenct to the new version of the table
 * @param colIndex index at which table column is added or removed
 * @param adjust -1, 0, +1 to indicate if column is added or removed
 */
void updateTable(Session session, Table oldTable, Table newTable,
                 int colIndex, int adjust) {

    if (oldTable == core.mainTable) {
        core.mainTable = newTable;

        if (core.mainIndex != null) {
            core.mainIndex =
                core.mainTable.getIndex(core.mainIndex.getName().name);
            core.mainCols = ArrayUtil.toAdjustedColumnArray(core.mainCols,
                    colIndex, adjust);

            core.mainIndex.setTable(newTable);
        }
    }

    if (oldTable == core.refTable) {
        core.refTable = newTable;

        if (core.refIndex != null) {
            core.refIndex =
                core.refTable.getIndex(core.refIndex.getName().name);
            core.refCols = ArrayUtil.toAdjustedColumnArray(core.refCols,
                    colIndex, adjust);

            core.refIndex.setTable(newTable);
        }
    }

    // CHECK
    if (constType == SchemaObject.ConstraintTypes.CHECK) {
        recompile(session, newTable);
    }
}
 
开发者ID:Julien35,项目名称:dev-courses,代码行数:45,代码来源:Constraint.java

示例6: replaceTable

import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
/**
 *  Used to update constrains to reflect structural changes in a table.
 *  Prior checks must ensure that this method does not throw.
 *
 * @param  oldt reference to the old version of the table
 * @param  newt referenct to the new version of the table
 * @param  colindex index at which table column is added or removed
 * @param  adjust -1, 0, +1 to indicate if column is added or removed
 * @throws  HsqlException
 */
void replaceTable(Table oldt, Table newt, int colindex,
                  int adjust) throws HsqlException {

    if (oldt == core.mainTable) {
        core.mainTable = newt;

        // excluede CHECK
        if (core.mainIndex != null) {
            core.mainIndex =
                core.mainTable.getIndex(core.mainIndex.getName().name);
            core.mainColArray =
                ArrayUtil.toAdjustedColumnArray(core.mainColArray,
                                                colindex, adjust);
        }
    }

    if (oldt == core.refTable) {
        core.refTable = newt;

        if (core.refIndex != null) {
            core.refIndex =
                core.refTable.getIndex(core.refIndex.getName().name);

            if (core.refIndex != core.mainIndex) {
                core.refColArray =
                    ArrayUtil.toAdjustedColumnArray(core.refColArray,
                                                    colindex, adjust);
            }
        }
    }
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:42,代码来源:Constraint.java

示例7: replaceTable

import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
/**
 *  Used to update constrains to reflect structural changes in a table.
 *  Prior checks must ensure that this method does not throw.
 *
 * @param  oldt reference to the old version of the table
 * @param  newt referenct to the new version of the table
 * @param  colindex index at which table column is added or removed
 * @param  adjust -1, 0, +1 to indicate if column is added or removed
 * @throws  HsqlException
 */
void replaceTable(Table oldt, Table newt, int colindex,
                  int adjust) throws HsqlException {

    if (oldt == core.mainTable) {
        core.mainTable = newt;

        // exclude CHECK
        if (core.mainIndex != null) {
            core.mainIndex =
                core.mainTable.getIndex(core.mainIndex.getName().name);
            core.mainColArray =
                ArrayUtil.toAdjustedColumnArray(core.mainColArray,
                                                colindex, adjust);
        }
    }

    if (oldt == core.refTable) {
        core.refTable = newt;

        if (core.refIndex != null) {
            core.refIndex =
                core.refTable.getIndex(core.refIndex.getName().name);

            if (core.refIndex != core.mainIndex) {
                core.refColArray =
                    ArrayUtil.toAdjustedColumnArray(core.refColArray,
                                                    colindex, adjust);
            }
        }
    }
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:42,代码来源:Constraint.java


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