Class QPossibleValueSource
java.lang.Object
com.kingsrook.qqq.backend.core.model.metadata.possiblevalues.QPossibleValueSource
- All Implemented Interfaces:
MetaDataProducerOutput,QMetaDataObject,TopLevelMetaDataInterface,Serializable
Meta-data to represent a "Possible value" - e.g., a translation of a foreign
key and/or a limited set of "possible values" for a field (e.g., from a foreign
table or an enum).
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddEnumValue(QPossibleValue<?> possibleValue) voidaddSelfToInstance(QInstance qInstance) call the appropriate methods on a QInstance to add ourselves to it.Getter for customCodeReferenceList<QPossibleValue<?>> Getter for enumValuesGetter for idTypegetLabel()Getter for labelgetName()Getter for orderByFieldsGetter for overrideIdFieldGetter for searchFieldsGetter for tableNamegetType()Getter for valueFieldsGetter for valueFieldsIfNotFoundGetter for valueFormatGetter for valueFormatIfNotFoundstatic <I extends Serializable,T extends PossibleValueEnum<I>>
QPossibleValueSourcenewForEnum(String name, T[] values) Create a new possible value source, for an enum, with default settings.static QPossibleValueSourcenewForTable(String tableName) Create a new possible value source, for a table, with default settings.voidsetCustomCodeReference(QCodeReference customCodeReference) Setter for customCodeReferencevoidsetEnumValues(List<QPossibleValue<?>> enumValues) Setter for enumValuesvoidsetIdType(QFieldType idType) Setter for idTypevoidSetter for labelvoidvoidsetOrderByFields(List<QFilterOrderBy> orderByFields) Setter for orderByFieldsvoidsetOverrideIdField(String overrideIdField) Setter for overrideIdFieldvoidsetSearchFields(List<String> searchFields) Setter for searchFieldsvoidsetTableName(String tableName) Setter for tableNamevoidvoidsetValueFields(List<String> valueFields) Setter for valueFieldsvoidsetValueFieldsIfNotFound(List<String> valueFieldsIfNotFound) Setter for valueFieldsIfNotFoundvoidsetValueFormat(String valueFormat) Setter for valueFormatvoidsetValueFormatAndFields(PVSValueFormatAndFields valueFormatAndFields) voidsetValueFormatIfNotFound(String valueFormatIfNotFound) Setter for valueFormatIfNotFoundwithCustomCodeReference(QCodeReference customCodeReference) Fluent setter for customCodeReferencewithEnumValues(List<QPossibleValue<?>> enumValues) Fluent setter for enumValueswithIdType(QFieldType idType) Fluent setter for idTypeFluent setter for labelwithOrderByField(QFilterOrderBy orderByField) Fluent setter for orderByFieldswithOrderByField(String fieldName) Fluent setter for orderByFields - default to ASCENDINGwithOrderByField(String fieldName, boolean isAscending) Fluent setter for orderByFieldswithOrderByFields(List<QFilterOrderBy> orderByFields) Fluent setter for orderByFieldswithOverrideIdField(String overrideIdField) Fluent setter for overrideIdFieldwithSearchField(String searchField) Fluent setter for searchFieldswithSearchFields(List<String> searchFields) Fluent setter for searchFieldswithTableName(String tableName) Fluent setter for tableNamewithValueFields(List<String> valueFields) Fluent setter for valueFieldswithValueFieldsIfNotFound(List<String> valueFieldsIfNotFound) Fluent setter for valueFieldsIfNotFoundwithValueFormat(String valueFormat) Fluent setter for valueFormatwithValueFormatAndFields(PVSValueFormatAndFields valueFormatAndFields) withValueFormatIfNotFound(String valueFormatIfNotFound) Fluent setter for valueFormatIfNotFound<I extends Serializable,T extends PossibleValueEnum<I>>
QPossibleValueSourcewithValuesFromEnum(T[] values) This is the easiest way to add the values from an enum to a PossibleValueSource.
-
Constructor Details
-
QPossibleValueSource
public QPossibleValueSource()
-
-
Method Details
-
newForTable
Create a new possible value source, for a table, with default settings. e.g., name invalid input: '&' table name from the tableName parameter; type=TABLE; and LABEL_ONLY format -
newForEnum
public static <I extends Serializable,T extends PossibleValueEnum<I>> QPossibleValueSource newForEnum(String name, T[] values) Create a new possible value source, for an enum, with default settings. e.g., type=ENUM; name from param values from the param; LABEL_ONLY format -
getName
- Specified by:
getNamein interfaceTopLevelMetaDataInterface
-
setName
-
withName
-
getLabel
Getter for label -
setLabel
Setter for label -
withLabel
Fluent setter for label -
getType
-
setType
-
withType
-
getValueFormat
Getter for valueFormat -
setValueFormat
Setter for valueFormat -
withValueFormat
Fluent setter for valueFormat -
getValueFields
-
setValueFields
-
withValueFields
Fluent setter for valueFields -
getValueFormatIfNotFound
Getter for valueFormatIfNotFound -
setValueFormatIfNotFound
Setter for valueFormatIfNotFound -
withValueFormatIfNotFound
Fluent setter for valueFormatIfNotFound -
getValueFieldsIfNotFound
-
setValueFieldsIfNotFound
-
withValueFieldsIfNotFound
Fluent setter for valueFieldsIfNotFound -
getTableName
Getter for tableName -
setTableName
Setter for tableName -
withTableName
Fluent setter for tableName -
getSearchFields
-
setSearchFields
-
withSearchFields
Fluent setter for searchFields -
withSearchField
Fluent setter for searchFields -
getOrderByFields
Getter for orderByFields -
setOrderByFields
Setter for orderByFields -
withOrderByFields
Fluent setter for orderByFields -
withOrderByField
Fluent setter for orderByFields -
withOrderByField
Fluent setter for orderByFields - default to ASCENDING -
withOrderByField
Fluent setter for orderByFields -
getEnumValues
Getter for enumValues -
setEnumValues
Setter for enumValues -
withEnumValues
Fluent setter for enumValues -
addEnumValue
-
withValuesFromEnum
public <I extends Serializable,T extends PossibleValueEnum<I>> QPossibleValueSource withValuesFromEnum(T[] values) This is the easiest way to add the values from an enum to a PossibleValueSource. Make sure the enum implements PossibleValueEnum - then call as: myPossibleValueSource.withValuesFromEnum(MyEnum.values())); -
getCustomCodeReference
Getter for customCodeReference -
setCustomCodeReference
Setter for customCodeReference -
withCustomCodeReference
Fluent setter for customCodeReference -
setValueFormatAndFields
-
withValueFormatAndFields
-
addSelfToInstance
Description copied from interface:MetaDataProducerOutputcall the appropriate methods on a QInstance to add ourselves to it.- Specified by:
addSelfToInstancein interfaceMetaDataProducerOutput- Specified by:
addSelfToInstancein interfaceTopLevelMetaDataInterface
-
getOverrideIdField
Getter for overrideIdField -
setOverrideIdField
Setter for overrideIdField -
withOverrideIdField
Fluent setter for overrideIdField -
getIdType
Getter for idType -
setIdType
Setter for idType -
withIdType
Fluent setter for idType
-