com.planetalia.dynject.validation
Annotation Type IsTimestamp


@Target(value={FIELD,METHOD})
@Retention(value=RUNTIME)
public @interface IsTimestamp

Requires that the value be a timestamp value. If it is not, it will attempt to perform a conversion according either using a provided pattern, or using the locale-dependant default pattern. Usually date conversions are performed automatically. You should use this annotation only if you want to specify a custom date pattern.

Author:
Alexander Hristov

Optional Element Summary
 java.lang.String defaultValue
          If set to something different than the default (the empty string), specifies a default value that is used whenever a null value is received.
 java.lang.String errorCode
          Error code to use if validation fails.
 java.lang.String message
          Literal message to use if validation fails.
 java.lang.String messageKey
          Message key to use if validation fails.
 java.lang.String value
          Pattern to use when parsing the data, if it is not natively a timestamp
 

value

public abstract java.lang.String value
Pattern to use when parsing the data, if it is not natively a timestamp

Returns:
Pattern to use when parsing the data, if it is not natively a timestamp
Default:
""

defaultValue

public abstract java.lang.String defaultValue
If set to something different than the default (the empty string), specifies a default value that is used whenever a null value is received. The default value is parsed to a Date

Returns:
Default value
Default:
""

message

public abstract java.lang.String message
Literal message to use if validation fails.

Returns:
Literal message to use if validation fails.
Default:
""

errorCode

public abstract java.lang.String errorCode
Error code to use if validation fails.

Returns:
Error code to use if validation fails.
Default:
""

messageKey

public abstract java.lang.String messageKey
Message key to use if validation fails. Default is Messages.TIMESTAMP

Returns:
Message key to use if validation fails.
Default:
"dynject.validation.timestamp"