Module io.ebean.api

Enum LengthCheck

java.lang.Object
java.lang.Enum<LengthCheck>
io.ebean.config.LengthCheck
All Implemented Interfaces:
Serializable, Comparable<LengthCheck>

public enum LengthCheck extends Enum<LengthCheck>
Defines the length-check mode.
Author:
Roland Praml, FOCONIS AG
  • Enum Constant Details

    • OFF

      public static final LengthCheck 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

      public static final LengthCheck ON
      When enabling length check, ebean validates strings/json strings and files before saving them to DB.
    • UTF8

      public static final LengthCheck 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

      public static LengthCheck[] 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

      public static LengthCheck valueOf(String name)
      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 name
      NullPointerException - if the argument is null