Enum Class DefaultJavaType

java.lang.Object
java.lang.Enum<DefaultJavaType>
org.anyline.metadata.type.init.DefaultJavaType
所有已实现的接口:
Serializable, Comparable<DefaultJavaType>, Constable, DataType

public enum DefaultJavaType extends Enum<DefaultJavaType> implements DataType
  • 枚举常量详细资料

  • 方法详细资料

    • values

      public static DefaultJavaType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      返回:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static DefaultJavaType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      参数:
      name - 要返回的枚举常量的名称。
      返回:
      返回带有指定名称的枚举常量
      抛出:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - 如果参数为空值
    • read

      public Object read(Object value, Object def, Class clazz)
      从接口复制的说明: DataType
      从数据库中读取数据, 常用的基本类型可以自动转换, 不常用的如json/point/polygon/blob等转换成anyline对应的类型
      指定者:
      read 在接口中 DataType
      参数:
      value - value
      def - 默认值
      clazz - 目标数据类型(给entity赋值时可以根据class, DataRow赋值时可以指定class,否则按检测metadata类型转换 转换不不了的原样返回)
      返回:
      Object
    • write

      public Object write(Object value, Object def, boolean placeholder)
      从接口复制的说明: DataType
      写入数据库前类型转换
      如果有占位符成数据库可接受的Java数据类型
      如果没有占位符 需要确定加单引号或内置函数
      指定者:
      write 在接口中 DataType
      参数:
      value - value
      def - 默认值
      placeholder - 是否占位符
      返回:
      Object
    • convert

      public DataType convert(Convert convert)
      指定者:
      convert 在接口中 DataType
    • convert

      public Convert convert(Class clazz)
      指定者:
      convert 在接口中 DataType
    • ignoreLength

      public int ignoreLength()
      从接口复制的说明: DataType
      定义列时 数据类型格式
      指定者:
      ignoreLength 在接口中 DataType
      返回:
      boolean
    • ignorePrecision

      public int ignorePrecision()
      指定者:
      ignorePrecision 在接口中 DataType
    • ignoreScale

      public int ignoreScale()
      指定者:
      ignoreScale 在接口中 DataType
    • support

      public boolean support()
      指定者:
      support 在接口中 DataType
    • supportClass

      public Class supportClass()
      指定者:
      supportClass 在接口中 DataType