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


Java ArrayUtil.duplicateArray方法代码示例

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


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

示例1: BinaryData

import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
/**
 * This constructor is used inside the engine when an already serialized
 * byte[] is read from a file (.log, .script, .data or text table source).
 * In this case clone is false.
 *
 * When a byte[] is submitted as a parameter of PreparedStatement then
 * clone is true.
 */
public BinaryData(byte[] data, boolean clone) {

    if (clone) {
        data = (byte[]) ArrayUtil.duplicateArray(data);
    }

    this.data      = data;
    this.bitLength = data.length * 8L;
}
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:18,代码来源:BinaryData.java

示例2: insertTableValues

import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
private void insertTableValues(Session session, PersistentStore store) {

        Result          result = nodes[LEFT].getResult(session);
        RowSetNavigator nav    = result.navigator;

        while (nav.hasNext()) {
            Object[] data    = nav.getNext();
            Object[] newdata = (Object[]) ArrayUtil.duplicateArray(data);
            Row row = (Row) store.getNewCachedObject(session, newdata, false);

            try {
                store.indexRow(session, row);
            } catch (HsqlException e) {}
        }
    }
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:16,代码来源:ExpressionTable.java

示例3: BinaryData

import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
/**
 * This constructor is used inside the engine when an already serialized
 * byte[] is read from a file (.log, .script, .data or text table source).
 * In this case clone is false.
 *
 * When a byte[] is submitted as a parameter of PreparedStatement then
 * clone is true.
 */
public BinaryData(byte[] data, boolean clone) {

    if (clone) {
        data = (byte[]) ArrayUtil.duplicateArray(data);
    }

    this.data      = data;
    this.bitLength = data.length * 8;
}
 
开发者ID:s-store,项目名称:sstore-soft,代码行数:18,代码来源:BinaryData.java

示例4: fireBeforeTriggers

import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
/**
 * Fires all row-level triggers of the given set (trigger type)
 */
void fireBeforeTriggers(Session session, int trigVecIndex, Object[] oldData, Object[] newData, int[] cols) {

    if (!database.isReferentialIntegrity()) {
        return;
    }

    TriggerDef[] trigVec = triggerLists[trigVecIndex];

    for (int i = 0, size = trigVec.length; i < size; i++) {
        TriggerDef td = trigVec[i];
        boolean sqlTrigger = td instanceof TriggerDefSQL;

        if (cols != null && td.getUpdateColumnIndexes() != null && !ArrayUtil.haveCommonElement(td.getUpdateColumnIndexes(), cols, cols.length)) {
            continue;
        }

        if (td.isForEachRow()) {
            switch (td.triggerType) {

                case Trigger.UPDATE_BEFORE_ROW:
                case Trigger.DELETE_BEFORE_ROW:
                    if (!sqlTrigger) {
                        oldData = (Object[]) ArrayUtil.duplicateArray(oldData);
                    }
                    break;
            }

            td.pushPair(session, oldData, newData);
        } else {
            td.pushPair(session, null, null);
        }
    }
}
 
开发者ID:s-store,项目名称:sstore-soft,代码行数:37,代码来源:Table.java

示例5: Binary

import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
/**
 * This constructor is used inside the engine when an already serialized
 * byte[] is read from a file (.log, .script, .data or text table source).
 * In this case clone is false.
 *
 * When a byte[] is submitted as a parameter of PreparedStatement then
 * clone is true.
 */
