本文整理汇总了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;
}
示例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) {}
}
}
示例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;
}
示例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);
}
}
}
示例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;
}
示例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);
}
}
}
示例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;
}
示例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);
}
}
}
示例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;
}