@Test public void testDefaultConstructor() { System.out.println("StringField(Types)"); for (Types type : Types.values()) { try { new StringField(type); if (!(type == Types.CHAR || type == Types.CHARACTER || type == Types.CHARACTER_VARYING || type == Types.CHAR_VARYING || type == Types.VARCHAR || type == Types.CHARACTER_LARGE_OBJECT || type == Types.CHAR_LARGE_OBJECT || type == Types.CLOB || type == Types.NATIONAL_CHARACTER || type == Types.NATIONAL_CHAR || type == Types.NCHAR || type == Types.NATIONAL_CHARACTER_VARYING || type == Types.NATIONAL_CHAR_VARYING || type == Types.NCHAR_VARYING || type == Types.NATIONAL_CHARACTER_LARGE_OBJECT || type == Types.NCHAR_LARGE_OBJECT || type == Types.NCLOB || type == Types.STRING)) { fail("Incorrectly accepted " + type.getType() + " as a valid string type"); } } catch (OperationException ex) { if (ex.getErrorCode() != ErrorCode.DATATYPE_MISMATCH) { fail("Incorrect error code reported for data type mismatch"); } if (type == Types.CHAR || type == Types.CHARACTER || type == Types.CHARACTER_VARYING || type == Types.CHAR_VARYING || type == Types.VARCHAR || type == Types.CHARACTER_LARGE_OBJECT || type == Types.CHAR_LARGE_OBJECT || type == Types.CLOB || type == Types.NATIONAL_CHARACTER || type == Types.NATIONAL_CHAR || type == Types.NCHAR || type == Types.NATIONAL_CHARACTER_VARYING || type == Types.NATIONAL_CHAR_VARYING || type == Types.NCHAR_VARYING || type == Types.NATIONAL_CHARACTER_LARGE_OBJECT || type == Types.NCHAR_LARGE_OBJECT || type == Types.NCLOB || type == Types.STRING) { fail("Incorrectly reported " + type.getType() + " as an invalid string type"); } } } }
@Override public Types getType() { return type; }
StringField implements FieldType<String> { @Override public Types getType() { return type; } }
StringField implements FieldType<String> { @Override public Types getType() { return type; } StringField(final Types type);  StringField(final String defaultValue, final Types type);  StringField(final Types type, final String length);  StringField(final Types type, final String length, final String defaultValue); }
StringField implements FieldType<String> { @Override public Types getType() { return type; } StringField(final Types type);  StringField(final String defaultValue, final Types type);  StringField(final Types type, final String length);  StringField(final Types type, final String length, final String defaultValue); @Override Types getType(); long getLength(); @Override String getDefaultValue(); @Override boolean hasDefaultValue(); @Override String convert(Object objValue); @Override JSONObject toJson(); }
StringField implements FieldType<String> { @Override public Types getType() { return type; } StringField(final Types type);  StringField(final String defaultValue, final Types type);  StringField(final Types type, final String length);  StringField(final Types type, final String length, final String defaultValue); @Override Types getType(); long getLength(); @Override String getDefaultValue(); @Override boolean hasDefaultValue(); @Override String convert(Object objValue); @Override JSONObject toJson();  }