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


Java RowSetNavigator.getCurrent方法代码示例

本文整理汇总了Java中org.hsqldb.navigator.RowSetNavigator.getCurrent方法的典型用法代码示例。如果您正苦于以下问题:Java RowSetNavigator.getCurrent方法的具体用法?Java RowSetNavigator.getCurrent怎么用?Java RowSetNavigator.getCurrent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.hsqldb.navigator.RowSetNavigator的用法示例。


在下文中一共展示了RowSetNavigator.getCurrent方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getCurrent

import org.hsqldb.navigator.RowSetNavigator; //导入方法依赖的package包/类
/**
 * Fetches the current row of the result set.
 *
 * @throws SQLException when result set is closed; result set is empty;
 *   result set is before first; result set is alfter last; no row data is
 *   available.
 * @return Object[]
 */
protected Object[] getCurrent() throws SQLException {

    final RowSetNavigator lnavigator = this.navigator;

    if (lnavigator == null) {
        throw JDBCUtil.sqlException(ErrorCode.X_24501);
    } else if (lnavigator.isEmpty()) {
        throw JDBCUtil.sqlException(ErrorCode.X_24504, ErrorCode.M_RS_EMPTY);
    } else if (lnavigator.isBeforeFirst()) {
        throw JDBCUtil.sqlException(ErrorCode.X_24504,
                                ErrorCode.M_RS_BEFORE_FIRST);
    } else if (lnavigator.isAfterLast()) {
        throw JDBCUtil.sqlException(ErrorCode.X_24504,
                                ErrorCode.M_RS_AFTER_LAST);
    }

    Object[] data = lnavigator.getCurrent();

    if (data == null) {
        throw JDBCUtil.sqlException(ErrorCode.X_24501);
    }

    return data;
}
 
开发者ID:Julien35,项目名称:dev-courses,代码行数:33,代码来源:JDBCResultSet.java

示例2: registerLobForResult

import org.hsqldb.navigator.RowSetNavigator; //导入方法依赖的package包/类
public void registerLobForResult(Result result) {

        RowSetNavigator navigator = result.getNavigator();

        if (navigator == null) {
            registerLobsForRow((Object[]) result.valueData);
        } else {
            while (navigator.next()) {
                Object[] data = navigator.getCurrent();

                registerLobsForRow(data);
            }

            navigator.reset();
        }

        resultLobs.clear();
    }
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:19,代码来源:SessionData.java

示例3: getCurrent

import org.hsqldb.navigator.RowSetNavigator; //导入方法依赖的package包/类
/**
 * Fetches the current row of the result set.
 *
 * @throws SQLException when result set is closed; result set is empty;
 *   result set is before first; result set is alfter last; no row data is
 *   available.
 * @return Object[]
 */
private Object[] getCurrent() throws SQLException {

    final RowSetNavigator lnavigator = this.navigator;

    if (lnavigator == null) {
        throw Util.sqlException(ErrorCode.X_24501);
    } else if (lnavigator.isEmpty()) {
        throw Util.sqlException(ErrorCode.X_24504, ErrorCode.M_RS_EMPTY);
    } else if (lnavigator.isBeforeFirst()) {
        throw Util.sqlException(ErrorCode.X_24504,
                                ErrorCode.M_RS_BEFORE_FIRST);
    } else if (lnavigator.isAfterLast()) {
        throw Util.sqlException(ErrorCode.X_24504,
                                ErrorCode.M_RS_AFTER_LAST);
    }

    Object[] data = lnavigator.getCurrent();

    if (data == null) {
        throw Util.sqlException(ErrorCode.X_24501);
    }

    return data;
}
 
开发者ID:s-store,项目名称:s-store,代码行数:33,代码来源:JDBCResultSet.java

示例4: getBlockAddresses

