Class QSupplementalTableMetaData

java.lang.Object
com.kingsrook.qqq.backend.core.model.metadata.tables.QSupplementalTableMetaData
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
ApiTableMetaDataContainer, ColumnStatsTableConfig

public abstract class QSupplementalTableMetaData extends Object implements Cloneable
Base-class for table-level meta-data defined by some supplemental module, etc, outside of qqq core
  • Constructor Details

    • QSupplementalTableMetaData

      public QSupplementalTableMetaData()
  • Method Details

    • of

      protected static <S extends QSupplementalTableMetaData> S of(QTableMetaData table, String type)
      Return the supplemental table meta data object assigned to the input table under the given type. If no object is assigned, returns null.
      Parameters:
      table - where to look for the supplemental table meta data
      type - identifier for the supplemental meta data - as returned by getType
      Returns:
      QSupplementalTableMetaData subclass assigned to the table - may be null.
    • ofOrWithNew

      protected static <S extends QSupplementalTableMetaData> S ofOrWithNew(QTableMetaData table, String type, Supplier<S> supplier)
      Return the supplemental table meta data object assigned to the input table under the given type - but also - if no object is assigned, create a new one by running the input supplier, and then assign that one to the table (that's the "withNew" part of the method name
      Parameters:
      table - where to look for the supplemental table meta data
      type - identifier for the supplemental meta data - as returned by getType
      supplier - source of new objects if one isn't already on the table. typically a constructor for the QSupplementalTableMetaData subtype.
      Returns:
      QSupplementalTableMetaData subclass assigned to the table - shouldn't ever be null (though if the supplier returns null, then it could be).
    • includeInPartialFrontendMetaData

      public boolean includeInPartialFrontendMetaData()
    • includeInFullFrontendMetaData

      public boolean includeInFullFrontendMetaData()
    • getType

      public abstract String getType()
      Getter for type
    • enrich

      public void enrich(QInstance qInstance, QTableMetaData table)
    • validate

      public void validate(QInstance qInstance, QTableMetaData tableMetaData, QInstanceValidator qInstanceValidator)
    • clone

      public final QSupplementalTableMetaData clone()
      adding cloneable to this type hierarchy - subclasses need to implement finishClone to copy their specific state.
      Overrides:
      clone in class Object
    • finishClone

      protected QSupplementalTableMetaData finishClone(QSupplementalTableMetaData abstractClone)
      finish the cloning operation started in the base class. copy all state from the subclass into the input clone (which can be safely casted to the subclass's type, as it was obtained by super.clone()) Rather than making this public and breaking all existing implementations that don't have it - we're making it protected, with a one-time warning if it isn't implemented in a subclass.