Record Class TableMetadata

java.lang.Object
java.lang.Record
org.huiche.core.metadata.TableMetadata
Record Components:
table - 表名
columns - 列
id - ID列(仅唯一主键时才有,联合主键时无)
instantiator - 实例化器,传入map对象,返回实例化后的对象
extractor - 对象值提取器,传入java对象,返回map键值对

public record TableMetadata(String table, List<ColumnMetadata> columns, ColumnMetadata id, Instantiator instantiator, Extractor extractor) extends Record
表元数据
Author:
Maning
  • Constructor Details

    • TableMetadata

      public TableMetadata(String table, List<ColumnMetadata> columns, ColumnMetadata id, Instantiator instantiator, Extractor extractor)
      Creates an instance of a TableMetadata record class.
      Parameters:
      table - the value for the table record component
      columns - the value for the columns record component
      id - the value for the id record component
      instantiator - the value for the instantiator record component
      extractor - the value for the extractor 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • table

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

      public List<ColumnMetadata> columns()
      Returns the value of the columns record component.
      Returns:
      the value of the columns record component
    • id

      public ColumnMetadata id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • instantiator

      public Instantiator instantiator()
      Returns the value of the instantiator record component.
      Returns:
      the value of the instantiator record component
    • extractor

      public Extractor extractor()
      Returns the value of the extractor record component.
      Returns:
      the value of the extractor record component