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


Java ArrayUtil.copyArray方法代码示例

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


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

示例1: getRow

import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
Object[] getRow(Object[] row) {

        if (isGrouped) {
            ResultGroup newGroup = new ResultGroup(row);
            ResultGroup group    = (ResultGroup) groups.get(newGroup);

            if (group != null) {
                ArrayUtil.copyArray(group.row, row, row.length);
            }
        } else if (isAggregated) {
            if (currGroup != null) {
                ArrayUtil.copyArray(currGroup.row, row, row.length);
            }
        }

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

示例2: insert

import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
/**
 * Used by the methods above. To avoid unnecessary
 * creation of arrays The Object[] for data in the Result rows is inserted
 * into the table if it has the same length as table row data.
 */
public void insert(Object[] data) throws HsqlException {

    if (data.length != columnCount) {
        Object[] newdata = getNewRow();

        ArrayUtil.copyArray(data, newdata, visibleColumnCount);

        data = newdata;
    } else {
        for (int i = visibleColumnCount; i < columnCount; i++) {
            data[i] = null;
        }
    }

    Row r = Row.newRow(this, data);

    indexRow(r);
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:24,代码来源:Table.java

示例3: executeSetStatement

import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
Result executeSetStatement(Session session) {

        Table        table          = targetTable;
        int[]        colMap         = updateColumnMap;    // column map
        Expression[] colExpressions = updateExpressions;
        Type[]       colTypes       = table.getColumnTypes();
        int index = targetRangeVariables[TriggerDef.NEW_ROW].rangePosition;
        Object[] oldData =
            session.sessionContext.rangeIterators[index].getCurrentRow()
                .getData();
        Object[] data = getUpdatedData(session, table, colMap, colExpressions,
                                       colTypes, oldData);

        ArrayUtil.copyArray(data, oldData, data.length);

        return Result.updateOneResult;
    }
 
开发者ID:s-store,项目名称:sstore-soft,代码行数:18,代码来源:StatementDML.java

示例4: resolveTypes

import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
public void resolveTypes(Session session) {

        if (isResolved) {
            return;
        }

        resolveTypesPartOne(session);
        resolveTypesPartTwo(session);
        ArrayUtil.copyArray(resultTable.colTypes, unionColumnTypes,
                            unionColumnTypes.length);

        for (int i = 0; i < indexStartOrderBy; i++) {
            if (exprColumns[i].dataType == null) {
                throw Error.error(ErrorCode.X_42567);
            }
        }

        isResolved = true;

        return;
    }
 
开发者ID:s-store,项目名称:sstore-soft,代码行数:22,代码来源:QuerySpecification.java

示例5: resolveTypes

import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
public void resolveTypes(Session session) {

        if (isResolved) {
            return;
        }

        resolveTypesPartOne(session);
        resolveTypesPartTwo(session);
        resolveTypesPartThree(session);
        ArrayUtil.copyArray(resultTable.colTypes, unionColumnTypes,
                            unionColumnTypes.length);
    }
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:13,代码来源:QuerySpecification.java

示例6: executeTriggerSetStatement

import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
Result executeTriggerSetStatement(Session session) {

        Table        table          = targetTable;
        int[]        colMap         = updateColumnMap;    // column map
        Expression[] colExpressions = updateExpressions;
        Type[]       colTypes       = table.getColumnTypes();
        int index = targetRangeVariables[TriggerDef.NEW_ROW].rangePosition;
        Object[]     oldData = session.sessionContext.triggerArguments[index];
        Object[] data = StatementDML.getUpdatedData(session, targets, table,
            colMap, colExpressions, colTypes, oldData);

        ArrayUtil.copyArray(data, oldData, data.length);

        return Result.updateOneResult;
    }
 
开发者ID:Julien35,项目名称:dev-courses,代码行数:16,代码来源:StatementSet.java

示例7: findIndexForColumns

import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
IndexUse[] findIndexForColumns(Session session, OrderedIntHashSet set,
                               int opType, boolean ordered) {

    IndexUse[] indexUse = Index.emptyUseArray;

    if (set.isEmpty()) {
        return Index.emptyUseArray;
    }

    for (int i = 0, count = indexList.length; i < count; i++) {
        Index currentIndex = getIndex(i);
        int[] indexcols    = currentIndex.getColumns();
        int matchCount = ordered ? set.getOrderedStartMatchCount(indexcols)
                                 : set.getStartMatchCount(indexcols);

        if (matchCount == 0) {
            continue;
        }

        if (matchCount == set.size()) {
            return currentIndex.asArray();
        }

        if (matchCount == currentIndex.getColumnCount()) {
            if (currentIndex.isUnique()) {
                return currentIndex.asArray();
            }
        }

        if (indexUse.length == 0
                && matchCount == currentIndex.getColumnCount()) {
            indexUse = currentIndex.asArray();
        } else {
            IndexUse[] newList = new IndexUse[indexUse.length + 1];

            ArrayUtil.copyArray(indexUse, newList, indexUse.length);

            newList[newList.length - 1] = new IndexUse(currentIndex,
                    matchCount);
            indexUse = newList;
        }
    }

    return indexUse;
}
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:46,代码来源:Table.java

示例8: getIndexForColumns

import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
/**
 * Finds an existing index for a column set or create one for temporary
 * tables.
 *
 * synchronized required for shared INFORMATION_SCHEMA etc. tables
 */
synchronized IndexUse[] getIndexForColumns(Session session,
        OrderedIntHashSet set, int opType, boolean ordered) {

    IndexUse[] indexUse = Index.emptyUseArray;

    if (set.isEmpty()) {
        return Index.emptyUseArray;
    }

    for (int i = 0, count = indexList.length; i < count; i++) {
        Index currentIndex = getIndex(i);
        int[] indexcols    = currentIndex.getColumns();
        int matchCount = ordered ? set.getOrderedStartMatchCount(indexcols)
                                 : set.getStartMatchCount(indexcols);

        if (matchCount == 0) {
            continue;
        }

        if (matchCount == set.size()) {
            return currentIndex.asArray();
        }

        if (matchCount == currentIndex.getColumnCount()) {
            if (currentIndex.isUnique()) {
                return currentIndex.asArray();
            }
        }

        if (indexUse.length == 0
                && matchCount == currentIndex.getColumnCount()) {
            indexUse = currentIndex.asArray();
        } else {
            IndexUse[] newList = new IndexUse[indexUse.length + 1];

            ArrayUtil.copyArray(indexUse, newList, indexUse.length);

            newList[newList.length - 1] = new IndexUse(currentIndex,
                    matchCount);
            indexUse = newList;
        }
    }

    // index is not full;
    switch (tableType) {

        case TableBase.FUNCTION_TABLE :
        case TableBase.SYSTEM_SUBQUERY :
        case TableBase.INFO_SCHEMA_TABLE :
        case TableBase.VIEW_TABLE :
        case TableBase.TEMP_TABLE : {
            Index selected = createIndexForColumns(session, set.toArray());

            if (selected != null) {
                indexUse = selected.asArray();
            }
        }
    }

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

示例9: addSessionVariable

import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
public void addSessionVariable(ColumnSchema variable) {

        int index = sessionVariables.size();

        if (!sessionVariables.add(variable.getName().name, variable)) {
            throw Error.error(ErrorCode.X_42504);
        }

        Object[] vars = new Object[sessionVariables.size()];

        ArrayUtil.copyArray(routineVariables, vars, routineVariables.length);

        routineVariables        = vars;
        routineVariables[index] = variable.getDefaultValue(session);
    }
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:16,代码来源:SessionContext.java

示例10: newUpdateResultMetaData

import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
public static ResultMetaData newUpdateResultMetaData(Type[] types) {

        ResultMetaData md = new ResultMetaData(UPDATE_RESULT_METADATA);

        md.columnTypes         = new Type[types.length];
        md.columnCount         = types.length;
        md.extendedColumnCount = types.length;

        ArrayUtil.copyArray(types, md.columnTypes, types.length);

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

示例11: getColumnTypes

import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
public Type[] getColumnTypes() {

        if (resultColumnTypes.length == indexLimitVisible) {
            return resultColumnTypes;
        }

        Type[] types = new Type[indexLimitVisible];

        ArrayUtil.copyArray(resultColumnTypes, types, types.length);

        return types;
    }
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:13,代码来源:QuerySpecification.java

示例12: getColumnTypes

import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
public Type[] getColumnTypes() {

        if (columnTypes.length == indexLimitVisible) {
            return columnTypes;
        }

        Type[] types = new Type[indexLimitVisible];

        ArrayUtil.copyArray(columnTypes, types, types.length);

        return types;
    }
 
开发者ID:s-store,项目名称:sstore-soft,代码行数:13,代码来源:QuerySpecification.java

示例13: addSessionVariable

import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
public void addSessionVariable(ColumnSchema variable) {

        int index = sessionVariables.size();

        sessionVariables.add(variable.getName().name, variable);

        Object[] vars = new Object[sessionVariables.size()];

        ArrayUtil.copyArray(routineVariables, vars, routineVariables.length);

        routineVariables        = vars;
        routineVariables[index] = variable.getDefaultValue(session);
    }
 
开发者ID:s-store,项目名称:s-store,代码行数:14,代码来源:SessionContext.java


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