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


Java SessionInterface.execute方法代码示例

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


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

示例1: length

import org.hsqldb.SessionInterface; //导入方法依赖的package包/类
public long length(SessionInterface session) {

        if (length > -1) {
            return length;
        }

        ResultLob resultOut = ResultLob.newLobGetLengthRequest(id);
        Result    resultIn  = session.execute(resultOut);

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

        length = ((ResultLob) resultIn).getBlockLength();

        return length;
    }
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:18,代码来源:ClobDataID.java

示例2: setChars

import org.hsqldb.SessionInterface; //导入方法依赖的package包/类
public void setChars(SessionInterface session, long pos, char[] chars,
                     int offset, int len) {

    if (offset != 0 || len != chars.length) {
        if (!isInLimits(chars.length, offset, len)) {
            throw Error.error(ErrorCode.X_22001);
        }

        if (offset != 0 || len != chars.length) {
            char[] newChars = new char[len];

            System.arraycopy(chars, offset, newChars, 0, len);

            chars = newChars;
        }
    }

    ResultLob resultOut = ResultLob.newLobSetCharsRequest(id, pos, chars);
    Result    resultIn  = session.execute(resultOut);

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

    this.length = ((ResultLob) resultIn).getBlockLength();
}
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:27,代码来源:ClobDataID.java

示例3: setBytes

import org.hsqldb.SessionInterface; //导入方法依赖的package包/类
public void setBytes(SessionInterface session, long pos, byte[] bytes,
                     int offset, int len) {

    if (offset != 0 || len != bytes.length) {
        if (!BinaryData.isInLimits(bytes.length, offset, len)) {
            throw new IndexOutOfBoundsException();
        }

        byte[] newbytes = new byte[len];

        System.arraycopy(bytes, offset, newbytes, 0, len);

        bytes = newbytes;
    }

    ResultLob resultOut = ResultLob.newLobSetBytesRequest(id, pos, bytes);
    Result    resultIn  = session.execute(resultOut);

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

    length = ((ResultLob) resultIn).getBlockLength();
}
 
开发者ID:Julien35,项目名称:dev-courses,代码行数:25,代码来源:BlobDataID.java

示例4: setString

import org.hsqldb.SessionInterface; //导入方法依赖的package包/类
public int setString(SessionInterface session, long pos, String str,
                     int offset, int len) {

    if (!isInLimits(str.length(), offset, len)) {
        throw Error.error(ErrorCode.X_22001);
    }

    ResultLob resultOut = ResultLob.newLobSetCharsRequest(id, pos,
        str.substring(offset, len).toCharArray());
    Result resultIn = session.execute(resultOut);

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

    return str.length();
}
 
开发者ID:s-store,项目名称:s-store,代码行数:18,代码来源:ClobDataID.java

示例5: position

import org.hsqldb.SessionInterface; //导入方法依赖的package包/类
public long position(SessionInterface session, ClobData searchstr,
                     long start) {

    ResultLob resultOut = ResultLob.newLobGetCharPatternPositionRequest(id,
        searchstr.getId(), start);
    Result resultIn = session.execute(resultOut);

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

    return ((ResultLob) resultIn).getOffset();
}
 
开发者ID:Julien35,项目名称:dev-courses,代码行数:14,代码来源:ClobDataID.java

示例6: getClob

import org.hsqldb.SessionInterface; //导入方法依赖的package包/类
public ClobData getClob(SessionInterface session, long position,
                        long length) {

    ResultLob resultOut = ResultLob.newLobGetRequest(id, position, length);
    Result    resultIn  = session.execute(resultOut);

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

    return new ClobDataID(((ResultLob) resultIn).getLobID());
}
 
开发者ID:s-store,项目名称:s-store,代码行数:13,代码来源:ClobDataID.java

示例7: getClob

import org.hsqldb.SessionInterface; //导入方法依赖的package包/类
public ClobData getClob(SessionInterface session, long position,
                        long length) {

    ResultLob resultOut = ResultLob.newLobGetRequest(id, position, length);
    Result    resultIn  = session.execute(resultOut);

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

    long lobID = ((ResultLob) resultIn).getLobID();

    return new ClobDataID(lobID);
}
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:15,代码来源:ClobDataID.java

