Class PDTRow

    • Field Detail

      • DATERANGE

        @Deprecated
        public static final java.lang.String DATERANGE
        Deprecated.
        since ages
        See Also:
        Constant Field Values
      • DATE_RANGE

        @Deprecated
        public static final java.lang.String DATE_RANGE
        Deprecated.
        since ages
        See Also:
        Constant Field Values
      • START_TIME

        @Deprecated
        public static final java.lang.String START_TIME
        Deprecated.
        since ages
        See Also:
        Constant Field Values
      • END_TIME

        @Deprecated
        public static final java.lang.String END_TIME
        Deprecated.
        since ages
        See Also:
        Constant Field Values
      • ALL_PRODUCTS

        public static final Product ALL_PRODUCTS
        Field ALL_PRODUCTS
      • ALL_PRODUCT_GROUPS

        public static final java.lang.String ALL_PRODUCT_GROUPS
        Field ALL_PRODUCT_GROUPS
      • ALL_USERS

        public static final User ALL_USERS
        Field ALL_USERS
      • ALL_USER_GROUPS

        public static final java.lang.String ALL_USER_GROUPS
        Field ALL_USER_GROUPS
    • Constructor Detail

      • PDTRow

        public PDTRow()
    • Method Detail

      • createItem

        protected Item createItem​(SessionContext ctx,
                                  ComposedType type,
                                  Item.ItemAttributeMap allAttributes)
                           throws JaloBusinessException
        Description copied from class: Item
        Has to be implemented for each concrete subtype of item. This method is responsible for creating a new item instance ( by calling managers, ejb homes, etc. ) during ComposedType.newInstance(Map).

        In case this method uses any of the attribute values during creation it is required to override Item.getNonInitialAttributes(SessionContext, ItemAttributeMap) too.
        Sn example:

        
         public static final String MY_ATTRIBUTE = "someAttribute"; ... protected Item createItem(SessionContext
         ctx, ComposedType type, Map allAttributes ) throws JaloBusinessException { MyManager man = ... return
         man.createMyItem( (String)allAttributes.get(MY_ATTRIBUTE) );
         // here MY_ATTRIBUTE is used for creation, so it must not be set again } protected Map getNonInitialAttributes(
         SessionContext ctx, Map allAttributes ) { // let superclass remove its own initial attributes Map ret =
         super.getNonInitialAttributes( ctx, allAttributes );
         // remove MY_ATTRIBUTE from all attributes since if has already been set ret.remove(MY_ATTRIBUTE); return ret; }
        
         
        Overrides:
        createItem in class GenericItem
        Parameters:
        ctx - the current session context which this item is created within
        type - the actual item type ( since subtypes may not provide a own jalo class this may be different from the type which this method was implemented for )
        Returns:
        the new item instance
        Throws:
        JaloBusinessException - indicates an error during creation - any changes will be rollbacked
      • setProductMatchQualifier

        public void setProductMatchQualifier​(SessionContext ctx,
                                             java.lang.Long value)
        Overwritten to disallow changing this calculated field from outside this class
        Overrides:
        setProductMatchQualifier in class GeneratedPDTRow
        value - the productMatchQualifier
      • setUserMatchQualifier

        public void setUserMatchQualifier​(SessionContext ctx,
                                          java.lang.Long value)
        Overwritten to disallow changing this calculated field from outside this class
        Overrides:
        setUserMatchQualifier in class GeneratedPDTRow
        value - the userMatchQualifier
      • getInitialProductMatchField

        protected java.lang.Long getInitialProductMatchField​(Item.ItemAttributeMap allAttributes)
      • getInitialUserMatchField

        protected java.lang.Long getInitialUserMatchField​(Item.ItemAttributeMap allAttributes)
      • updateProductMatchField

        protected void updateProductMatchField()
      • updateUserMatchField

        protected void updateUserMatchField()
      • removeLinks

        protected void removeLinks()
        Superclass method overridden to skip searching for links during removal of a PDTRow. PDTRows are not linked!
        Overrides:
        removeLinks in class Item
      • getProductPriceGroup

        @Deprecated
        public EnumerationValue getProductPriceGroup()
        Deprecated.
        since ages - please use getProductGroup() instead
        Specified the product price group this rule is assigned to. This field is only of interest if no product was specified.Please note that by now product price groups are not managed by the hybris Platform, and therefore are only Strings. null is a valid value and means that all groups are matched, while an empty String will result in an invisible PriceRow as it is only matching the "empty String" product price group.
      • getProductGroup

        public EnumerationValue getProductGroup()
        Specified the product price group this rule is assigned to. This field is only of interest if no product was specified.Please note that by now product price groups are not managed by the hybris Platform, and therefore are only Strings. null is a valid value and means that all groups are matched, while an empty String will result in an invisible PriceRow as it is only matching the "empty String" product price group.
      • getCustomer

        @Deprecated
        public Customer getCustomer()
        Deprecated.
        since ages - please use getUser() instead.
        The customer this rule is assigned to. If null is set all customers are meant. If one is specified the customer price group field is not evaluated.
      • getCustomer

        @Deprecated
        public Customer getCustomer​(SessionContext ctx)
        Deprecated.
        since ages - please use getUser(SessionContext) instead.
        Parameters:
        ctx -
      • getCustomerPriceGroup

        @Deprecated
        public EnumerationValue getCustomerPriceGroup()
        Deprecated.
        since ages - please use getCustomerGroup() instead
        The customer price group which this rule is assigned to. This applies only if no customer is specified. Please note that by now customer price groups are not managed by the hybris Platform, and therefore are only Strings. null is a valid value and means that all groups are matched.
      • getCustomerGroup

        @Deprecated
        public EnumerationValue getCustomerGroup()
        Deprecated.
        since ages - please use getUserGroup instead.
        The customer price group which this rule is assigned to. This applies only if no customer is specified. Please note that by now customer price groups are not managed by the hybris Platform, and therefore are only Strings. null is a valid value and means that all groups are matched.
      • getUserGroup

        public EnumerationValue getUserGroup()
        The user group which this rule is assigned to. This applies only if no user is specified. Please note that by now user groups are not managed by the hybris Platform, and therefore are only Strings. null is a valid value and means that all groups are matched.
      • getDateRange

        public StandardDateRange getDateRange​(SessionContext ctx)
        The range of time which this row is valid within. If null the row is always valid.
      • remove

        public void remove​(SessionContext ctx)
                    throws ConsistencyCheckException
        Description copied from class: Item
        Removes this item.

        This method is using the following attributes of the given SessionContext:

        CacheUsage   Language   StagingMethod
        n/a (this is a setter method)   no, language doesn't matter for removal   yes if called on a StageableItem, no otherwise


        Overrides:
        remove in class Item
        Parameters:
        ctx - A SessionContext object
        Throws:
        ConsistencyCheckException - if this item could not be removed for some reason
      • setProperty

        public java.lang.Object setProperty​(SessionContext ctx,
                                            java.lang.String name,
                                            java.lang.Object value)
        Overwritten to mark owning product as modified each time a property of this row has been changed.
        Overrides:
        setProperty in class ExtensibleItem
        Parameters:
        ctx - A SessionContext object
        name - the name (key) of the property
        value - the value
        Returns:
        the property that was bound to the name or null if there was no property.
      • markProductModified

        protected void markProductModified()
        Marks the product which this row (might) belong to modified. This method is called upon all modifications done to a PDTRow to allow proper product modification status.

        This functionality can be enabled / disabled using two config settings. First you can enabled / disable it using the session attribute Europe1Constants.PDTROW_MARK_PRODUCT_MODIFIED to true / false. If this session attribute is set to true, the product will be marked as modified independent of the other config setting. If set to false, the config property pdtrow.mark.product.modified configured in your local.properties will be evaluated, if set to true, the product will be marked modified, if set to false the mark as modified will be skipped.

        By default this feature is disabled (no session attribute set (-> false) and the default value in project.properties is set to false.