本文整理汇总了Java中org.hsqldb.lib.ArrayUtil.intIndexesToBooleanArray方法的典型用法代码示例。如果您正苦于以下问题:Java ArrayUtil.intIndexesToBooleanArray方法的具体用法?Java ArrayUtil.intIndexesToBooleanArray怎么用?Java ArrayUtil.intIndexesToBooleanArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.hsqldb.lib.ArrayUtil
的用法示例。
在下文中一共展示了ArrayUtil.intIndexesToBooleanArray方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: Index
import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
/**
* Constructor declaration
*
*
* @param name HsqlName of the index
* @param table table of the index
* @param column array of column indexes
* @param type array of column types
* @param unique is this a unique index
* @param constraint does this index belonging to a constraint
* @param forward is this an auto-index for an FK that refers to a table defined after this table
* @param visColumns count of visible columns
*/
Index(HsqlName name, Table table, int column[], int type[],
boolean unique, boolean constraint, boolean forward,
int visColumns) {
indexName = name;
colIndex = column;
colType = type;
isUnique = unique;
isConstraint = constraint;
isForward = forward;
colIndex_0 = colIndex[0];
colType_0 = colType[0];
visibleColumns = visColumns;
isExact = colIndex.length == visibleColumns;
colCheck = table.getNewColumnCheckList();
ArrayUtil.intIndexesToBooleanArray(colIndex, colCheck);
}
示例2: Index
import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
/**
* Constructor declaration
*
*
* @param name HsqlName of the index
* @param table table of the index
* @param column array of column indexes
* @param type array of column types
* @param unique is this a unique index
* @param constraint does this index belonging to a constraint
* @param forward is this an auto-index for an FK that refers to a table defined after this table
* @param visColumns count of visible columns
*/
Index(Database database, HsqlName name, Table table, int[] column,
int[] colTypes, boolean isPk, boolean unique, boolean constraint,
boolean forward, int[] pkcols, int[] pktypes, boolean temp) {
this.table = table;
this.indexName = name;
this.colIndex = column;
this.colTypes = colTypes;
this.pkCols = pkcols;
this.pkTypes = pktypes;
isUnique = unique;
isConstraint = constraint;
isForward = forward;
useRowId = (!isUnique && pkCols.length == 0) || (colIndex.length == 0);
colCheck = table.getNewColumnCheckList();
ArrayUtil.intIndexesToBooleanArray(colIndex, colCheck);
updatableIterators = new IndexRowIterator(null, null, null);
updatableIterators.next = updatableIterators.last = updatableIterators;
collation = database.collation;
isTemp = temp;
onCommitPreserve = table.onCommitPreserve;
}
示例3: IndexAVL
import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
/**
* Constructor declaration
*
* @param name HsqlName of the index
* @param id persistnece id
* @param table table of the index
* @param columns array of column indexes
* @param descending boolean[]
* @param nullsLast boolean[]
* @param colTypes array of column types
* @param pk if index is for a primary key
* @param unique is this a unique index
* @param constraint does this index belonging to a constraint
* @param forward is this an auto-index for an FK that refers to a table
* defined after this table
*/
public IndexAVL(HsqlName name, long id, TableBase table, int[] columns,
boolean[] descending, boolean[] nullsLast,
Type[] colTypes, boolean pk, boolean unique,
boolean constraint, boolean forward) {
this.persistenceId = id;
this.name = name;
this.colIndex = columns;
this.colTypes = colTypes;
this.colDesc = descending == null ? new boolean[columns.length]
: descending;
this.nullsLast = nullsLast == null ? new boolean[columns.length]
: nullsLast;
this.isPK = pk;
this.isUnique = unique;
this.isConstraint = constraint;
this.isForward = forward;
this.table = table;
this.colCheck = table.getNewColumnCheckList();
this.asArray = new IndexUse[]{ new IndexUse(this, colIndex.length) };
ArrayUtil.intIndexesToBooleanArray(colIndex, colCheck);
this.defaultColMap = new int[columns.length];
ArrayUtil.fillSequence(defaultColMap);
boolean simpleOrder = colIndex.length > 0;
for (int i = 0; i < colDesc.length; i++) {
if (this.colDesc[i] || this.nullsLast[i]) {
simpleOrder = false;
}
}
isSimpleOrder = simpleOrder;
isSimple = isSimpleOrder && colIndex.length == 1;
nullData = new Object[colIndex.length];
}
示例4: IndexAVL
import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
/**
* Constructor declaration
*
* @param name HsqlName of the index
* @param id persistnece id
* @param table table of the index
* @param columns array of column indexes
* @param descending boolean[]
* @param nullsLast boolean[]
* @param colTypes array of column types
* @param unique is this a unique index
* @param constraint does this index belonging to a constraint
* @param forward is this an auto-index for an FK that refers to a table
* defined after this table
*/
public IndexAVL(HsqlName name, long id, TableBase table, int[] columns,
boolean[] descending, boolean[] nullsLast,
Type[] colTypes, boolean pk, boolean unique,
boolean constraint, boolean forward) {
persistenceId = id;
this.name = name;
this.colIndex = columns;
this.colTypes = colTypes;
this.colDesc = descending == null ? new boolean[columns.length]
: descending;
this.nullsLast = nullsLast == null ? new boolean[columns.length]
: nullsLast;
isUnique = unique;
isConstraint = constraint;
isForward = forward;
this.table = table;
this.pkCols = table.getPrimaryKey();
this.pkTypes = table.getPrimaryKeyTypes();
useRowId = (!isUnique && pkCols.length == 0) || (colIndex.length == 0);
colCheck = table.getNewColumnCheckList();
ArrayUtil.intIndexesToBooleanArray(colIndex, colCheck);
defaultColMap = new int[columns.length];
ArrayUtil.fillSequence(defaultColMap);
}
示例5: Index
import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
/**
* Constructor declaration
*
*
* @param name HsqlName of the index
* @param table table of the index
* @param column array of column indexes
* @param type array of column types
* @param unique is this a unique index
* @param constraint does this index belonging to a constraint
* @param forward is this an auto-index for an FK that refers to a table defined after this table
* @param visColumns count of visible columns
*/
Index(Database database, HsqlName name, Table table, int[] column,
int[] colTypes, boolean isPk, boolean unique, boolean constraint,
boolean forward, int[] pkcols, int[] pktypes, boolean temp) {
this.table = table;
this.indexName = name;
this.colIndex = column;
this.colTypes = colTypes;
this.pkCols = pkcols;
this.pkTypes = pktypes;
isUnique = unique;
isConstraint = constraint;
isForward = forward;
useRowId = (!isUnique && pkCols.length == 0)
|| (colIndex.length == 0);
colCheck = table.getNewColumnCheckList();
ArrayUtil.intIndexesToBooleanArray(colIndex, colCheck);
updatableIterators = new IndexRowIterator(null, null, null);
updatableIterators.next = updatableIterators.last =
updatableIterators;
collation = database.collation;
isTemp = temp;
onCommitPreserve = table.onCommitPreserve;
}
示例6: updateConstraintLists
import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
void updateConstraintLists() {
int fkCount = 0;
int mainCount = 0;
int checkCount = 0;
hasReferentialAction = false;
for (int i = 0; i < constraintList.length; i++) {
switch (constraintList[i].getConstraintType()) {
case SchemaObject.ConstraintTypes.FOREIGN_KEY :
fkCount++;
break;
case SchemaObject.ConstraintTypes.MAIN :
mainCount++;
break;
case SchemaObject.ConstraintTypes.CHECK :
if (constraintList[i].isNotNull()) {
break;
}
checkCount++;
break;
}
}
fkConstraints = fkCount == 0 ? Constraint.emptyArray
: new Constraint[fkCount];
fkCount = 0;
fkMainConstraints = mainCount == 0 ? Constraint.emptyArray
: new Constraint[mainCount];
mainCount = 0;
checkConstraints = checkCount == 0 ? Constraint.emptyArray
: new Constraint[checkCount];
checkCount = 0;
colRefFK = new boolean[columnCount];
colMainFK = new boolean[columnCount];
for (int i = 0; i < constraintList.length; i++) {
switch (constraintList[i].getConstraintType()) {
case SchemaObject.ConstraintTypes.FOREIGN_KEY :
fkConstraints[fkCount] = constraintList[i];
ArrayUtil.intIndexesToBooleanArray(
constraintList[i].getRefColumns(), colRefFK);
fkCount++;
break;
case SchemaObject.ConstraintTypes.MAIN :
fkMainConstraints[mainCount] = constraintList[i];
ArrayUtil.intIndexesToBooleanArray(
constraintList[i].getMainColumns(), colMainFK);
if (constraintList[i].hasTriggeredAction()) {
hasReferentialAction = true;
}
mainCount++;
break;
case SchemaObject.ConstraintTypes.CHECK :
if (constraintList[i].isNotNull()) {
break;
}
checkConstraints[checkCount] = constraintList[i];
checkCount++;
break;
}
}
}