Record Class EntityMeta

java.lang.Object
java.lang.Record
com.onec.query.EntityMeta

public record EntityMeta(EntityMeta.Kind kind, Class<?> type, String table, String pk, Map<String,String> systemColumns, List<AttributeDescriptor> attributes) extends Record
A query-layer view over a single queryable entity (catalog / document / register), unifying the per-kind descriptors behind one shape: table name, primary-key column, the built-in system columns, and the user attributes.

The systemColumns map keys are bean-property names (as resolved from getter references) and values are physical column names — mirroring the framework's naming convention (description -> _description, number -> _number, …).

  • Constructor Details

    • EntityMeta

      public EntityMeta(EntityMeta.Kind kind, Class<?> type, String table, String pk, Map<String,String> systemColumns, List<AttributeDescriptor> attributes)
      Creates an instance of a EntityMeta record class.
      Parameters:
      kind - the value for the kind record component
      type - the value for the type record component
      table - the value for the table record component
      pk - the value for the pk record component
      systemColumns - the value for the systemColumns record component
      attributes - the value for the attributes record component
  • Method Details

    • column

      public String column(String field)
      Physical column for a bean-property name, or null if unknown.
    • attribute

      public AttributeDescriptor attribute(String field)
      Attribute descriptor for a property name, or null for system / unknown fields.
    • 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.
    • kind

      public EntityMeta.Kind kind()
      Returns the value of the kind record component.
      Returns:
      the value of the kind record component
    • type

      public Class<?> type()
      Returns the value of the type record component.
      Returns:
      the value of the type record component
    • table

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

      public String pk()
      Returns the value of the pk record component.
      Returns:
      the value of the pk record component
    • systemColumns

      public Map<String,String> systemColumns()
      Returns the value of the systemColumns record component.
      Returns:
      the value of the systemColumns record component
    • attributes

      public List<AttributeDescriptor> attributes()
      Returns the value of the attributes record component.
      Returns:
      the value of the attributes record component