protected void createDataTypesRows(RowSet crs) throws SQLException {
Integer aInteger = 100;
String aChar = "Oswald Cobblepot";
Long aLong = Long.MAX_VALUE;
Short aShort = Short.MAX_VALUE;
Double aDouble = Double.MAX_VALUE;
BigDecimal aBigDecimal = BigDecimal.ONE;
Boolean aBoolean = false;
Float aFloat = Float.MAX_VALUE;
Byte aByte = Byte.MAX_VALUE;
Date aDate = Date.valueOf(LocalDate.now());
Time aTime = Time.valueOf(LocalTime.now());
Timestamp aTimeStamp = Timestamp.valueOf(LocalDateTime.now());
Array aArray = new StubArray("INTEGER", new Object[1]);
Ref aRef = new SerialRef(new StubRef("INTEGER", query));
byte[] bytes = new byte[10];
crs.moveToInsertRow();
crs.updateInt(1, aInteger);
crs.updateString(2, aChar);
crs.updateString(3, aChar);
crs.updateLong(4, aLong);
crs.updateBoolean(5, aBoolean);
crs.updateShort(6, aShort);
crs.updateDouble(7, aDouble);
crs.updateBigDecimal(8, aBigDecimal);
crs.updateFloat(9, aFloat);
crs.updateByte(10, aByte);
crs.updateDate(11, aDate);
crs.updateTime(12, aTime);
crs.updateTimestamp(13, aTimeStamp);
crs.updateBytes(14, bytes);
crs.updateArray(15, aArray);
crs.updateRef(16, aRef);
crs.updateDouble(17, aDouble);
crs.insertRow();
crs.moveToCurrentRow();
}
CommonCachedRowSetTests.java 文件源码
java
阅读 32
收藏 0
点赞 0
评论 0
项目:jdk8u-jdk
作者:
评论列表
文章目录