示例8: setBytes

import org.hsqldb.SessionInterface; //导入方法依赖的package包/类
public int setBytes(SessionInterface session, long pos, byte[] bytes,
                    int offset, int len) {

    ResultLob resultOut = ResultLob.newLobSetBytesRequest(id, pos, bytes);
    Result    resultIn  = (ResultLob) session.execute(resultOut);

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

    return bytes.length;
}
 
开发者ID:s-store,项目名称:sstore-soft,代码行数:13,代码来源:BlobDataID.java

示例9: setString

import org.hsqldb.SessionInterface; //导入方法依赖的package包/类
public void setString(SessionInterface session, long pos, String str) {

        ResultLob resultOut = ResultLob.newLobSetCharsRequest(id, pos,
            str.toCharArray());
        Result resultIn = session.execute(resultOut);

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

        this.length = ((ResultLob) resultIn).getBlockLength();
    }
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:13,代码来源:ClobDataID.java

示例10: position

import org.hsqldb.SessionInterface; //导入方法依赖的package包/类
public long position(SessionInterface session, String searchstr,
                     long start) {

    ResultLob resultOut = ResultLob.newLobGetCharPatternPositionRequest(id,
        searchstr.toCharArray(), start);
    Result resultIn = session.execute(resultOut);

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

    return ((ResultLob) resultIn).getOffset();
}
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:14,代码来源:ClobDataID.java

示例11: position

import org.hsqldb.SessionInterface; //导入方法依赖的package包/类
public long position(SessionInterface session, byte[] pattern,
                     long start) {

    ResultLob resultOut = ResultLob.newLobGetBytePatternPositionRequest(id,
        pattern, start);
    Result resultIn = session.execute(resultOut);

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

    return ((ResultLob) resultIn).getOffset();
}
 
开发者ID:Julien35,项目名称:dev-courses,代码行数:14,代码来源:BlobDataID.java

示例12: truncate

import org.hsqldb.SessionInterface; //导入方法依赖的package包/类
public void truncate(SessionInterface session, long len) {

        ResultLob resultOut = ResultLob.newLobTruncateRequest(id, len);
        Result    resultIn  = session.execute(resultOut);

        if (resultIn.isError()) {
            throw resultIn.getException();
        }
    }
 
开发者ID:s-store,项目名称:sstore-soft,代码行数:10,代码来源:BlobDataID.java

示例13: getBytes

import org.hsqldb.SessionInterface; //导入方法依赖的package包/类
public byte[] getBytes(SessionInterface session, long pos, int length) {

        ResultLob resultOut = ResultLob.newLobGetBytesRequest(id, pos, length);
        Result    resultIn  = session.execute(resultOut);

        if (resultIn.isError()) {
            throw Error.error(resultIn);
        }

        return ((ResultLob) resultIn).getByteArray();
    }
 
开发者ID:s-store,项目名称:sstore-soft,代码行数:12,代码来源:BlobDataID.java

示例14: length

import org.hsqldb.SessionInterface; //导入方法依赖的package包/类
public long length(SessionInterface session) {

        ResultLob resultOut = ResultLob.newLobGetLengthRequest(id);
        Result    resultIn  = session.execute(resultOut);

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

        return ((ResultLob) resultIn).getBlockLength();
    }
 
开发者ID:s-store,项目名称:s-store,代码行数:12,代码来源:BlobDataID.java

示例15: position

import org.hsqldb.SessionInterface; //导入方法依赖的package包/类
public long position(SessionInterface session, byte[] pattern,
                     long start) {

    ResultLob resultOut = ResultLob.newLobGetBytePatternPositionRequest(id,
        pattern, start);
    ResultLob resultIn = (ResultLob) session.execute(resultOut);

    return resultIn.getOffset();
}
 
开发者ID:s-store,项目名称:sstore-soft,代码行数:10,代码来源:BlobDataID.java


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