Package net.pricefx.domain
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
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic enumstatic final classNested classes/interfaces inherited from class TimedObjectWithStatus
TimedObjectWithStatus.TimedObjectStatusNested classes/interfaces inherited from class PersistedObject
PersistedObject.BatchDelete, PersistedObject.BulkloadFilterCheckCallback, PersistedObject.ComputedFieldMapping, PersistedObject.ComputedFields, PersistedObject.ImportManagerEnabled, PersistedObject.PersistedObjectMeta, PersistedObject.VirtualField, PersistedObject.VirtualFieldMapping, PersistedObject.VirtualFields, PersistedObject.VirtualSearchFields, PersistedObject.VirtualSortFields -
Field Summary
FieldsFields inherited from class TimedObjectWithStatus
FIELD_SIMULATIONSET, FIELD_STATUS, simulationSetFields inherited from class TimedObject
FIELD_VALIDAFTERFields inherited from class NamedObject
FIELD_LABEL, FIELD_UNIQUENAMEFields inherited from class PartitionedObject
FIELD_PARTITION, FIELD_PARTITIONID, PARTITION_FILTER_NAME, PARTITION_FILTER_PARAMFields inherited from class PersistedObject
FIELD_CREATEDATE, FIELD_CREATEDBY, FIELD_DELETEDATE, FIELD_DELETEDBY, FIELD_ID, FIELD_ISDELETED, FIELD_LASTUPDATEBY, FIELD_LASTUPDATEDATE, FIELD_VERSIONFields inherited from class DomainObject
DEFAULT_MAX_PACKET_SIZEFields inherited from interface UserGroupRestrictedObject
FIELD_USERGROUPEDIT, FIELD_USERGROUPVIEWDETAILS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSearchbuildValuesSearch(int startRow, int endRow, Map<String, Object> filters, String filterMatchStyle, List<String> sortBy, List<String> fields, boolean distinct, PersistedObjectService objService) voidbooleanOverride this method to restrict the possibility to add an object of this type.booleanOverride this method to restrict the possibility to delete an object of this type.booleancanEdit(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.booleanOverride 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.booleanOverride to define if an object instance should be really deleted (vs just marked as deleted) Default: soft-deletebooleanClass<? extends AbstractJsonLookupTableValue> static Collection<? extends JsonLookupTableAttributeMeta> getJsonLookupTableMeta(LookupTable lookupTable, PersistedObjectService objService) getLookupValueFieldName(int index) Class<? extends AbstractMatrixLookupTableValue> static Collection<? extends MatrixLookupTableAttributeMeta> getMatrixLookupTableMeta(LookupTable lookupTable, PersistedObjectService objService) intgetOwner()getType()Class<? extends PersistedObject> static booleanisMatrixLookupTableValueClass(Class<?> clazz) booleanisPlasma()AbstractJsonLookupTableValueAbstractMatrixLookupTableValueMetaAttributedvoidonDelete(PersistedObjectService objService) Default does nothing.booleanonPreProcessing(Map<String, Object> values, LocalDateTime targetDate) Invoked before processing starts.voidonSavedOrUpdated(PersistedObjectService objService) voidonSaveOrUpdate(PersistedObjectService objService) Default does nothing.voidsetCreatedByName(String createdByName) voidsetFormatType(FieldFormatType formatType) voidsetHideWarnings(Boolean hideWarnings) voidsetLastUpdateByName(String lastUpdateByName) voidvoidvoidvoidvoidvoidsetUserGroupEdit(String userGroup) voidsetUserGroupViewDetails(String userGroup) voidsetValueType(LookupTable.LookupTableValueType valueType) booleanvalidate(ValidationVisitor validationVisitor, PersistedObjectService objService) Override to implement per-object validation rulesMethods inherited from class TimedObjectWithStatus
getBusinessKey, getSignificantFields, getSimulationSet, getStatus, isActive, setSimulationSet, setStatusMethods inherited from class TimedObject
getValidAfter, setValidAfterMethods inherited from class NamedObject
equals, getJobName, getLabel, getLabelOrUniqueName, getUniqueName, hashCode, labelValid, setLabel, setUniqueName, toString, uniqueNameValidMethods inherited from class PartitionedObject
addUniqueConstraint, getLoginNameByUserId, getPartition, setPartitionMethods inherited from class PersistedObject
auditOperation, canEdit, createDate, entityIsSafeInserted, entityIsSafeInserted, getBulkloadMap, getCreateDate, getCreatedBy, getDbColumnNameForField, getDeleteDate, getDeletedBy, getId, getLastUpdateBy, getLastUpdateDate, getSensitiveFields, 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, userGroupEditBulkloadFilterMethods inherited from class DomainObject
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, truncatedToStringMethods inherited from interface NamedChangeTracker
contextCurrentUser, getCreatedBy, setCreatedAndLastUpdated, setLastUpdateByMethods inherited from interface PlasmaRestrictedObject
canDeletePlasma, getId, getPlasmaName, getTypeCode, getTypedIdMethods inherited from interface SourceTransactionIdTracker
getTypedId, getVersion, logEntityCreateOrUpdate, logEntityDelete, obtainTextualRepresentation
-
Field Details
-
FIELD_OWNER
- See Also:
-
FIELD_NAME
- See Also:
-
LTV_FIELD_LOOKUP_TABLE_ID
- See Also:
-
-
Constructor Details
-
LookupTable
-
LookupTable
public LookupTable()
-
-
Method Details
-
getValueType
-
setValueType
-
getType
-
setType
-
getHideWarnings
public boolean getHideWarnings() -
setHideWarnings
-
getFormatType
-
setFormatType
-
getLookupTableId
-
setLookupTableIdShouldBeIgnored
-
getNodeId
- Specified by:
getNodeIdin interfaceTreeStructuredObject
-
setNodeId
- Specified by:
setNodeIdin interfaceTreeStructuredObject
-
getUserGroupEdit
- Specified by:
getUserGroupEditin interfaceUserGroupRestrictedObject
-
setUserGroupEdit
- Specified by:
setUserGroupEditin interfaceUserGroupRestrictedObject
-
getUserGroupViewDetails
- Specified by:
getUserGroupViewDetailsin interfaceUserGroupRestrictedObject
-
setUserGroupViewDetails
- Specified by:
setUserGroupViewDetailsin interfaceUserGroupRestrictedObject
-
getLastUpdateByName
-
setLastUpdateByName
- Specified by:
setLastUpdateByNamein interfaceNamedChangeTracker
-
getCreatedByName
- Specified by:
getCreatedByNamein interfaceNamedChangeTracker
-
setCreatedByName
- Specified by:
setCreatedByNamein interfaceNamedChangeTracker
-
getOwner
-
setOwner
-
newXLookupTableValue
public MetaAttributed newXLookupTableValue() -
newMatrixLookupTableValue
public AbstractMatrixLookupTableValue newMatrixLookupTableValue() -
newJsonLookupTableValue
public AbstractJsonLookupTableValue newJsonLookupTableValue() -
getMatrixLookupTableClass
-
getJsonLookupTableClass
-
getXLookupTableClass
-
isMatrixLookupTableValueClass
-
getNumberOfKeyFields
public int getNumberOfKeyFields() -
getLookupValueFieldName
-
getCopyValuesNamedQuery
-
doHardDelete
public boolean doHardDelete()Description copied from class:net.pricefx.domain.PersistedObjectOverride to define if an object instance should be really deleted (vs just marked as deleted) Default: soft-delete- Specified by:
doHardDeletein interfacePersistable- Overrides:
doHardDeletein classPersistedObject
-
isPlasma
public boolean isPlasma()- Specified by:
isPlasmain interfacePlasmaRestrictedObject
-
setPlasma
- Specified by:
setPlasmain interfacePlasmaRestrictedObject
-
validate
public boolean validate(ValidationVisitor validationVisitor, PersistedObjectService objService) Description copied from class:net.pricefx.domain.PersistedObjectOverride to implement per-object validation rules- Specified by:
validatein interfacePersistable- Overrides:
validatein classTimedObjectWithStatus- Parameters:
validationVisitor- visitor object that receives validation error detailsobjService- PersistedObjectService instance. May be null, so be cautious when requiring it
-
canRead
Description copied from class:net.pricefx.domain.PersistedObjectOverride 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:
canReadin classPersistedObject- Parameters:
user- that requests read accessvisitor- 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
public boolean canAdd(User user, ValidationVisitor validationVisitor, PersistedObjectService objService) Description copied from class:net.pricefx.domain.PersistedObjectOverride 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:
canAddin classPersistedObject- Parameters:
user- that requests add accessvalidationVisitor- receives any "not allowed messages"objService- needed for cross object edit-ability checks. Implemented as parameter to optimize performance (vs. new object creation)
-
canEdit
public boolean canEdit(User user, ValidationVisitor validationVisitor, PersistedObjectService objService, Map<String, Object> fieldsToEdit) Description copied from class:net.pricefx.domain.PersistedObjectOverride 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:
canEditin classPersistedObject- Parameters:
user- that requests edit accessvalidationVisitor- 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
public boolean canDelete(User user, ValidationVisitor validationVisitor, PersistedObjectService objService) Description copied from class:net.pricefx.domain.PersistedObjectOverride this method to restrict the possibility to delete an object of this type.Default: true
- Overrides:
canDeletein classPersistedObject- Parameters:
user- that requests delete accessvalidationVisitor- receives any "not allowed messages"objService- needed for cross object edit-ability checks. Implemented as parameter to optimize performance (vs. new object creation)
-
buildValuesSearch
-
getMatrixLookupTableMeta
public static Collection<? extends MatrixLookupTableAttributeMeta> getMatrixLookupTableMeta(LookupTable lookupTable, PersistedObjectService objService) -
getJsonLookupTableMeta
public static Collection<? extends JsonLookupTableAttributeMeta> getJsonLookupTableMeta(LookupTable lookupTable, PersistedObjectService objService) -
onPreProcessing
Description copied from interface:net.pricefx.domain.APIModifiableInvoked before processing starts. Good point to normalize the structure. For instance lookup LookupTable and set it into the values.- Specified by:
onPreProcessingin interfaceAPIModifiable- Parameters:
values-- Returns:
- false when processing should be stopped
-
onSaveOrUpdate
public void onSaveOrUpdate(PersistedObjectService objService) Description copied from class:net.pricefx.domain.PersistedObjectDefault does nothing. Method is called when object is about to be saved or updated Override point- Overrides:
onSaveOrUpdatein classPersistedObject
-
onSavedOrUpdated
public void onSavedOrUpdated(PersistedObjectService objService) - Overrides:
onSavedOrUpdatedin classPersistedObject
-
onDelete
public void onDelete(PersistedObjectService objService) Description copied from class:net.pricefx.domain.PersistedObjectDefault does nothing. Method is called when object is about to be deleted Override point- Overrides:
onDeletein classPersistedObject
-
bumpVersion
public void bumpVersion()- Overrides:
bumpVersionin classPersistedObject
-