/** * Registers converter for specified model attributes. */ void convertWith(Converter converter, String... attributes) { for (String attribute : attributes) { convertWith(converter, attribute); } }
/** * Registers date converters (Date -> String -> java.sql.Date) for specified model attributes. */ void dateFormat(DateFormat format, String... attributes) { convertWith(new DateToStringConverter(format), attributes); convertWith(new StringToSqlDateConverter(format), attributes); }
/** * Registers timestamp converters (Date -> String -> java.sql.Timestamp) for specified model attributes. */ void timestampFormat(DateFormat format, String... attributes) { convertWith(new DateToStringConverter(format), attributes); convertWith(new StringToTimestampConverter(format), attributes); }
public static void convertWith(Class<? extends Model> clazz, Converter converter, String... attributeNames) { modelRegistryOf(clazz).convertWith(converter, attributeNames); }
public static void blankToNull(Class<? extends Model> clazz, String... attributeNames) { modelRegistryOf(clazz).convertWith(BlankToNullConverter.instance(), attributeNames); }
public static void zeroToNull(Class<? extends Model> clazz, String... attributeNames) { modelRegistryOf(clazz).convertWith(ZeroToNullConverter.instance(), attributeNames); }
/** * Registers converter for specified model attributes. */ void convertWith(Converter converter, String... attributes) { for (String attribute : attributes) { convertWith(converter, attribute); } }
/** * Registers converter for specified model attributes. */ void convertWith(Converter converter, String... attributes) { for (String attribute : attributes) { convertWith(converter, attribute); } }
/** * Registers timestamp converters (Date -> String -> java.sql.Timestamp) for specified model attributes. */ void timestampFormat(DateFormat format, String... attributes) { convertWith(new DateToStringConverter(format), attributes); convertWith(new StringToTimestampConverter(format), attributes); }
/** * Registers date converters (Date -> String -> java.sql.Date) for specified model attributes. */ void dateFormat(DateFormat format, String... attributes) { convertWith(new DateToStringConverter(format), attributes); convertWith(new StringToSqlDateConverter(format), attributes); }
/** * Registers timestamp converters (Date -> String -> java.sql.Timestamp) for specified model attributes. */ void timestampFormat(DateFormat format, String... attributes) { convertWith(new DateToStringConverter(format), attributes); convertWith(new StringToTimestampConverter(format), attributes); }
/** * Registers date converters (Date -> String -> java.sql.Date) for specified model attributes. */ void dateFormat(DateFormat format, String... attributes) { convertWith(new DateToStringConverter(format), attributes); convertWith(new StringToSqlDateConverter(format), attributes); }
public static void convertWith(Class<? extends Model> clazz, Converter converter, String... attributeNames) { modelRegistryOf(clazz).convertWith(converter, attributeNames); }
public static void convertWith(Class<? extends Model> clazz, Converter converter, String... attributeNames) { modelRegistryOf(clazz).convertWith(converter, attributeNames); }
public static void zeroToNull(Class<? extends Model> clazz, String... attributeNames) { modelRegistryOf(clazz).convertWith(ZeroToNullConverter.instance(), attributeNames); } }
public static void zeroToNull(Class<? extends Model> clazz, String... attributeNames) { modelRegistryOf(clazz).convertWith(ZeroToNullConverter.instance(), attributeNames); }
public static void blankToNull(Class<? extends Model> clazz, String... attributeNames) { modelRegistryOf(clazz).convertWith(BlankToNullConverter.instance(), attributeNames); }
public static void blankToNull(Class<? extends Model> clazz, String... attributeNames) { modelRegistryOf(clazz).convertWith(BlankToNullConverter.instance(), attributeNames); }