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


Java ArrayUtil.resizeArrayIfDifferent方法代码示例

本文整理汇总了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;
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:24,代码来源:Table.java

示例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) {}
    }
 
开发者ID:s-store,项目名称:sstore-soft,代码行数:22,代码来源:RowSetNavigatorData.java

示例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) {}
    }
 
开发者ID:Julien35,项目名称:dev-courses,代码行数:18,代码来源:RowSetNavigatorDataTable.java

示例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();
    }
 
开发者ID:Julien35,项目名称:dev-courses,代码行数:25,代码来源:RowSetNavigatorDataTable.java

示例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);
    }
}
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:17,代码来源:Table.java

示例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);
    }
}
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:17,代码来源:Table.java

示例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();
    }
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:28,代码来源:RowSetNavigatorDataTable.java

示例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;
    }
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:16,代码来源:RowSetNavigatorData.java

示例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);
    }
}
 
开发者ID:s-store,项目名称:s-store,代码行数:16,代码来源:Table.java

示例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);
    }
}
 
开发者ID:s-store,项目名称:s-store,代码行数:15,代码来源:Table.java

示例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);
    }
}
 
开发者ID:Julien35,项目名称:dev-courses,代码行数:17,代码来源:Table.java

示例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);
    }
}
 
开发者ID:Julien35,项目名称:dev-courses,代码行数:17,代码来源:Table.java

示例13: getSingleRowData

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

        Object[] data = initialiseNavigator().getNext();

        data = (Object[]) ArrayUtil.resizeArrayIfDifferent(data,
                metaData.getColumnCount());

        return data;
    }
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:10,代码来源:Result.java

示例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;
    }
 
开发者ID:s-store,项目名称:sstore-soft,代码行数:10,代码来源:Result.java


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