本文整理汇总了Java中org.hsqldb.lib.ArrayUtil.resizeArrayIfDifferent方法的典型用法代码示例。如果您正苦于以下问题:Java ArrayUtil.resizeArrayIfDifferent方法的具体用法?Java ArrayUtil.resizeArrayIfDifferent怎么用?Java ArrayUtil.resizeArrayIfDifferent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.hsqldb.lib.ArrayUtil
的用法示例。
在下文中一共展示了ArrayUtil.resizeArrayIfDifferent方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: insertResult
import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
/**
* Used for subquery inserts. No checks. No identity
* columns.
*/
int insertResult(Session session, Result ins) throws HsqlException {
Record ni = ins.rRoot;
int count = 0;
while (ni != null) {
Object[] newData =
(Object[]) ArrayUtil.resizeArrayIfDifferent(ni.data,
columnCount);
insertData(session, newData);
ni = ni.next;
count++;
}
return count;
}
示例2: 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) {}
}
示例3: 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) {}
}
示例4: union
import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
public void union(Session session, RowSetNavigatorData other) {
Object[] currentData;
int colCount = table.getColumnTypes().length;
removeDuplicates(session);
other.reset();
while (other.hasNext()) {
currentData = other.getNext();
RowIterator it = findFirstRow(currentData);
if (!it.hasNext()) {
currentData =
(Object[]) ArrayUtil.resizeArrayIfDifferent(currentData,
colCount);
add(currentData);
}
}
other.release();
}
示例5: insertIntoTable
import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
/**
* Multi-row insert method. Used for CREATE TABLE AS ... queries.
*/
void insertIntoTable(Session session, Result result) {
PersistentStore store = getRowStore(session);
RowSetNavigator nav = result.initialiseNavigator();
while (nav.hasNext()) {
Object[] data = nav.getNext();
Object[] newData =
(Object[]) ArrayUtil.resizeArrayIfDifferent(data, columnCount);
insertData(session, store, newData);
}
}
示例6: insertResult
import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
/**
* Used for subquery inserts. No checks. No identity
* columns.
*/
void insertResult(Session session, PersistentStore store, Result ins) {
RowSetNavigator nav = ins.initialiseNavigator();
while (nav.hasNext()) {
Object[] data = nav.getNext();
Object[] newData =
(Object[]) ArrayUtil.resizeArrayIfDifferent(data, columnCount);
insertData(session, store, newData);
}
}
示例7: union
import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
public void union(Session session, RowSetNavigatorData other) {
Object[] currentData;
int colCount = table.getColumnTypes().length;
removeDuplicates(session);
other.reset();
while (other.hasNext()) {
currentData = other.getNext();
RowIterator it = findFirstRow(currentData);
if (!it.hasNext()) {
currentData =
(Object[]) ArrayUtil.resizeArrayIfDifferent(currentData,
colCount);
add(currentData);
}
it.release();
}
other.release();
reset();
}
示例8: 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;
}
示例9: insertIntoTable
import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
/**
* Multi-row insert method. Used for CREATE TABLE AS ... queries.
*/
void insertIntoTable(Session session, Result result) {
PersistentStore store = session.sessionData.getRowStore(this);
RowSetNavigator nav = result.initialiseNavigator();
while (nav.hasNext()) {
Object[] data = (Object[]) nav.getNext();
Object[] newData = (Object[]) ArrayUtil.resizeArrayIfDifferent(data, getColumnCount());
insertData(store, newData);
}
}
示例10: insertResult
import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
/**
* Used for subquery inserts. No checks. No identity columns.
*/
void insertResult(PersistentStore store, Result ins) {
RowSetNavigator nav = ins.initialiseNavigator();
while (nav.hasNext()) {
Object[] data = (Object[]) nav.getNext();
Object[] newData = (Object[]) ArrayUtil.resizeArrayIfDifferent(data, getColumnCount());
insertData(store, newData);
}
}
示例11: insertIntoTable
import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
/**
* Multi-row insert method. Used for CREATE TABLE AS ... queries.
*/
void insertIntoTable(Session session, Result result) {
PersistentStore store = getRowStore(session);
RowSetNavigator nav = result.initialiseNavigator();
while (nav.hasNext()) {
Object[] data = (Object[]) nav.getNext();
Object[] newData =
(Object[]) ArrayUtil.resizeArrayIfDifferent(data, columnCount);
insertData(session, store, newData);
}
}
示例12: insertResult
import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
/**
* Used for subquery inserts. No checks. No identity
* columns.
*/
void insertResult(Session session, PersistentStore store, Result ins) {
RowSetNavigator nav = ins.initialiseNavigator();
while (nav.hasNext()) {
Object[] data = (Object[]) nav.getNext();
Object[] newData =
(Object[]) ArrayUtil.resizeArrayIfDifferent(data, columnCount);
insertData(session, store, newData);
}
}
示例13: getSingleRowData
import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
public Object[] getSingleRowData() {
Object[] data = initialiseNavigator().getNext();
data = (Object[]) ArrayUtil.resizeArrayIfDifferent(data,
metaData.getColumnCount());
return data;
}
示例14: getSingleRowData
import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
public Object[] getSingleRowData() {
Object[] data = (Object[]) initialiseNavigator().getNext();
data = (Object[]) ArrayUtil.resizeArrayIfDifferent(data,
metaData.getColumnCount());
return data;
}