Example #1
0
 <T> DatabaseProperty(T defaultValue) {
   this.defaultValue = defaultValue;
   final String methodName = AvaticaUtils.toCamelCase(name());
   try {
     this.method = DatabaseMetaData.class.getMethod(methodName);
   } catch (NoSuchMethodException e) {
     throw new RuntimeException(e);
   }
   this.type = AvaticaUtils.box(method.getReturnType());
   assert defaultValue == null || defaultValue.getClass() == type;
 }
Example #2
0
 public int[] executeBatch() throws SQLException {
   return AvaticaUtils.toSaturatedInts(executeLargeBatch());
 }
Example #3
0
 public int getUpdateCount() throws SQLException {
   return AvaticaUtils.toSaturatedInt(updateCount);
 }
Example #4
0
 public final int getMaxRows() {
   return AvaticaUtils.toSaturatedInt(getLargeMaxRows());
 }
Example #5
0
 public final int executeUpdate(String sql) throws SQLException {
   return AvaticaUtils.toSaturatedInt(executeLargeUpdate(sql));
 }