import org.hsqldb.navigator.RowSetNavigator; //导入方法依赖的package包/类
private int[][] getBlockAddresses(long lobID, int offset, int limit) {

        ResultMetaData meta   = getSpanningBlocks.getParametersMetaData();
        Object[]       params = new Object[meta.getColumnCount()];

        params[GET_LOB_PART.LOB_ID]       = ValuePool.getLong(lobID);
        params[GET_LOB_PART.BLOCK_OFFSET] = ValuePool.getInt(offset);
        params[GET_LOB_PART.BLOCK_LIMIT]  = ValuePool.getInt(limit);

        sysLobSession.sessionContext.pushDynamicArguments(params);

        Result result = getSpanningBlocks.execute(sysLobSession);

        sysLobSession.sessionContext.pop();

        RowSetNavigator navigator = result.getNavigator();
        int             size      = navigator.getSize();
        int[][]         blocks    = new int[size][3];

        for (int i = 0; i < size; i++) {
            navigator.absolute(i);

            Object[] data = navigator.getCurrent();

            blocks[i][LOBS.BLOCK_ADDR] =
                ((Integer) data[LOBS.BLOCK_ADDR]).intValue();
            blocks[i][LOBS.BLOCK_COUNT] =
                ((Integer) data[LOBS.BLOCK_COUNT]).intValue();
            blocks[i][LOBS.BLOCK_OFFSET] =
                ((Integer) data[LOBS.BLOCK_OFFSET]).intValue();
        }

        navigator.release();

        return blocks;
    }
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:37,代码来源:LobManager.java

示例5: getBlockAddresses

import org.hsqldb.navigator.RowSetNavigator; //导入方法依赖的package包/类
private int[][] getBlockAddresses(long lobID, int offset, int limit) {

        ResultMetaData meta     = getSpanningBlocks.getParametersMetaData();
        Object         params[] = new Object[meta.getColumnCount()];

        params[GET_LOB_PART.LOB_ID]       = ValuePool.getLong(lobID);
        params[GET_LOB_PART.BLOCK_OFFSET] = ValuePool.getInt(offset);
        params[GET_LOB_PART.BLOCK_LIMIT]  = ValuePool.getInt(limit);

        sysLobSession.sessionContext.pushDynamicArguments(params);

        Result result = getSpanningBlocks.execute(sysLobSession);

        sysLobSession.sessionContext.pop();

        RowSetNavigator navigator = result.getNavigator();
        int             size      = navigator.getSize();
        int[][]         blocks    = new int[size][3];

        for (int i = 0; i < size; i++) {
            navigator.absolute(i);

            Object[] data = navigator.getCurrent();

            blocks[i][LOBS.BLOCK_ADDR] =
                ((Integer) data[LOBS.BLOCK_ADDR]).intValue();
            blocks[i][LOBS.BLOCK_COUNT] =
                ((Integer) data[LOBS.BLOCK_COUNT]).intValue();
            blocks[i][LOBS.BLOCK_OFFSET] =
                ((Integer) data[LOBS.BLOCK_OFFSET]).intValue();
        }

        navigator.release();

        return blocks;
    }
 
开发者ID:Julien35,项目名称:dev-courses,代码行数:37,代码来源:LobManager.java

示例6: getNewLobID

import org.hsqldb.navigator.RowSetNavigator; //导入方法依赖的package包/类
private Long getNewLobID() {

        Result result = getNextLobId.execute(sysLobSession);

        if (result.isError()) {
            return Long.valueOf(0);
        }

        RowSetNavigator navigator = result.getNavigator();
        boolean         next      = navigator.next();

        if (!next) {
            navigator.release();

            return Long.valueOf(0);
        }

        Object[] data = navigator.getCurrent();

        navigator.release();

        return (Long) data[0];
    }
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:24,代码来源:LobManager.java

示例7: getNewLobID

import org.hsqldb.navigator.RowSetNavigator; //导入方法依赖的package包/类
private long getNewLobID(Session session) {

        Result result = getNextLobId.execute(session);

        if (result.isError()) {
            return 0;
        }

        RowSetNavigator navigator = result.getNavigator();
        boolean         next      = navigator.next();

        if (!next) {
            navigator.close();

            return 0;
        }

        Object[] data = navigator.getCurrent();

        return ((Long) data[0]).longValue();
    }
 
开发者ID:s-store,项目名称:sstore-soft,代码行数:22,代码来源:LobManager.java

