Class PriceGrid

Object
DomainObject
PersistedObject
PartitionedObject
AbstractCalculable
CalculableObject
MatrixableCalculableObject
PriceGrid
All Implemented Interfaces:
APIModifiable, Calculable, HasCalculableObjectItems, JobNameProvider, JobSettingsProvider, NamedChangeTracker, Persistable, TreeStructuredObject, UserGroupRestrictedObject

@Entity public class PriceGrid extends MatrixableCalculableObject implements TreeStructuredObject, UserGroupRestrictedObject, APIModifiable, NamedChangeTracker, JobSettingsProvider
  • Nested Class Summary Link icon

    Nested classes/interfaces inherited from class MatrixableCalculableObject Link icon

    MatrixableCalculableObject.ListType

    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
     

    Fields inherited from class AbstractCalculable Link icon

    FIELD_CALCDATE, FIELD_CALCMESSAGES, FIELD_CALCSTARTDATE, FIELD_STATUS, MAX_CALCULATION_MESSAGE_THRESHOLD

    Fields inherited from class PartitionedObject Link icon

    FIELD_PARTITION, FIELD_PARTITIONID

    Fields inherited from class PersistedObject Link icon

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

    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
     
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    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
    Override to define if an object instance should be really deleted (vs just marked as deleted) Default: soft-delete
    getAgentOption1(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
     
    boolean
     
    void
    itemsStateChanged(PersistedObjectService objService)
     
    int
    jobSize(PersistedObjectService objectService, JobStatusTracker jst, int runNumber)
     
    boolean
    Invoked before processing starts.
    void
    onSaveOrUpdate(PersistedObjectService objService)
    Default does nothing.
     
    void
     
    void
     
    void
    setCreatedByName(String createdByName)
     
    void
    setDescription(String description)
     
    void
    setHeaderTypeUniqueName(String headerTypeUniqueName)
     
    void
    setIntegrationStatus(String integrationStatus)
     
    void
    setLastUpdateByName(String lastUpdateByName)
     
    void
    setNodeId(Number nodeId)
     
    void
    setPartialCalculationDate(LocalDateTime lastPartialCalculation)
     
    void
    setPriceGridConfiguration(PriceGridConfiguration configuration)
     
    void
     
    void
    setPriceGridType(MatrixableCalculableObject.ListType priceGridType)
     
    void
    setRelativeTargetDateDays(Integer relativeTargetDateDays)
     
    void
     
    void
    setUpdatedBy(Long updateBy)
     
    void
     
    void
     
    void
    updateHeaderApprovalState(PersistedObjectService objService)
     
    int[]
    updatePriceGridNumbers(PersistedObjectService objService)
     
    boolean
    validate(ValidationVisitor validationVisitor, PersistedObjectService objService)
    Override to implement per-object validation rules

    Methods inherited from class MatrixableCalculableObject Link icon

    anyToRecalculation

    Methods inherited from class CalculableObject Link icon

    getKeepManualOverrides, getNumberOfItems, getWriteOnlyChangedItems, setKeepManualOverrides, setNumberOfItems, setWriteOnlyChangedItems

    Methods inherited from class AbstractCalculable Link icon

    calculationDate, calculationStartDate, getCalculationConcurrencyKey, getCalculationDate, getCalculationMessages, getCalculationStartDate, getJobName, getLabel, getLocale, getStatus, getTargetDate, setCalculationDate, setCalculationMessages, setCalculationMessages, setCalculationStartDate, setLabel, setLocale, setStatus, setTargetDate

    Methods inherited from class PartitionedObject Link icon

    addUniqueConstraint, getLoginNameByUserId, getPartition, setPartition, toString

    Methods inherited from class PersistedObject Link icon

    auditOperation, bumpVersion, canAdd, canEdit, canRead, createDate, entityIsSafeInserted, entityIsSafeInserted, getBulkloadMap, getBusinessKey, getCreateDate, getCreatedBy, getDbColumnNameForField, getDefaultSortKey, getDeleteDate, getDeletedBy, getId, getLastUpdateBy, getLastUpdateDate, getSignificantFields, getTypeCode, getTypedId, getVersion, getVirtualSearchFieldMappings, getVirtualSortFieldMappings, isAudited, isDeleted, isVirtualSearchField, lastUpdateDate, notifyOnBusinessKeyChange, onBusinessKeyChange, onDelete, onRefreshed, onSavedOrUpdated, 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, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface NamedChangeTracker Link icon

    contextCurrentUser, getCreatedBy, setCreatedAndLastUpdated, setLastUpdateBy

    Methods inherited from interface Persistable Link icon

    getCreateDate, getCreatedBy, getDeleteDate, getDeletedBy, getId, getLastUpdateBy, getLastUpdateDate, getTypeCode, getTypedId, getVersion, isDeleted, setCreateDate, setCreatedBy, setDeleted, setDeleteDate, setDeletedBy, setId, setLastUpdateBy, setLastUpdateDate, setVersion
  • Field Details Link icon

  • Constructor Details Link icon

    • PriceGrid Link icon

      public PriceGrid()
  • Method Details Link icon

    • getConfiguration Link icon

      public String getConfiguration()
    • setPriceGridConfiguration Link icon

      public void setPriceGridConfiguration(PriceGridConfiguration configuration)
    • setConfigurationString Link icon

      public void setConfigurationString(String configuration)
    • getPriceGridConfiguration Link icon

      public PriceGridConfiguration getPriceGridConfiguration()
    • getDescription Link icon

      public String getDescription()
    • setDescription Link icon

      public void setDescription(String description)
    • getUpdatedBy Link icon

      public Long getUpdatedBy()
    • getUpdateDate Link icon

      public LocalDateTime getUpdateDate()
    • setUpdateDate Link icon

      public void setUpdateDate(LocalDateTime updateDate)
    • setUpdatedBy Link icon

      public void setUpdatedBy(Long updateBy)
    • getPriceGridId Link icon

      public Long getPriceGridId()
    • setPriceGridIdShouldBeIgnored Link icon

      public void setPriceGridIdShouldBeIgnored(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
    • getApprovalState Link icon

      public ApprovalState getApprovalState()
    • setApprovalState Link icon

      public void setApprovalState(ApprovalState approvalState)
    • 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
    • getRelativeTargetDateDays Link icon

      public Integer getRelativeTargetDateDays()
    • setRelativeTargetDateDays Link icon

      public void setRelativeTargetDateDays(Integer relativeTargetDateDays)
    • getNumberOfApprovedItems Link icon

      public Integer getNumberOfApprovedItems()
    • getNumberOfOpenItems Link icon

      public Integer getNumberOfOpenItems()
    • getNumberOfDeniedItems Link icon

      public Integer getNumberOfDeniedItems()
    • getNumberOfAutoApprovedItems Link icon

      public Integer getNumberOfAutoApprovedItems()
    • getNumberOfSubmittedItems Link icon

      public Integer getNumberOfSubmittedItems()
    • getPartialCalculationDate Link icon

      public LocalDateTime getPartialCalculationDate()
    • setPartialCalculationDate Link icon

      public void setPartialCalculationDate(LocalDateTime lastPartialCalculation)
    • getIntegrationStatus Link icon

      public String getIntegrationStatus()
    • setIntegrationStatus Link icon

      public void setIntegrationStatus(String integrationStatus)
    • partialCalculationDate Link icon

      public String partialCalculationDate()
    • getEffectiveTargetDate Link icon

      public LocalDateTime getEffectiveTargetDate(PersistedObjectService objService)
      Overrides:
      getEffectiveTargetDate in class CalculableObject
    • getPriceGridType Link icon

      public MatrixableCalculableObject.ListType getPriceGridType()
    • getListType Link icon

      public MatrixableCalculableObject.ListType getListType()
      Overrides:
      getListType in class MatrixableCalculableObject
    • setPriceGridType Link icon

      public void setPriceGridType(MatrixableCalculableObject.ListType priceGridType)
    • 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 AbstractCalculable
      Parameters:
      validationVisitor - visitor object that receives validation error details
      objService - PersistedObjectService instance. May be null, so be cautious when requiring it
    • 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)
    • getItemClass Link icon

      public Class<? extends AbstractPriceGridItem> getItemClass()
      Specified by:
      getItemClass in interface HasCalculableObjectItems
    • getItemClassS Link icon

      public static Class<? extends AbstractPriceGridItem> getItemClassS(MatrixableCalculableObject.ListType type)
    • getItemListFilterField Link icon

      public String getItemListFilterField()
      Specified by:
      getItemListFilterField in interface HasCalculableObjectItems
    • getItemListFilterFieldS Link icon

      public static String getItemListFilterFieldS()
    • isMatrix Link icon

      public boolean isMatrix()
      Overrides:
      isMatrix in class MatrixableCalculableObject
    • getItemAttributeMetaClass Link icon

      public Class<? extends ElementAttributeMeta> getItemAttributeMetaClass()
      Specified by:
      getItemAttributeMetaClass in interface HasCalculableObjectItems
    • updatePriceGridNumbers Link icon

      public int[] updatePriceGridNumbers(PersistedObjectService objService)
    • updateHeaderApprovalState Link icon

      public void updateHeaderApprovalState(PersistedObjectService objService)
    • getDefaultTrackerType Link icon

      public JobStatusTracker.TrackerType getDefaultTrackerType()
      Specified by:
      getDefaultTrackerType in class AbstractCalculable
    • itemsStateChanged Link icon

      public void itemsStateChanged(PersistedObjectService objService)
      Overrides:
      itemsStateChanged in class CalculableObject
    • 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 AbstractCalculable
    • getHeaderTypeUniqueName Link icon

      public String getHeaderTypeUniqueName()
    • setHeaderTypeUniqueName Link icon

      public void setHeaderTypeUniqueName(String headerTypeUniqueName)
    • 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
    • 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
    • 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
    • getLastUpdateByName Link icon

      public String getLastUpdateByName()
    • setLastUpdateByName Link icon

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

      public String getJobType()
      Specified by:
      getJobType in interface JobSettingsProvider
    • isShotgunEnabled Link icon

      public boolean isShotgunEnabled()
      Specified by:
      isShotgunEnabled in interface JobSettingsProvider
    • getShotgunThreshold Link icon

      public int getShotgunThreshold(PersistedObjectService objService, JobStatusTracker jst)
      Specified by:
      getShotgunThreshold in interface JobSettingsProvider
    • jobSize Link icon

      public int jobSize(PersistedObjectService objectService, JobStatusTracker jst, int runNumber)
      Specified by:
      jobSize in interface JobSettingsProvider
    • getAgentOption1 Link icon

      public Object getAgentOption1(PersistedObjectService objService, JobStatusTracker jst, int runNumber)
      Specified by:
      getAgentOption1 in interface JobSettingsProvider