@Test public void testParseDefaultString() throws SQLException { Long value = 423424234234L; assertEquals(value, DateTimeType.getSingleton().parseDefaultString(null, value.toString())); }
@Override public Object parseDefaultString(FieldType fieldType, String defaultStr) throws SQLException { try { return Long.parseLong(defaultStr); } catch (NumberFormatException e) { throw SqlExceptionUtil.create("Problems with field " + fieldType + " parsing default DateTime value: " + defaultStr, e); } }
DateTimeType extends BaseDataType { @Override public Object parseDefaultString(FieldType fieldType, String defaultStr) throws SQLException { try { return Long.parseLong(defaultStr); } catch (NumberFormatException e) { throw SqlExceptionUtil.create("Problems with field " + fieldType + " parsing default DateTime value: " + defaultStr, e); } } }
DateTimeType extends BaseDataType { @Override public Object parseDefaultString(FieldType fieldType, String defaultStr) throws SQLException { try { return Long.parseLong(defaultStr); } catch (NumberFormatException e) { throw SqlExceptionUtil.create("Problems with field " + fieldType + " parsing default DateTime value: " + defaultStr, e); } } private  DateTimeType(); protected  DateTimeType(SqlType sqlType, Class<?>[] classes); }
DateTimeType extends BaseDataType { @Override public Object parseDefaultString(FieldType fieldType, String defaultStr) throws SQLException { try { return Long.parseLong(defaultStr); } catch (NumberFormatException e) { throw SqlExceptionUtil.create("Problems with field " + fieldType + " parsing default DateTime value: " + defaultStr, e); } } private  DateTimeType(); protected  DateTimeType(SqlType sqlType, Class<?>[] classes); static DateTimeType getSingleton(); @Override String[] getAssociatedClassNames(); @Override Object javaToSqlArg(FieldType fieldType, Object javaObject); @Override Object parseDefaultString(FieldType fieldType, String defaultStr); @Override Object resultToSqlArg(FieldType fieldType, DatabaseResults results, int columnPos); @Override Object sqlArgToJava(FieldType fieldType, Object sqlArg, int columnPos); @Override boolean isEscapedValue(); @Override boolean isAppropriateId(); @Override Class<?> getPrimaryClass(); @Override boolean isValidForVersion(); @Override Object moveToNextValue(Object currentValue); }
DateTimeType extends BaseDataType { @Override public Object parseDefaultString(FieldType fieldType, String defaultStr) throws SQLException { try { return Long.parseLong(defaultStr); } catch (NumberFormatException e) { throw SqlExceptionUtil.create("Problems with field " + fieldType + " parsing default DateTime value: " + defaultStr, e); } } private  DateTimeType(); protected  DateTimeType(SqlType sqlType, Class<?>[] classes); static DateTimeType getSingleton(); @Override String[] getAssociatedClassNames(); @Override Object javaToSqlArg(FieldType fieldType, Object javaObject); @Override Object parseDefaultString(FieldType fieldType, String defaultStr); @Override Object resultToSqlArg(FieldType fieldType, DatabaseResults results, int columnPos); @Override Object sqlArgToJava(FieldType fieldType, Object sqlArg, int columnPos); @Override boolean isEscapedValue(); @Override boolean isAppropriateId(); @Override Class<?> getPrimaryClass(); @Override boolean isValidForVersion(); @Override Object moveToNextValue(Object currentValue);  }