示例8: getLobHeader

import org.hsqldb.navigator.RowSetNavigator; //导入方法依赖的package包/类
private Object[] getLobHeader(long lobID) {

        ResultMetaData meta   = getLob.getParametersMetaData();
        Object[]       params = new Object[meta.getColumnCount()];

        params[0] = ValuePool.getLong(lobID);

        sysLobSession.sessionContext.pushDynamicArguments(params);

        Result result = getLob.execute(sysLobSession);

        sysLobSession.sessionContext.pop();

        if (result.isError()) {
            throw result.getException();
        }

        RowSetNavigator navigator = result.getNavigator();
        boolean         next      = navigator.next();
        Object[]        data      = null;

        if (next) {
            data = navigator.getCurrent();
        }

        navigator.release();

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

示例9: getLobCount

import org.hsqldb.navigator.RowSetNavigator; //导入方法依赖的package包/类
public int getLobCount() {

        writeLock.lock();

        try {
            sysLobSession.sessionContext.pushDynamicArguments(new Object[]{});

            Result result = getLobCount.execute(sysLobSession);

            sysLobSession.sessionContext.pop();

            RowSetNavigator navigator = result.getNavigator();
            boolean         next      = navigator.next();

            if (!next) {
                navigator.release();

                return 0;
            }

            Object[] data = navigator.getCurrent();

            return ((Number) data[0]).intValue();
        } finally {
            writeLock.unlock();
        }
    }
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:28,代码来源:LobManager.java

示例10: getLastPart

import org.hsqldb.navigator.RowSetNavigator; //导入方法依赖的package包/类
private long[] getLastPart(long lobID) {

        ResultMetaData meta   = getLastPart.getParametersMetaData();
        Object[]       params = new Object[meta.getColumnCount()];

        params[GET_LOB_PART.LOB_ID] = ValuePool.getLong(lobID);

        sysLobSession.sessionContext.pushDynamicArguments(params);

        Result result = getLastPart.execute(sysLobSession);

        sysLobSession.sessionContext.pop();

        RowSetNavigator navigator = result.getNavigator();
        int             size      = navigator.getSize();
        long[]          blocks    = new long[6];

        if (size == 0) {
            blocks[ALLOC_PART.LOB_ID] = lobID;
        } else {
            navigator.absolute(0);

            Object[] data = navigator.getCurrent();

            for (int j = 0; j < blocks.length; j++) {
                blocks[j] = ((Number) data[j]).longValue();
            }
        }

        navigator.release();

        return blocks;
    }
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:34,代码来源:LobManager.java

示例11: getBlockAddresses

import org.hsqldb.navigator.RowSetNavigator; //导入方法依赖的package包/类
int[][] getBlockAddresses(Session session, long lobID, int offset,
                          int limit) {

    ResultMetaData meta     = getLobPart.getParametersMetaData();
    Object         params[] = new Object[meta.getColumnCount()];

    params[0] = Long.valueOf(lobID);
    params[1] = Integer.valueOf(offset);
    params[2] = Integer.valueOf(limit);

    session.sessionContext.pushDynamicArguments(params);

    Result result = getLobPart.execute(session);

    session.sessionContext.popDynamicArguments();

    RowSetNavigator navigator = result.getNavigator();
    int             size      = navigator.getSize();
    int[][]         blocks    = new int[size][3];

    for (int i = 0; i < size; i++) {
        navigator.absolute(i);

        Object[] data = navigator.getCurrent();

        blocks[i][0] = ((Integer) data[LOBS.BLOCK_ADDR]).intValue();
        blocks[i][1] = ((Integer) data[LOBS.BLOCK_COUNT]).intValue();
        blocks[i][2] = ((Integer) data[LOBS.BLOCK_OFFSET]).intValue();
    }

    navigator.close();

    return blocks;
}
 
开发者ID:s-store,项目名称:sstore-soft,代码行数:35,代码来源:LobManager.java

示例12: getLastPart

import org.hsqldb.navigator.RowSetNavigator; //导入方法依赖的package包/类
private long[] getLastPart(long lobID) {

        ResultMetaData meta     = getLastPart.getParametersMetaData();
        Object         params[] = new Object[meta.getColumnCount()];

        params[GET_LOB_PART.LOB_ID] = ValuePool.getLong(lobID);

        sysLobSession.sessionContext.pushDynamicArguments(params);

        Result result = getLastPart.execute(sysLobSession);

        sysLobSession.sessionContext.pop();

        RowSetNavigator navigator = result.getNavigator();
        int             size      = navigator.getSize();
        long[]          blocks    = new long[6];

        if (size == 0) {
            blocks[ALLOC_PART.LOB_ID] = lobID;
        } else {
            navigator.absolute(0);

            Object[] data = navigator.getCurrent();

            for (int j = 0; j < blocks.length; j++) {
                blocks[j] = ((Number) data[j]).longValue();
            }
        }

        navigator.release();

        return blocks;
    }
 
开发者ID:Julien35,项目名称:dev-courses,代码行数:34,代码来源:LobManager.java

示例13: getLobHeader

import org.hsqldb.navigator.RowSetNavigator; //导入方法依赖的package包/类
private Object[] getLobHeader(Session session, long lobID) {

        ResultMetaData meta     = getLob.getParametersMetaData();
        Object         params[] = new Object[meta.getColumnCount()];

        params[0] = Long.valueOf(lobID);

        session.sessionContext.pushDynamicArguments(params);

        Result result = getLob.execute(session);

        session.sessionContext.popDynamicArguments();

        if (result.isError()) {
            return null;
        }

        RowSetNavigator navigator = result.getNavigator();
        boolean         next      = navigator.next();

        if (!next) {
            navigator.close();

            return null;
        }

        Object[] data = navigator.getCurrent();

        return data;
    }
 
开发者ID:s-store,项目名称:s-store,代码行数:31,代码来源:LobManager.java

示例14: getLobHeader

import org.hsqldb.navigator.RowSetNavigator; //导入方法依赖的package包/类
private Object[] getLobHeader(long lobID) {

        ResultMetaData meta     = getLob.getParametersMetaData();
        Object         params[] = new Object[meta.getColumnCount()];

        params[0] = ValuePool.getLong(lobID);

        sysLobSession.sessionContext.pushDynamicArguments(params);

        Result result = getLob.execute(sysLobSession);

        sysLobSession.sessionContext.pop();

        if (result.isError()) {
            throw result.getException();
        }

        RowSetNavigator navigator = result.getNavigator();
        boolean         next      = navigator.next();
        Object[]        data      = null;

        if (next) {
            data = navigator.getCurrent();
        }

        navigator.release();

        return data;
    }
 
开发者ID:Julien35,项目名称:dev-courses,代码行数:30,代码来源:LobManager.java

示例15: getParts

import org.hsqldb.navigator.RowSetNavigator; //导入方法依赖的package包/类
private long[][] getParts(long lobID, long offset, long limit) {

        ResultMetaData meta     = getSpanningParts.getParametersMetaData();
        Object         params[] = new Object[meta.getColumnCount()];

        params[GET_LOB_PART.LOB_ID]       = ValuePool.getLong(lobID);
        params[GET_LOB_PART.BLOCK_OFFSET] = ValuePool.getLong(offset);
        params[GET_LOB_PART.BLOCK_LIMIT]  = ValuePool.getLong(limit);

        sysLobSession.sessionContext.pushDynamicArguments(params);

        Result result = getSpanningParts.execute(sysLobSession);

        sysLobSession.sessionContext.pop();

        RowSetNavigator navigator = result.getNavigator();
        int             size      = navigator.getSize();
        long[][]        blocks    = new long[size][6];

        for (int i = 0; i < size; i++) {
            navigator.absolute(i);

            Object[] data = navigator.getCurrent();

            for (int j = 0; j < blocks[i].length; j++) {
                blocks[i][j] = ((Number) data[j]).longValue();
            }
        }

        navigator.release();

        return blocks;
    }
 
开发者ID:Julien35,项目名称:dev-courses,代码行数:34,代码来源:LobManager.java


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