Class LookupTable

Object
DomainObject
PersistedObject
PartitionedObject
NamedObject
TimedObject
TimedObjectWithStatus
LookupTable
All Implemented Interfaces:
APIModifiable, JobNameProvider, NamedChangeTracker, Persistable, PlasmaRestrictedObject, SourceTransactionIdTracker, TreeStructuredObject, UserGroupRestrictedObject

@Entity public class LookupTable extends TimedObjectWithStatus implements TreeStructuredObject, UserGroupRestrictedObject, APIModifiable, PlasmaRestrictedObject, NamedChangeTracker, SourceTransactionIdTracker
  • Nested Class Summary Link icon

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
     
    static enum 
     
    static final class 
     

    Nested classes/interfaces inherited from class TimedObjectWithStatus Link icon

    TimedObjectWithStatus.TimedObjectStatus

    Nested classes/interfaces inherited from class PersistedObject Link icon

    PersistedObject.BatchDelete, PersistedObject.BulkloadFilterCheckCallback, PersistedObject.ComputedFieldMapping, PersistedObject.ComputedFields, PersistedObject.ImportManagerEnabled, PersistedObject.PersistedObjectMeta, PersistedObject.VirtualField, PersistedObject.VirtualFieldMapping, PersistedObject.VirtualFields, PersistedObject.VirtualSearchFields, PersistedObject.VirtualSortFields
  • Field Summary Link icon

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    static final String
     
    static final String
     

    Fields inherited from class TimedObjectWithStatus Link icon

    FIELD_SIMULATIONSET, FIELD_STATUS, simulationSet

    Fields inherited from class TimedObject Link icon

    FIELD_VALIDAFTER

    Fields inherited from class NamedObject Link icon

    FIELD_LABEL, FIELD_UNIQUENAME

    Fields inherited from class PartitionedObject Link icon

    FIELD_PARTITION, FIELD_PARTITIONID, PARTITION_FILTER_NAME, PARTITION_FILTER_PARAM

    Fields inherited from class PersistedObject Link icon

    FIELD_CREATEDATE, FIELD_CREATEDBY, FIELD_DELETEDATE, FIELD_DELETEDBY, FIELD_ID, FIELD_ISDELETED, FIELD_LASTUPDATEBY, FIELD_LASTUPDATEDATE, FIELD_VERSION

    Fields inherited from class DomainObject Link icon

    DEFAULT_MAX_PACKET_SIZE

    Fields inherited from interface UserGroupRestrictedObject Link icon

    FIELD_USERGROUPEDIT, FIELD_USERGROUPVIEWDETAILS
  • Constructor Summary Link icon

    Constructors
    Constructor
    Description
     
    LookupTable(Partition p, String uniqueName, String label)
     
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    Search
    buildValuesSearch(int startRow, int endRow, Map<String,Object> filters, String filterMatchStyle, List<String> sortBy, List<String> fields, boolean distinct, PersistedObjectService objService)
     
    void
     
    boolean
    canAdd(User user, ValidationVisitor validationVisitor, PersistedObjectService objService)
    Override this method to restrict the possibility to add an object of this type.
    boolean
    canDelete(User user, ValidationVisitor validationVisitor, PersistedObjectService objService)
    Override this method to restrict the possibility to delete an object of this type.
    boolean
    canEdit(User user, ValidationVisitor validationVisitor, PersistedObjectService objService, Map<String,Object> fieldsToEdit)
    Override this method to do edit-ability checks based on request details and object data (or related object data) and new data from request In case of a false return value a validation error should be added.
    boolean
    canRead(User user, ValidationVisitor visitor, PersistedObjectService txn)
    Override this method to do readability checks based on request details and object data (or related object data) In case of a false return value a validation error should be added.
    boolean
    Override to define if an object instance should be really deleted (vs just marked as deleted) Default: soft-delete
     
     
     
    boolean
     
    Class<? extends AbstractJsonLookupTableValue>
     
    static Collection<? extends JsonLookupTableAttributeMeta>
    getJsonLookupTableMeta(LookupTable lookupTable, PersistedObjectService objService)
     
     
     
     
    Class<? extends AbstractMatrixLookupTableValue>
     
    static Collection<? extends MatrixLookupTableAttributeMeta>
    getMatrixLookupTableMeta(LookupTable lookupTable, PersistedObjectService objService)
     
     
    int
     
     
     
     
     
     
    Class<? extends PersistedObject>
     
    static boolean
     
    boolean
     
    AbstractJsonLookupTableValue
     
    AbstractMatrixLookupTableValue
     
    MetaAttributed
     
    void
    onDelete(PersistedObjectService objService)
    Default does nothing.
    boolean
    Invoked before processing starts.
    void
    onSavedOrUpdated(PersistedObjectService objService)
     
    void
    onSaveOrUpdate(PersistedObjectService objService)
    Default does nothing.
    void
    setCreatedByName(String createdByName)
     
    void
     
    void
    setHideWarnings(Boolean hideWarnings)
     
    void
    setLastUpdateByName(String lastUpdateByName)
     
    void
     
    void
    setNodeId(Number nodeId)
     
    void
     
    void
    setPlasma(Boolean isPlasma)
     
    void
     
    void
     
    void
     
    void
     
    boolean
    validate(ValidationVisitor validationVisitor, PersistedObjectService objService)
    Override to implement per-object validation rules

    Methods inherited from class TimedObjectWithStatus Link icon

    getBusinessKey, getSignificantFields, getSimulationSet, getStatus, isActive, setSimulationSet, setStatus

    Methods inherited from class TimedObject Link icon

    getValidAfter, setValidAfter

    Methods inherited from class NamedObject Link icon

    equals, getJobName, getLabel, getLabelOrUniqueName, getUniqueName, hashCode, labelValid, setLabel, setUniqueName, toString, uniqueNameValid

    Methods inherited from class PartitionedObject Link icon

    addUniqueConstraint, getLoginNameByUserId, getPartition, setPartition

    Methods inherited from class PersistedObject Link icon

    auditOperation, canEdit, createDate, entityIsSafeInserted, entityIsSafeInserted, getBulkloadMap, getCreateDate, getCreatedBy, getDbColumnNameForField, getDefaultSortKey, getDeleteDate, getDeletedBy, getId, getLastUpdateBy, getLastUpdateDate, getTypeCode, getTypedId, getVersion, getVirtualSearchFieldMappings, getVirtualSortFieldMappings, isAudited, isDeleted, isVirtualSearchField, lastUpdateDate, notifyOnBusinessKeyChange, onBusinessKeyChange, onRefreshed, setCreateDate, setCreateDateShouldBeIgnored, setCreateDateTime, setCreatedBy, setDeleted, setDeleteDate, setDeletedBy, setId, setLastUpdateBy, setLastUpdateDate, setLastUpdateDateTime, setTypedId, setVersion, userGroupEditBulkloadFilter, userGroupEditBulkloadFilter

    Methods inherited from class DomainObject Link icon

    deepCopy, getNewMidnightDate, getNewMidnightDateTime, isMidnight, isMidnight, jsonDeserialize, jsonDeserialize, jsonDeserialize, jsonDeserialize, jsonDeserialize, jsonDeserialize, jsonDeserialize, jsonDeserialize, jsonDeserialize, jsonDeserialize, jsonDeserialize, jsonDeserialize, jsonSerialize, jsonSerialize, jsonSerialize, jsonSerialize, jsonSerialize, jsonSerialize, jsonSerializedSizeOK, jsonSerializeToBytes, jsonSerializeToBytes, setToDayEnd, setToDayEnd, setToMidnight, setToMidnight, setToMidnightAsLocalDateTime, toPropertyMap, truncatedToString

    Methods inherited from class Object Link icon

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface NamedChangeTracker Link icon

    contextCurrentUser, getCreatedBy, setCreatedAndLastUpdated, setLastUpdateBy

    Methods inherited from interface PlasmaRestrictedObject Link icon

    canDeletePlasma, getId, getPlasmaName, getTypeCode, getTypedId

    Methods inherited from interface SourceTransactionIdTracker Link icon

    getTypedId, getVersion, logEntityCreateOrUpdate, logEntityDelete, obtainTextualRepresentation
  • Field Details Link icon

  • Constructor Details Link icon

    • LookupTable Link icon

      public LookupTable(Partition p, String uniqueName, String label)
    • LookupTable Link icon

      public LookupTable()
  • Method Details Link icon

    • getValueType Link icon

      public LookupTable.LookupTableValueType getValueType()
    • setValueType Link icon

      public void setValueType(LookupTable.LookupTableValueType valueType)
    • getType Link icon

      public LookupTable.LookupTableType getType()
    • setType Link icon

      public void setType(LookupTable.LookupTableType type)
    • getHideWarnings Link icon

      public boolean getHideWarnings()
    • setHideWarnings Link icon

      public void setHideWarnings(Boolean hideWarnings)
    • getFormatType Link icon

      public FieldFormatType getFormatType()
    • setFormatType Link icon

      public void setFormatType(FieldFormatType formatType)
    • getLookupTableId Link icon

      public Long getLookupTableId()
    • setLookupTableIdShouldBeIgnored Link icon

      public void setLookupTableIdShouldBeIgnored(Long id)
    • getNodeId Link icon

      public Long getNodeId()
      Specified by:
      getNodeId in interface TreeStructuredObject
    • setNodeId Link icon

      public void setNodeId(Number nodeId)
      Specified by:
      setNodeId in interface TreeStructuredObject
    • getUserGroupEdit Link icon

      public String getUserGroupEdit()
      Specified by:
      getUserGroupEdit in interface UserGroupRestrictedObject
    • setUserGroupEdit Link icon

      public void setUserGroupEdit(String userGroup)
      Specified by:
      setUserGroupEdit in interface UserGroupRestrictedObject
    • getUserGroupViewDetails Link icon

      public String getUserGroupViewDetails()
      Specified by:
      getUserGroupViewDetails in interface UserGroupRestrictedObject
    • setUserGroupViewDetails Link icon

      public void setUserGroupViewDetails(String userGroup)
      Specified by:
      setUserGroupViewDetails in interface UserGroupRestrictedObject
    • getLastUpdateByName Link icon

      public String getLastUpdateByName()
    • setLastUpdateByName Link icon

      public void setLastUpdateByName(String lastUpdateByName)
      Specified by:
      setLastUpdateByName in interface NamedChangeTracker
    • getCreatedByName Link icon

      public String getCreatedByName()
      Specified by:
      getCreatedByName in interface NamedChangeTracker
    • setCreatedByName Link icon

      public void setCreatedByName(String createdByName)
      Specified by:
      setCreatedByName in interface NamedChangeTracker
    • getOwner Link icon

      public String getOwner()
    • setOwner Link icon

      public void setOwner(String owner)
    • newXLookupTableValue Link icon

      public MetaAttributed newXLookupTableValue()
    • newMatrixLookupTableValue Link icon

      public AbstractMatrixLookupTableValue newMatrixLookupTableValue()
    • newJsonLookupTableValue Link icon

      public AbstractJsonLookupTableValue newJsonLookupTableValue()
    • getMatrixLookupTableClass Link icon

      public Class<? extends AbstractMatrixLookupTableValue> getMatrixLookupTableClass()
    • getJsonLookupTableClass Link icon

      public Class<? extends AbstractJsonLookupTableValue> getJsonLookupTableClass()
    • getXLookupTableClass Link icon

      public Class<? extends PersistedObject> getXLookupTableClass()
    • isMatrixLookupTableValueClass Link icon

      public static boolean isMatrixLookupTableValueClass(Class<?> clazz)
    • getNumberOfKeyFields Link icon

      public int getNumberOfKeyFields()
    • getLookupValueFieldName Link icon

      public String getLookupValueFieldName(int index)
    • getCopyValuesNamedQuery Link icon

      public String getCopyValuesNamedQuery()
    • doHardDelete Link icon

      public boolean doHardDelete()
      Description copied from class: net.pricefx.domain.PersistedObject
      Override to define if an object instance should be really deleted (vs just marked as deleted) Default: soft-delete
      Specified by:
      doHardDelete in interface Persistable
      Overrides:
      doHardDelete in class PersistedObject
    • isPlasma Link icon

      public boolean isPlasma()
      Specified by:
      isPlasma in interface PlasmaRestrictedObject
    • setPlasma Link icon

      public void setPlasma(Boolean isPlasma)
      Specified by:
      setPlasma in interface PlasmaRestrictedObject
    • validate Link icon

      public boolean validate(ValidationVisitor validationVisitor, PersistedObjectService objService)
      Description copied from class: net.pricefx.domain.PersistedObject
      Override to implement per-object validation rules
      Specified by:
      validate in interface Persistable
      Overrides:
      validate in class TimedObjectWithStatus
      Parameters:
      validationVisitor - visitor object that receives validation error details
      objService - PersistedObjectService instance. May be null, so be cautious when requiring it
    • canRead Link icon

      public boolean canRead(User user, ValidationVisitor visitor, PersistedObjectService txn)
      Description copied from class: net.pricefx.domain.PersistedObject
      Override this method to do readability checks based on request details and object data (or related object data) In case of a false return value a validation error should be added.

      This is mostly used to check if a user can access details of an object (e.g., values of an LT, calculation results of a JST) but not for fetching collections of objects. Collection of objects are mainly filtered via AuthUtil.createUserGroupViewDetailsRestrictionFilter(Class, User).

      Overrides:
      canRead in class PersistedObject
      Parameters:
      user - that requests read access
      visitor - receives any "not allowed messages"
      txn - needed for cross object readability checks. Implemented as parameter to optimize performance (vs. new object creation)
      Returns:
      true if read is allowed, false otherwise
    • canAdd Link icon

      public boolean canAdd(User user, ValidationVisitor validationVisitor, PersistedObjectService objService)
      Description copied from class: net.pricefx.domain.PersistedObject
      Override this method to restrict the possibility to add an object of this type. Typically this call makes most sense once the properties of the object to add have been set.

      Default: true

      Overrides:
      canAdd in class PersistedObject
      Parameters:
      user - that requests add access
      validationVisitor - receives any "not allowed messages"
      objService - needed for cross object edit-ability checks. Implemented as parameter to optimize performance (vs. new object creation)
    • canEdit Link icon

      public boolean canEdit(User user, ValidationVisitor validationVisitor, PersistedObjectService objService, Map<String,Object> fieldsToEdit)
      Description copied from class: net.pricefx.domain.PersistedObject
      Override this method to do edit-ability checks based on request details and object data (or related object data) and new data from request In case of a false return value a validation error should be added.
      Overrides:
      canEdit in class PersistedObject
      Parameters:
      user - that requests edit access
      validationVisitor - receives any "not allowed messages"
      objService - needed for cross object edit-ability checks. Implemented as parameter to optimize performance (vs. new object creation)
      fieldsToEdit - fields and their values that are about to be modified. To implement more fine-grained edit-ability checks (like e.g. allow tree repositioning while the object is otherwise locked)
      Returns:
      true if edit is allowed, false otherwise
    • canDelete Link icon

      public boolean canDelete(User user, ValidationVisitor validationVisitor, PersistedObjectService objService)
      Description copied from class: net.pricefx.domain.PersistedObject
      Override this method to restrict the possibility to delete an object of this type.

      Default: true

      Overrides:
      canDelete in class PersistedObject
      Parameters:
      user - that requests delete access
      validationVisitor - receives any "not allowed messages"
      objService - needed for cross object edit-ability checks. Implemented as parameter to optimize performance (vs. new object creation)
    • buildValuesSearch Link icon

      public Search buildValuesSearch(int startRow, int endRow, Map<String,Object> filters, String filterMatchStyle, List<String> sortBy, List<String> fields, boolean distinct, PersistedObjectService objService)
    • getMatrixLookupTableMeta Link icon

      public static Collection<? extends MatrixLookupTableAttributeMeta> getMatrixLookupTableMeta(LookupTable lookupTable, PersistedObjectService objService)
    • getJsonLookupTableMeta Link icon

      public static Collection<? extends JsonLookupTableAttributeMeta> getJsonLookupTableMeta(LookupTable lookupTable, PersistedObjectService objService)
    • onPreProcessing Link icon

      public boolean onPreProcessing(Map<String,Object> values, LocalDateTime targetDate)
      Description copied from interface: net.pricefx.domain.APIModifiable
      Invoked before processing starts. Good point to normalize the structure. For instance lookup LookupTable and set it into the values.
      Specified by:
      onPreProcessing in interface APIModifiable
      Parameters:
      values -
      Returns:
      false when processing should be stopped
    • onSaveOrUpdate Link icon

      public void onSaveOrUpdate(PersistedObjectService objService)
      Description copied from class: net.pricefx.domain.PersistedObject
      Default does nothing. Method is called when object is about to be saved or updated Override point
      Overrides:
      onSaveOrUpdate in class PersistedObject
    • onSavedOrUpdated Link icon

      public void onSavedOrUpdated(PersistedObjectService objService)
      Overrides:
      onSavedOrUpdated in class PersistedObject
    • onDelete Link icon

      public void onDelete(PersistedObjectService objService)
      Description copied from class: net.pricefx.domain.PersistedObject
      Default does nothing. Method is called when object is about to be deleted Override point
      Overrides:
      onDelete in class PersistedObject
    • bumpVersion Link icon

      public void bumpVersion()
      Overrides:
      bumpVersion in class PersistedObject