- All Implemented Interfaces:
Serializable
,Comparable<LengthCheck>
Defines the length-check mode.
- Author:
- Roland Praml, FOCONIS AG
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic LengthCheck
Returns the enum constant of this type with the specified name.static LengthCheck[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
OFF
By default, length checking is off. This means, strings/jsons and files are passed to the DB and the DB might or might not check the length. The DB has to check the data length. Note this is not possible for certain datatypes (e.g. clob without size) -
ON
When enabling length check, ebean validates strings/json strings and files before saving them to DB. -
UTF8
Same as "ON", but take the UTF8-bytelength for validation. This may be useful, if you have an UTF8 based charset (default for DB2)
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-