本文整理汇总了Java中org.hsqldb.lib.ArrayUtil.projectRow方法的典型用法代码示例。如果您正苦于以下问题:Java ArrayUtil.projectRow方法的具体用法?Java ArrayUtil.projectRow怎么用?Java ArrayUtil.projectRow使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.hsqldb.lib.ArrayUtil
的用法示例。
在下文中一共展示了ArrayUtil.projectRow方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: resolveTypesPartOne
import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
void resolveTypesPartOne(Session session) {
if (isPartOneResolved) {
return;
}
ArrayUtil.projectRowReverse(leftQueryExpression.unionColumnTypes,
leftQueryExpression.unionColumnMap,
unionColumnTypes);
leftQueryExpression.resolveTypesPartOne(session);
ArrayUtil.projectRow(leftQueryExpression.unionColumnTypes,
leftQueryExpression.unionColumnMap,
unionColumnTypes);
ArrayUtil.projectRowReverse(rightQueryExpression.unionColumnTypes,
rightQueryExpression.unionColumnMap,
unionColumnTypes);
rightQueryExpression.resolveTypesPartOne(session);
ArrayUtil.projectRow(rightQueryExpression.unionColumnTypes,
rightQueryExpression.unionColumnMap,
unionColumnTypes);
isPartOneResolved = true;
}
示例2: addAdjusted
import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
void addAdjusted(Object[] data, int[] columnMap) {
try {
if (columnMap == null) {
data = (Object[]) ArrayUtil.resizeArrayIfDifferent(data,
visibleColumnCount);
} else {
Object[] newData = new Object[visibleColumnCount];
ArrayUtil.projectRow(data, columnMap, newData);
data = newData;
}
add(data);
} catch (HsqlException e) {}
}
示例3: resolveTypesPartOne
import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
void resolveTypesPartOne(Session session) {
ArrayUtil.projectRowReverse(leftQueryExpression.unionColumnTypes,
leftQueryExpression.unionColumnMap,
unionColumnTypes);
leftQueryExpression.resolveTypesPartOne(session);
ArrayUtil.projectRow(leftQueryExpression.unionColumnTypes,
leftQueryExpression.unionColumnMap,
unionColumnTypes);
ArrayUtil.projectRowReverse(rightQueryExpression.unionColumnTypes,
rightQueryExpression.unionColumnMap,
unionColumnTypes);
rightQueryExpression.resolveTypesPartOne(session);
ArrayUtil.projectRow(rightQueryExpression.unionColumnTypes,
rightQueryExpression.unionColumnMap,
unionColumnTypes);
}
示例4: addAdjusted
import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
private void addAdjusted(Object[] data, int[] columnMap) {
try {
if (columnMap == null) {
data = (Object[]) ArrayUtil.resizeArrayIfDifferent(data,
table.getColumnCount());
} else {
Object[] newData = new Object[table.getColumnCount()];
ArrayUtil.projectRow(data, columnMap, newData);
data = newData;
}
Row row = (Row) store.getNewCachedObject(session, data);
store.indexRow(null, row);
size++;
} catch (HsqlException e) {}
}
示例5: createPrimaryKey
import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
/**
* Creates a single or multi-column primary key and index. sets the
* colTypes array. Finalises the creation of the table. ([email protected])
*/
public void createPrimaryKey(HsqlName indexName, int[] columns,
boolean columnsNotNull) {
if (columns == null) {
columns = ValuePool.emptyIntArray;
}
for (int i = 0; i < columns.length; i++) {
getColumn(columns[i]).setPrimaryKey(true);
}
setColumnStructures();
Type[] primaryKeyTypes = new Type[columns.length];
ArrayUtil.projectRow(colTypes, columns, primaryKeyTypes);
HsqlName name = indexName;
if (name == null) {
name = database.nameManager.newAutoName("IDX", getSchemaName(),
getName(), SchemaObject.INDEX);
}
createPrimaryIndex(columns, primaryKeyTypes, name);
setBestRowIdentifiers();
}
示例6: projectData
import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
Object[] projectData(Object[] data, int[] columnMap) {
if (columnMap == null) {
data = (Object[]) ArrayUtil.resizeArrayIfDifferent(data,
visibleColumnCount);
} else {
Object[] newData = new Object[visibleColumnCount];
ArrayUtil.projectRow(data, columnMap, newData);
data = newData;
}
return data;
}
示例7: createPrimaryKey
import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
/**
* Creates a single or multi-column primary key and index. sets the colTypes
* array. Finalises the creation of the table. ([email protected])
*/
public void createPrimaryKey(HsqlName indexName, int[] columns, boolean columnsNotNull) {
if (primaryKeyCols != null) {
throw Error.runtimeError(ErrorCode.U_S0500, "Table");
}
if (columns == null) {
columns = ValuePool.emptyIntArray;
} else {
for (int i = 0; i < columns.length; i++) {
getColumn(columns[i]).setPrimaryKey(true);
}
}
primaryKeyCols = columns;
setColumnStructures();
primaryKeyTypes = new Type[primaryKeyCols.length];
ArrayUtil.projectRow(colTypes, primaryKeyCols, primaryKeyTypes);
primaryKeyColsSequence = new int[primaryKeyCols.length];
ArrayUtil.fillSequence(primaryKeyColsSequence);
HsqlName name = indexName;
if (name == null) {
name = database.nameManager.newAutoName("IDX", getSchemaName(), getName(), SchemaObject.INDEX);
}
createPrimaryIndex(primaryKeyCols, primaryKeyTypes, name);
setBestRowIdentifiers();
}
示例8: newIndex
import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
public Index newIndex(Table table, Index index, int[] columns) {
boolean[] modeFlags = new boolean[columns.length];
Type[] colTypes = new Type[columns.length];
ArrayUtil.projectRow(table.getColumnTypes(), columns, colTypes);
return newIndex(index.getName(), index.getPersistenceId(), table,
columns, modeFlags, modeFlags, colTypes, false, false,
false, false);
}
示例9: createPrimaryKey
import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
/**
* Creates a single or multi-column primary key and index. sets the
* colTypes array. Finalises the creation of the table. ([email protected])
*/
public void createPrimaryKey(HsqlName indexName, int[] columns,
boolean columnsNotNull) {
if (primaryKeyCols != null) {
throw Error.runtimeError(ErrorCode.U_S0500, "Table");
}
if (columns == null) {
columns = ValuePool.emptyIntArray;
}
for (int i = 0; i < columns.length; i++) {
getColumn(columns[i]).setPrimaryKey(true);
}
primaryKeyCols = columns;
setColumnStructures();
primaryKeyTypes = new Type[primaryKeyCols.length];
ArrayUtil.projectRow(colTypes, primaryKeyCols, primaryKeyTypes);
primaryKeyColsSequence = new int[primaryKeyCols.length];
ArrayUtil.fillSequence(primaryKeyColsSequence);
HsqlName name = indexName;
if (name == null) {
name = database.nameManager.newAutoName("IDX", getSchemaName(),
getName(), SchemaObject.INDEX);
}
createPrimaryIndex(primaryKeyCols, primaryKeyTypes, name);
setBestRowIdentifiers();
}
示例10: alterIndex
import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
void alterIndex(Index index, int[] columns) {
PersistentStore store =
database.persistentStoreCollection.getStore(table);
int position = index.getPosition();
boolean[] modeFlags = new boolean[columns.length];
Type[] colTypes = new Type[columns.length];
ArrayUtil.projectRow(table.getColumnTypes(), columns, colTypes);
Index newIndex = database.logger.newIndex(index.getName(),
index.getPersistenceId(), table, columns, modeFlags, modeFlags,
colTypes, false, false, false, false);
newIndex.setPosition(position);
table.getIndexList()[position] = newIndex;
table.setBestRowIdentifiers();
Index[] indexes = store.getAccessorKeys();
indexes[position] = newIndex;
store.reindex(session, newIndex);
}
示例11: getNewMetaData
import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
public ResultMetaData getNewMetaData(int[] columnMap) {
ResultMetaData newMeta = newResultMetaData(columnMap.length);
ArrayUtil.projectRow(columnLabels, columnMap, newMeta.columnLabels);
ArrayUtil.projectRow(columnTypes, columnMap, newMeta.columnTypes);
ArrayUtil.projectRow(columns, columnMap, newMeta.columns);
return newMeta;
}