本文整理汇总了Java中org.hsqldb.SessionInterface类的典型用法代码示例。如果您正苦于以下问题:Java SessionInterface类的具体用法?Java SessionInterface怎么用?Java SessionInterface使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SessionInterface类属于org.hsqldb包,在下文中一共展示了SessionInterface类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: position
import org.hsqldb.SessionInterface; //导入依赖的package包/类
/** @todo - implement */
public long position(SessionInterface session, BlobData data,
BlobData otherData, Type otherType, long offset) {
if (data == null || otherData == null) {
return -1L;
}
long otherLength = data.bitLength(session);
if (offset + otherLength > data.bitLength(session)) {
return -1;
}
throw Error.runtimeError(ErrorCode.U_S0500, "BitType");
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:17,代码来源:BitType.java
示例2: newDataHeadResult
import org.hsqldb.SessionInterface; //导入依赖的package包/类
public static Result newDataHeadResult(SessionInterface session,
Result source, int offset,
int count) {
if (offset + count > source.navigator.getSize()) {
count = source.navigator.getSize() - offset;
}
Result result = newResult(ResultConstants.DATAHEAD);
result.metaData = source.metaData;
result.navigator = new RowSetNavigatorClient(source.navigator, offset,
count);
result.navigator.setId(source.navigator.getId());
result.setSession(session);
result.rsProperties = source.rsProperties;
result.fetchSize = source.fetchSize;
return result;
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:23,代码来源:Result.java
示例3: convertToDefaultType
import org.hsqldb.SessionInterface; //导入依赖的package包/类
public Object convertToDefaultType(SessionInterface session, Object a) {
if (a == null) {
return null;
}
if (a instanceof String) {
return convertToType(session, a, Type.SQL_VARCHAR);
} else if (a instanceof Integer) {
return convertToType(session, a, Type.SQL_INTEGER);
} else if (a instanceof Long) {
return convertToType(session, a, Type.SQL_BIGINT);
} else if (a instanceof BigDecimal) {
return convertToType(session, a, Type.SQL_DECIMAL);
} else {
throw Error.error(ErrorCode.X_42561);
}
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:19,代码来源:IntervalType.java
示例4: position
import org.hsqldb.SessionInterface; //导入依赖的package包/类
/** @todo - implement */
public long position(SessionInterface session, BlobData data,
BlobData otherData, Type otherType, long offset) {
if (data == null || otherData == null) {
return -1L;
}
long otherLength = ((BlobData) data).bitLength(session);
if (offset + otherLength > data.bitLength(session)) {
return -1;
}
throw Error.runtimeError(ErrorCode.U_S0500, "BitType");
}
开发者ID:s-store,项目名称:sstore-soft,代码行数:17,代码来源:BitType.java
示例5: 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
示例6: convertToDefaultType
import org.hsqldb.SessionInterface; //导入依赖的package包/类
public Object convertToDefaultType(SessionInterface session, Object a) {
if (a == null) {
return a;
}
if (a instanceof byte[]) {
BinaryData data = new BinaryData((byte[]) a, ((byte[]) a).length);
return convertToTypeLimits(session, data);
} else if (a instanceof BinaryData) {
return convertToTypeLimits(session, a);
} else if (a instanceof String) {
return convertToType(session, a, Type.SQL_VARCHAR);
} else if (a instanceof Boolean) {
return convertToType(session, a, Type.SQL_BOOLEAN);
} else if (a instanceof Integer) {
return convertToType(session, a, Type.SQL_INTEGER);
} else if (a instanceof Long) {
return convertToType(session, a, Type.SQL_BIGINT);
}
throw Error.error(ErrorCode.X_22501);
}
开发者ID:Julien35,项目名称:dev-courses,代码行数:25,代码来源:BitType.java
示例7: setBytes
import org.hsqldb.SessionInterface; //导入依赖的package包/类
public int setBytes(SessionInterface session, long pos, byte[] bytes,
int offset, int length) {
if (!isInLimits(data.length, pos, 0)) {
throw new IndexOutOfBoundsException();
}
if (!isInLimits(data.length, pos, length)) {
data = (byte[]) ArrayUtil.resizeArray(data, (int) pos + length);
}
System.arraycopy(bytes, offset, data, (int) pos, length);
bitLength = data.length * 8;
return length;
}
开发者ID:s-store,项目名称:sstore-soft,代码行数:18,代码来源:BinaryData.java
示例8: substring
import org.hsqldb.SessionInterface; //导入依赖的package包/类
public BlobData substring(SessionInterface session, BlobData data,
long offset, long length, boolean hasLength) {
long end;
long dataLength = data.length(session);
if (hasLength) {
end = offset + length;
} else {
end = dataLength > offset ? dataLength
: offset;
}
if (offset > end) {
throw Error.error(ErrorCode.X_22011);
}
if (offset > end || end < 0) {
// return zero length data
offset = 0;
end = 0;
}
if (offset < 0) {
offset = 0;
}
if (end > dataLength) {
end = dataLength;
}
length = end - offset;
// change method signature to take long
byte[] bytes = ((BlobData) data).getBytes(session, offset,
(int) length);
return new BinaryData(bytes, false);
}
开发者ID:s-store,项目名称:sstore-soft,代码行数:41,代码来源:BinaryType.java
示例9: position
import org.hsqldb.SessionInterface; //导入依赖的package包/类
public long position(SessionInterface session, BlobData pattern,
long start) {
ResultLob resultOut = ResultLob.newLobGetCharPatternPositionRequest(id,
pattern.getId(), start);
Result resultIn = session.execute(resultOut);
if (resultIn.isError()) {
throw resultIn.getException();
}
return ((ResultLob) resultIn).getOffset();
}
开发者ID:Julien35,项目名称:dev-courses,代码行数:14,代码来源:BlobDataID.java
示例10: convertToType
import org.hsqldb.SessionInterface; //导入依赖的package包/类
public Object convertToType(SessionInterface session, Object a,
Type otherType) {
if (a == null) {
return null;
}
if (otherType == null) {
return a;
}
if (!otherType.isArrayType()) {
throw Error.error(ErrorCode.X_42562);
}
Object[] arra = (Object[]) a;
if (arra.length > maxCardinality) {
throw Error.error(ErrorCode.X_2202F);
}
Type otherComponent = otherType.collectionBaseType();
if (dataType.equals(otherComponent)) {
return a;
}
Object[] arrb = new Object[arra.length];
for (int i = 0; i < arra.length; i++) {
arrb[i] = dataType.convertToType(session, arra[i], otherComponent);
}
return arrb;
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:36,代码来源:ArrayType.java
示例11: convertToDefaultType
import org.hsqldb.SessionInterface; //导入依赖的package包/类
public Object convertToDefaultType(SessionInterface session, Object a) {
if (a == null) {
return null;
}
if (a instanceof Boolean) {
return a;
} else if (a instanceof String) {
return convertToType(session, a, Type.SQL_VARCHAR);
}
throw Error.error(ErrorCode.X_42561);
}
开发者ID:s-store,项目名称:s-store,代码行数:15,代码来源:BooleanType.java
示例12: 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:Julien35,项目名称:dev-courses,代码行数:12,代码来源:BlobDataID.java
示例13: convertToDatetimeSpecial
import org.hsqldb.SessionInterface; //导入依赖的package包/类
public static TimestampData convertToDatetimeSpecial(
SessionInterface session, String s, DateTimeType type) {
switch (type.typeCode) {
case Types.SQL_TIMESTAMP :
if (session instanceof Session
&& ((Session) session).database.sqlSyntaxOra) {
String pattern;
if (s.length() == 9) {
pattern = "DD-MON-YY";
} else if (s.length() == 11) {
pattern = "DD-MON-YYYY";
} else if (s.length() == 20) {
pattern = "DD-MON-YYYY HH24:MI:SS";
} else if (s.length() > 20) {
pattern = "DD-MON-YYYY HH24:MI:SS.FF";
} else {
break;
}
SimpleDateFormat format = session.getSimpleDateFormatGMT();
return HsqlDateTime.toDate(s, pattern, format);
}
//
case Types.SQL_TIMESTAMP_WITH_TIME_ZONE :
//
case Types.SQL_DATE :
case Types.SQL_TIME :
case Types.SQL_TIME_WITH_TIME_ZONE :
default :
}
throw Error.error(ErrorCode.X_22007);
}
开发者ID:Julien35,项目名称:dev-courses,代码行数:39,代码来源:DateTimeType.java
示例14: 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:Julien35,项目名称:dev-courses,代码行数:13,代码来源:ClobDataID.java
示例15: setString
import org.hsqldb.SessionInterface; //导入依赖的package包/类
public int 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();
}
return str.length();
}
开发者ID:s-store,项目名称:sstore-soft,代码行数:13,代码来源:ClobDataID.java
示例16: convertToDefaultType
import org.hsqldb.SessionInterface; //导入依赖的package包/类
public Object convertToDefaultType(SessionInterface session, Object a) {
if (a == null) {
return null;
}
if (a instanceof String) {
return convertToType(null, a, Type.SQL_VARCHAR);
} else {
throw Error.error(ErrorCode.X_42561);
}
}
开发者ID:s-store,项目名称:s-store,代码行数:13,代码来源:IntervalType.java
示例17: getBinaryStream
import org.hsqldb.SessionInterface; //导入依赖的package包/类
public InputStream getBinaryStream(SessionInterface session, long pos,
long length) {
if (!isInLimits(data.length, pos, length)) {
throw new IndexOutOfBoundsException();
}
return new BlobInputStream(session, this, pos, length(session));
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:10,代码来源:BinaryData.java
示例18: 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
示例19: getChars
import org.hsqldb.SessionInterface; //导入依赖的package包/类
public char[] getChars(SessionInterface session, long position,
int length) {
ResultLob resultOut = ResultLob.newLobGetCharsRequest(id, position,
length);
Result resultIn = session.execute(resultOut);
if (resultIn.isError()) {
throw resultIn.getException();
}
return ((ResultLob) resultIn).getCharArray();
}
开发者ID:Julien35,项目名称:dev-courses,代码行数:14,代码来源:ClobDataID.java
示例20: 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
注:本文中的org.hsqldb.SessionInterface类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论