Class QSupplementalTableMetaData
java.lang.Object
com.kingsrook.qqq.backend.core.model.metadata.tables.QSupplementalTableMetaData
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
ApiTableMetaDataContainer
,ColumnStatsTableConfig
Base-class for table-level meta-data defined by some supplemental module, etc,
outside of qqq core
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
adding cloneable to this type hierarchy - subclasses need to implement finishClone to copy their specific state.void
enrich
(QInstance qInstance, QTableMetaData table) 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.abstract String
getType()
Getter for typeboolean
boolean
protected static <S extends QSupplementalTableMetaData>
Sof
(QTableMetaData table, String type) Return the supplemental table meta data object assigned to the input table under the given type.protected static <S extends QSupplementalTableMetaData>
SofOrWithNew
(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 namevoid
validate
(QInstance qInstance, QTableMetaData tableMetaData, QInstanceValidator qInstanceValidator)
-
Constructor Details
-
QSupplementalTableMetaData
public QSupplementalTableMetaData()
-
-
Method Details
-
of
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 datatype
- 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 datatype
- identifier for the supplemental meta data - as returned by getTypesupplier
- 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
Getter for type -
enrich
-
validate
public void validate(QInstance qInstance, QTableMetaData tableMetaData, QInstanceValidator qInstanceValidator) -
clone
adding cloneable to this type hierarchy - subclasses need to implement finishClone to copy their specific state. -
finishClone
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.
-