Interface ModelLookupTablesContextReadWrite
- All Superinterfaces:
ModelLookupTablesContextReadOnly
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Represents aLookupTable
owned by a ModelObject with mutable operationsNested classes/interfaces inherited from interface ModelLookupTablesContextReadOnly
ModelLookupTablesContextReadOnly.ModelLookupTable
-
Method Summary
Modifier and TypeMethodDescriptionaddLookupTable
(String name, String label, LookupTable.LookupTableValueType valueType, Map<String, Map<String, Object>> columnsSpecs) Add aLookupTable
owned by the model.lookupTable
(String name)
-
Method Details
-
addLookupTable
ModelLookupTablesContextReadWrite.MutableModelLookupTable addLookupTable(String name, String label, LookupTable.LookupTableValueType valueType, Map<String, Map<String, Object>> columnsSpecs) Add aLookupTable
owned by the model. If the table already exists, it is replaced by this new table.The
LookupTable.LookupTableValueType
must be one of [MATRIX, MATRIX2, MATRIX3, MATRIX4, MATRIX5, MATRIX6].The definition of columnsSpecs is associating
LookupTableValue
fields name with their attribute metadata. Beware of the field names (keys and attributes) may change depending on theLookupTable.LookupTableValueType
. A metadata may not be given for each field, in that case those fields are still present but will be presented to the user in a raw style.Sample code:
model.addLookupTable( "CustomerDiscounts", "Discount By Customer", LookupTableValueType.MATRIX2, [ key1: [label:"Customer ID", fieldFormatType: FieldFormatType.TEXT], key2: [label:"Customer Group", fieldFormatType: FieldFormatType.TEXT], attribute1: [label:"Discount Name", fieldFormatType: FieldFormatType.TEXT], attribute2: [label:"Discount Rate", fieldFormatType: FieldFormatType.NUMERIC] ] )
- Parameters:
name
- The name of theLookupTable
, must be unique per modellabel
- The label of theLookupTable
valueType
- TheLookupTable.LookupTableValueType
of theLookupTable
columnsSpecs
- Definition of theLookupTable
value metadata to be created- Returns:
- The added
ModelLookupTablesContextReadOnly.ModelLookupTable
- Since:
- 9.0 Hurricane
-
lookupTable
- Specified by:
lookupTable
in interfaceModelLookupTablesContextReadOnly
- Parameters:
name
- The name of theLookupTable
, must be unique per model- Returns:
- The
ModelLookupTablesContextReadWrite.MutableModelLookupTable
owned by this model ornull
if it doesn't exist - Since:
- 9.0 Hurricane
-