Record Class ColumnMetadata

java.lang.Object
java.lang.Record
org.huiche.core.metadata.ColumnMetadata
Record Components:
field - 字段名
column - 列名
type - 类型,可能包含泛型,Class|ParameterizedType
primaryKey - 是否主键
autoIncrement - 是否自增
table - 表名
nested - 是否嵌套表的属性
fillOnInsert - 插入时填充注解
fillOnUpdate - 更新时填充注解
setter - 属性设置器,实体类是record时没有(final无法修改)

public record ColumnMetadata(Field field, String column, Type type, boolean primaryKey, boolean autoIncrement, String table, boolean nested, FillOnInsert fillOnInsert, FillOnUpdate fillOnUpdate, Setter setter) extends Record
列元数据
Author:
Maning
  • Constructor Details

    • ColumnMetadata

      public ColumnMetadata(Field field, String column, Type type, boolean primaryKey, boolean autoIncrement, String table, boolean nested, FillOnInsert fillOnInsert, FillOnUpdate fillOnUpdate, Setter setter)
      Creates an instance of a ColumnMetadata record class.
      Parameters:
      field - the value for the field record component
      column - the value for the column record component
      type - the value for the type record component
      primaryKey - the value for the primaryKey record component
      autoIncrement - the value for the autoIncrement record component
      table - the value for the table record component
      nested - the value for the nested record component
      fillOnInsert - the value for the fillOnInsert record component
      fillOnUpdate - the value for the fillOnUpdate record component
      setter - the value for the setter record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • field

      public Field field()
      Returns the value of the field record component.
      Returns:
      the value of the field record component
    • column

      public String column()
      Returns the value of the column record component.
      Returns:
      the value of the column record component
    • type

      public Type type()
      Returns the value of the type record component.
      Returns:
      the value of the type record component
    • primaryKey

      public boolean primaryKey()
      Returns the value of the primaryKey record component.
      Returns:
      the value of the primaryKey record component
    • autoIncrement

      public boolean autoIncrement()
      Returns the value of the autoIncrement record component.
      Returns:
      the value of the autoIncrement record component
    • table

      public String table()
      Returns the value of the table record component.
      Returns:
      the value of the table record component
    • nested

      public boolean nested()
      Returns the value of the nested record component.
      Returns:
      the value of the nested record component
    • fillOnInsert

      public FillOnInsert fillOnInsert()
      Returns the value of the fillOnInsert record component.
      Returns:
      the value of the fillOnInsert record component
    • fillOnUpdate

      public FillOnUpdate fillOnUpdate()
      Returns the value of the fillOnUpdate record component.
      Returns:
      the value of the fillOnUpdate record component
    • setter

      public Setter setter()
      Returns the value of the setter record component.
      Returns:
      the value of the setter record component