public Binary(byte[] data, boolean clone) {

    if (clone) {
        data = (byte[]) ArrayUtil.duplicateArray(data);
    }

    this.data = data;
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:17,代码来源:Binary.java

示例6: fireTriggers

import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
/**
 *  Fires all row-level triggers of the given set (trigger type)
 *
 */
void fireTriggers(Session session, int trigVecIndex, Object[] oldData,
                  Object[] newData, int[] cols) {

    if (!database.isReferentialIntegrity()) {
        return;
    }

    TriggerDef[] trigVec = triggerLists[trigVecIndex];

    for (int i = 0, size = trigVec.length; i < size; i++) {
        TriggerDef td         = trigVec[i];
        boolean    sqlTrigger = td instanceof TriggerDefSQL;

        if (cols != null && td.getUpdateColumnIndexes() != null
                && !ArrayUtil.haveCommonElement(
                    td.getUpdateColumnIndexes(), cols)) {
            continue;
        }

        if (td.isForEachRow()) {
            switch (td.triggerType) {

                case Trigger.INSERT_BEFORE_ROW :
                    break;

                case Trigger.INSERT_AFTER_ROW :
                    if (!sqlTrigger) {
                        newData =
                            (Object[]) ArrayUtil.duplicateArray(newData);
                    }
                    break;

                case Trigger.UPDATE_AFTER_ROW :
                    if (!sqlTrigger) {
                        oldData =
                            (Object[]) ArrayUtil.duplicateArray(oldData);
                        newData =
                            (Object[]) ArrayUtil.duplicateArray(newData);
                    }
                    break;

                case Trigger.UPDATE_BEFORE_ROW :
                case Trigger.DELETE_BEFORE_ROW :
                case Trigger.DELETE_AFTER_ROW :
                    if (!sqlTrigger) {
                        oldData =
                            (Object[]) ArrayUtil.duplicateArray(oldData);
                    }
                    break;
            }

            td.pushPair(session, oldData, newData);
        } else {
            td.pushPair(session, null, null);
        }
    }
}
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:62,代码来源:Table.java

示例7: getInsertOrUpdateColumnCheckList

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

        switch (type) {

            case StatementTypes.INSERT :
                return insertCheckColumns;

            case StatementTypes.UPDATE_WHERE :
                return updateCheckColumns;

            case StatementTypes.MERGE :
                boolean[] check =
                    (boolean[]) ArrayUtil.duplicateArray(insertCheckColumns);

                ArrayUtil.orBooleanArray(updateCheckColumns, check);

                return check;
        }

        return null;
    }
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:22,代码来源:StatementDMQL.java

示例8: fireAfterTriggers

import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
void fireAfterTriggers(Session session, int trigVecIndex, RowSetNavigator rowSet) {

        if (!database.isReferentialIntegrity()) {
            return;
        }

        TriggerDef[] trigVec = triggerLists[trigVecIndex];

        for (int i = 0, size = trigVec.length; i < size; i++) {
            TriggerDef td = trigVec[i];
            boolean sqlTrigger = td instanceof TriggerDefSQL;

            if (td.hasOldTable()) {

                //
            }

            if (td.isForEachRow()) {
                while (rowSet.hasNext()) {
                    Object[] oldData = null;
                    Object[] newData = null;

                    switch (td.triggerType) {

                        case Trigger.DELETE_AFTER_ROW:
                            oldData = rowSet.getNext();

                            if (!sqlTrigger) {
                                oldData = (Object[]) ArrayUtil.duplicateArray(oldData);
                            }
                            break;

                        case Trigger.INSERT_AFTER_ROW:
                            newData = rowSet.getNext();

                            if (!sqlTrigger) {
                                newData = (Object[]) ArrayUtil.duplicateArray(newData);
                            }
                            break;
                    }

                    td.pushPair(session, oldData, newData);
                }

                rowSet.beforeFirst();
            } else {
                td.pushPair(session, null, null);
            }
        }
    }
 
开发者ID:s-store,项目名称:sstore-soft,代码行数:51,代码来源:Table.java

示例9: duplicate

import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
public BitMap duplicate() {

        BitMap newMap = new BitMap((int[]) ArrayUtil.duplicateArray(this.map));

        newMap.canChangeSize = this.canChangeSize;
        newMap.initialSize   = this.initialSize;
        newMap.limitPos      = this.limitPos;

        return newMap;
    }
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:11,代码来源:BitMap.java


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