Record Class FieldAndJoinTable

java.lang.Object
java.lang.Record
com.kingsrook.qqq.backend.core.model.metadata.fields.FieldAndJoinTable

public record FieldAndJoinTable(QFieldMetaData field, QTableMetaData joinTable) extends Record
Wrapper (record) that holds a QFieldMetaData and a QTableMetaData - With a factory method (`get()`) to go from the use-case of, a String that's "joinTable.fieldName" or "fieldName" to the pair. Note that the "joinTable" member here - could be the "mainTable" passed in to that `get()` method.
  • Constructor Details

    • FieldAndJoinTable

      public FieldAndJoinTable(QFieldMetaData field, QTableMetaData joinTable)
      Creates an instance of a FieldAndJoinTable record class.
      Parameters:
      field - the value for the field record component
      joinTable - the value for the joinTable record component
  • Method Details

    • get

      public static FieldAndJoinTable get(QTableMetaData mainTable, String fieldName) throws QException
      given a table, and a field-name string (which should either be the name of a field on that table, or another tableName + "." + fieldName (from that table) - get back the pair of table invalid input: '&' field metaData that the input string is talking about.
      Throws:
      QException
    • getLabel

      public String getLabel(QTableMetaData mainTable)
    • 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.
    • field

      public QFieldMetaData field()
      Returns the value of the field record component.
      Returns:
      the value of the field record component
    • joinTable

      public QTableMetaData joinTable()
      Returns the value of the joinTable record component.
      Returns:
      the value of the joinTable record component