Package net.pricefx.domain
Class PriceGrid
Object
DomainObject
PersistedObject
PartitionedObject
AbstractCalculable
CalculableObject
MatrixableCalculableObject
PriceGrid
- All Implemented Interfaces:
APIModifiable
,Calculable
,HasCalculableObjectItems
,JobNameProvider
,JobSettingsProvider
,NamedChangeTracker
,Persistable
,TreeStructuredObject
,UserGroupRestrictedObject
,WithLastUpdateByName
@Entity
public class PriceGrid
extends MatrixableCalculableObject
implements TreeStructuredObject, UserGroupRestrictedObject, APIModifiable, NamedChangeTracker, JobSettingsProvider
-
Nested Class Summary
Nested classes/interfaces inherited from class MatrixableCalculableObject
MatrixableCalculableObject.ListType
Nested classes/interfaces inherited from class PersistedObject
PersistedObject.BatchDelete, PersistedObject.BulkloadFilterCheckCallback, PersistedObject.ComputedFieldMapping, PersistedObject.ComputedFields, PersistedObject.PersistedObjectMeta, PersistedObject.VirtualField, PersistedObject.VirtualFieldMapping, PersistedObject.VirtualSearchFields, PersistedObject.VirtualSortFields
-
Field Summary
Fields inherited from class AbstractCalculable
FIELD_CALCDATE, FIELD_CALCMESSAGES, FIELD_CALCSTARTDATE, FIELD_STATUS, MAX_CALCULATION_MESSAGE_THRESHOLD
Fields inherited from class PartitionedObject
FIELD_PARTITION, FIELD_PARTITIONID
Fields inherited from class PersistedObject
FIELD_CREATEDATE, FIELD_CREATEDBY, FIELD_DELETEDATE, FIELD_DELETEDBY, FIELD_ID, FIELD_ISDELETED, FIELD_LASTUPDATEDATE
Fields inherited from class DomainObject
DEFAULT_MAX_PACKET_SIZE
Fields inherited from interface UserGroupRestrictedObject
FIELD_USERGROUPEDIT, FIELD_USERGROUPVIEWDETAILS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
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
Override to define if an object instance should be really deleted (vs just marked as deleted) Default: soft-deletegetAgentOption1
(PersistedObjectService objService, JobStatusTracker jst, int runNumber) JobStatusTracker.TrackerType
getEffectiveTargetDate
(PersistedObjectService objService) Class
<? extends ElementAttributeMeta> Class
<? extends AbstractPriceGridItem> static Class
<? extends AbstractPriceGridItem> getItemClassS
(MatrixableCalculableObject.ListType type) static String
MatrixableCalculableObject.ListType
PriceGridConfiguration
MatrixableCalculableObject.ListType
int
getShotgunThreshold
(PersistedObjectService objService, JobStatusTracker jst) boolean
isMatrix()
boolean
void
itemsStateChanged
(PersistedObjectService objService) int
jobSize
(PersistedObjectService objectService, JobStatusTracker jst, int runNumber) boolean
onPreProcessing
(Map<String, Object> values, LocalDateTime targetDate) Invoked before processing starts.void
onSaveOrUpdate
(PersistedObjectService objService) Default does nothing.void
setApprovalState
(ApprovalState approvalState) void
setConfigurationString
(String configuration) void
setCreatedByName
(String createdByName) void
setDescription
(String description) void
setHeaderTypeUniqueName
(String headerTypeUniqueName) void
setIntegrationStatus
(String integrationStatus) void
setLastUpdateByName
(String lastUpdateByName) void
void
setPartialCalculationDate
(LocalDateTime lastPartialCalculation) void
setPriceGridConfiguration
(PriceGridConfiguration configuration) void
void
setPriceGridType
(MatrixableCalculableObject.ListType priceGridType) void
setRelativeTargetDateDays
(Integer relativeTargetDateDays) void
setUpdateDate
(LocalDateTime updateDate) void
setUpdatedBy
(Long updateBy) void
setUserGroupEdit
(String userGroup) void
setUserGroupViewDetails
(String userGroup) void
updateHeaderApprovalState
(PersistedObjectService objService) int[]
updatePriceGridNumbers
(PersistedObjectService objService) boolean
validate
(ValidationVisitor validationVisitor, PersistedObjectService objService) Override to implement per-object validation rulesMethods inherited from class MatrixableCalculableObject
anyToRecalculation
Methods inherited from class CalculableObject
getKeepManualOverrides, getNumberOfItems, getWriteOnlyChangedItems, setKeepManualOverrides, setNumberOfItems, setWriteOnlyChangedItems
Methods inherited from class AbstractCalculable
calculationDate, calculationStartDate, getCalculationConcurrencyKey, getCalculationDate, getCalculationMessages, getCalculationStartDate, getJobName, getLabel, getLocale, getStatus, getTargetDate, setCalculationDate, setCalculationMessages, setCalculationMessages, setCalculationStartDate, setLabel, setLocale, setStatus, setTargetDate
Methods inherited from class PartitionedObject
addUniqueConstraint, getLoginNameByUserId, getPartition, setPartition, toString
Methods inherited from class PersistedObject
auditOperation, bumpVersion, canAdd, canEdit, canRead, createDate, entityIsSafeInserted, entityIsSafeInserted, findAnnotationRecursively, getBulkloadMap, getBusinessKey, getCreateDate, getCreatedBy, getDbColumnNameForField, getDefaultSortKey, getDeleteDate, getDeletedBy, getId, getLastUpdateBy, getLastUpdateDate, getSignificantFields, getTypeCode, getTypedId, getVersion, getVirtualFieldMappings, isAudited, isDeleted, isVirtualField, lastUpdateDate, notifyOnBusinessKeyChange, onBusinessKeyChange, onDelete, onSavedOrUpdated, setCreateDate, setCreateDateShouldBeIgnored, setCreateDateTime, setCreatedBy, setDeleted, setDeleteDate, setDeletedBy, setId, setLastUpdateBy, setLastUpdateDate, setLastUpdateDateTime, setTypedId, setVersion, userGroupEditBulkloadFilter, userGroupEditBulkloadFilter
Methods 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
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface NamedChangeTracker
getCreatedBy, setCreatedAndLastUpdated, setLastUpdateBy
Methods inherited from interface Persistable
getCreateDate, getCreatedBy, getDeleteDate, getDeletedBy, getId, getLastUpdateBy, getLastUpdateDate, getTypeCode, getTypedId, getVersion, isDeleted, setCreateDate, setCreatedBy, setDeleted, setDeleteDate, setDeletedBy, setId, setLastUpdateBy, setLastUpdateDate, setVersion
-
Field Details
-
TYPE_CODE
- See Also:
-
-
Constructor Details
-
PriceGrid
public PriceGrid()
-
-
Method Details
-
getConfiguration
-
setPriceGridConfiguration
public void setPriceGridConfiguration(PriceGridConfiguration configuration) -
setConfigurationString
-
getPriceGridConfiguration
public PriceGridConfiguration getPriceGridConfiguration() -
getDescription
-
setDescription
-
getUpdatedBy
-
getUpdateDate
-
setUpdateDate
-
setUpdatedBy
-
getPriceGridId
-
setPriceGridIdShouldBeIgnored
-
getNodeId
- Specified by:
getNodeId
in interfaceTreeStructuredObject
-
setNodeId
- Specified by:
setNodeId
in interfaceTreeStructuredObject
-
getApprovalState
-
setApprovalState
-
getUserGroupEdit
- Specified by:
getUserGroupEdit
in interfaceUserGroupRestrictedObject
-
setUserGroupEdit
- Specified by:
setUserGroupEdit
in interfaceUserGroupRestrictedObject
-
getUserGroupViewDetails
- Specified by:
getUserGroupViewDetails
in interfaceUserGroupRestrictedObject
-
setUserGroupViewDetails
- Specified by:
setUserGroupViewDetails
in interfaceUserGroupRestrictedObject
-
getRelativeTargetDateDays
-
setRelativeTargetDateDays
-
getNumberOfApprovedItems
-
getNumberOfOpenItems
-
getNumberOfDeniedItems
-
getNumberOfAutoApprovedItems
-
getNumberOfSubmittedItems
-
getPartialCalculationDate
-
setPartialCalculationDate
-
getIntegrationStatus
-
setIntegrationStatus
-
partialCalculationDate
-
getEffectiveTargetDate
- Overrides:
getEffectiveTargetDate
in classCalculableObject
-
getPriceGridType
public MatrixableCalculableObject.ListType getPriceGridType() -
getListType
public MatrixableCalculableObject.ListType getListType()- Overrides:
getListType
in classMatrixableCalculableObject
-
setPriceGridType
public void setPriceGridType(MatrixableCalculableObject.ListType priceGridType) -
validate
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 interfacePersistable
- Overrides:
validate
in classAbstractCalculable
- Parameters:
validationVisitor
- visitor object that receives validation error detailsobjService
- PersistedObjectService instance. May be null, so be cautious when requiring it
-
canEdit
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 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.PersistedObject
Override this method to restrict the possibility to delete an object of this type.Default: true
- Overrides:
canDelete
in 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)
-
getItemClass
- Specified by:
getItemClass
in interfaceHasCalculableObjectItems
-
getItemClassS
public static Class<? extends AbstractPriceGridItem> getItemClassS(MatrixableCalculableObject.ListType type) -
getItemListFilterField
- Specified by:
getItemListFilterField
in interfaceHasCalculableObjectItems
-
getItemListFilterFieldS
-
isMatrix
public boolean isMatrix()- Overrides:
isMatrix
in classMatrixableCalculableObject
-
getItemAttributeMetaClass
- Specified by:
getItemAttributeMetaClass
in interfaceHasCalculableObjectItems
-
updatePriceGridNumbers
public int[] updatePriceGridNumbers(PersistedObjectService objService) -
updateHeaderApprovalState
public void updateHeaderApprovalState(PersistedObjectService objService) -
getDefaultTrackerType
public JobStatusTracker.TrackerType getDefaultTrackerType()- Specified by:
getDefaultTrackerType
in classAbstractCalculable
-
itemsStateChanged
public void itemsStateChanged(PersistedObjectService objService) - Overrides:
itemsStateChanged
in classCalculableObject
-
doHardDelete
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 interfacePersistable
- Overrides:
doHardDelete
in classAbstractCalculable
-
getHeaderTypeUniqueName
-
setHeaderTypeUniqueName
-
onSaveOrUpdate
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 classPersistedObject
-
onPreProcessing
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 interfaceAPIModifiable
- Parameters:
values
-- Returns:
- false when processing should be stopped
-
getCreatedByName
- Specified by:
getCreatedByName
in interfaceNamedChangeTracker
-
setCreatedByName
- Specified by:
setCreatedByName
in interfaceNamedChangeTracker
-
getLastUpdateByName
-
setLastUpdateByName
- Specified by:
setLastUpdateByName
in interfaceNamedChangeTracker
- Specified by:
setLastUpdateByName
in interfaceWithLastUpdateByName
-
getJobType
- Specified by:
getJobType
in interfaceJobSettingsProvider
-
isShotgunEnabled
public boolean isShotgunEnabled()- Specified by:
isShotgunEnabled
in interfaceJobSettingsProvider
-
getShotgunThreshold
public int getShotgunThreshold(PersistedObjectService objService, JobStatusTracker jst) - Specified by:
getShotgunThreshold
in interfaceJobSettingsProvider
-
jobSize
public int jobSize(PersistedObjectService objectService, JobStatusTracker jst, int runNumber) - Specified by:
jobSize
in interfaceJobSettingsProvider
-
getAgentOption1
public Object getAgentOption1(PersistedObjectService objService, JobStatusTracker jst, int runNumber) - Specified by:
getAgentOption1
in interfaceJobSettingsProvider
-