Class PDTRow
- All Implemented Interfaces:
Serializable,Comparable
- Direct Known Subclasses:
GeneratedAbstractDiscountRow,GeneratedPriceRow,GeneratedTaxRow
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class de.hybris.platform.jalo.GenericItem
GenericItem.GenericItemImplNested classes/interfaces inherited from class de.hybris.platform.jalo.c2l.LocalizableItem
LocalizableItem.LocalizableItemImplNested classes/interfaces inherited from class de.hybris.platform.jalo.ExtensibleItem
ExtensibleItem.ExtensibleItemImplNested classes/interfaces inherited from class de.hybris.platform.jalo.Item
Item.AttributeFilter, Item.AttributeMode, Item.CachedGetter, Item.CachedSetter, Item.ItemAttributeMap, Item.ItemConstraint, Item.ItemImpl, Item.JaloCachedComputationException -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringField ALL_PRODUCT_GROUPSstatic final ProductField ALL_PRODUCTSstatic final StringField ALL_USER_GROUPSstatic final UserField ALL_USERSstatic final StringDeprecated.since agesstatic final StringDeprecated.since agesstatic final StringDeprecated.since agesstatic final StringDeprecated.since agesFields inherited from class de.hybris.platform.europe1.jalo.GeneratedPDTRow
DEFAULT_INITIAL_ATTRIBUTES, ENDTIME, PG, PRODUCT, PRODUCTID, PRODUCTMATCHQUALIFIER, STARTTIME, UG, USER, USERMATCHQUALIFIERFields inherited from class de.hybris.platform.jalo.c2l.LocalizableItem
LANGUAGE_FALLBACK_ENABLEDFields inherited from class de.hybris.platform.jalo.Item
_CREATION_TIME_INTERNAL, _MODIFIED_TIME_INTERNAL, accessorLog, CREATION_TIME, DISABLE_ATTRIBUTE_CHECK, DISABLE_ITEMCHECK_BEFORE_REMOVABLE, EVEN, FEATURE_ACCESSMAP_QUALIFIER, HJMPTS, INITIAL_CREATION_FLAG, isJaloOnly, MODIFIED_TIME, NEGATIVE, NOT_FOUND, OWNER, PK, POSITIVE, SAVE_FROM_SERVICE_LAYER, staticTransientObjects, TYPEFields inherited from class de.hybris.platform.util.BridgeAbstraction
impl, tenant -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ItemcreateItem(SessionContext ctx, ComposedType type, Item.ItemAttributeMap allAttributes) Has to be implemented for each concrete subtype of item.Deprecated.since ages - please use getUser() instead.Deprecated.since ages - please use getUser(SessionContext) instead.Deprecated.since ages - please use getUserGroup instead.Deprecated.since ages - please use getUserGroup instead.Deprecated.since ages - please use getCustomerGroup() insteadDeprecated.since ages - please use getUserGroup( SessionContext ctx) insteadThe range of time which this row is valid within.protected LonggetInitialProductMatchField(Item.ItemAttributeMap allAttributes) protected LonggetInitialUserMatchField(Item.ItemAttributeMap allAttributes) Specified the product price group this rule is assigned to.Deprecated.since ages - please use getProductGroup() insteadDeprecated.since ages - please use getProductGroup( SessionContext ctx ) insteadThe user group which this rule is assigned to.SeegetUserGroup().protected voidMarks the product which this row (might) belong to modified.voidremove(SessionContext ctx) Removes this item.protected voidSuperclass method overridden to skip searching for links during removal of a PDTRow.voidsetDateRange(SessionContext ctx, StandardDateRange dateRange) Method setDateRangevoidsetDateRange(StandardDateRange dateRange) protected voidsetPg(SessionContext ctx, EnumerationValue value) Whenever a non-null PG is set the product attribute is cleared.protected voidsetProduct(SessionContext ctx, Product value) Whenever a non-null product is set the PG attribute is cleared.voidsetProductId(SessionContext ctx, String value) Generated method - Setter of thePDTRow.productIdattribute.voidsetProductMatchQualifier(SessionContext ctx, Long value) Overwritten to disallow changing this calculated field from outside this classsetProperty(SessionContext ctx, String name, Object value) Overwritten to mark owning product as modified each time a property of this row has been changed.voidsetUg(SessionContext ctx, EnumerationValue value) Whenever a non-null UG is set the user attribute is cleared.voidsetUser(SessionContext ctx, User value) Whenever a non-null user is set the UG attribute is cleared.voidsetUserMatchQualifier(SessionContext ctx, Long value) Overwritten to disallow changing this calculated field from outside this classprotected voidprotected voidMethods inherited from class de.hybris.platform.europe1.jalo.GeneratedPDTRow
getDefaultAttributeModes, getEndTime, getEndTime, getPg, getPg, getProduct, getProduct, getProductId, getProductId, getProductMatchQualifier, getProductMatchQualifier, getProductMatchQualifierAsPrimitive, getProductMatchQualifierAsPrimitive, getStartTime, getStartTime, getUg, getUg, getUser, getUser, getUserMatchQualifier, getUserMatchQualifier, getUserMatchQualifierAsPrimitive, getUserMatchQualifierAsPrimitive, setEndTime, setEndTime, setPg, setProduct, setProductId, setProductMatchQualifier, setProductMatchQualifier, setProductMatchQualifier, setStartTime, setStartTime, setUg, setUser, setUserMatchQualifier, setUserMatchQualifier, setUserMatchQualifierMethods inherited from class de.hybris.platform.jalo.GenericItem
getImplementation, getInitialProperties, getNonInitialAttributes, getRelatedItems, getRelatedItems, setRelatedItemsMethods inherited from class de.hybris.platform.jalo.c2l.LocalizableItem
getAllLocalizedProperties, getAllLocalizedProperties, getAllLocalizedProperties, getAllLocalizedProperties, getAllValuesSessionContext, getLocalizedProperty, getLocalizedProperty, getLocalizedPropertyInternal, getLocalizedPropertyNames, getLocalizedPropertyNames, hasLanguage, isEmptyValue, isFallbackEnabled, removeLocalizedProperty, removeLocalizedProperty, setAllLocalizedProperties, setAllLocalizedProperties, setLocalizedProperty, setLocalizedPropertyMethods inherited from class de.hybris.platform.jalo.ExtensibleItem
createNonClassAccessor, getAllProperties, getAllProperties, getProperty, getProperty, getPropertyNames, getPropertyNames, removeProperty, removeProperty, setAllProperties, setAllProperties, setPropertyMethods inherited from class de.hybris.platform.jalo.Item
addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addNegativePermission, addPermission, addPositivePermission, assureExtensionsLoaded, changeTypeAfterCreation, checkConstraint, checkItemPermission, checkMandatoryAttribute, checkMandatoryAttribute, checkPermission, checkPermission, checkRemovable, clearPermission, compareTo, ctx, doAfterRemove, doBeforeRemove, equals, getAccessorFor, getAllAttributes, getAllAttributes, getAllAttributes, getAllAttributes, getAllAttributesInternal, getAllLinkedItems, getAndCheckCacheBoundItem, getAttribute, getAttribute, getCacheBoundItem, getComposedType, getComposedTypePK, getCreationTime, getCurrentlyRemovingCount, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItemsCount, getLinkedItemsCount, getLinkedItemsCount, getModificationTime, getNegativePermissions, getOwner, getPartOfRemovedSessionMarker, getPermissionMap, getPermissions, getPersistenceVersion, getPK, getPositivePermissions, getRestrictedPrincipals, getSession, getSyncObject, getTenant, getTransientObject, getTransientObjectMap, hashCode, hasRegisteredClassAccessorFor, internal_registerClassAccessorFor, internal_registerNonClassAccessorFor, invalidateLocalCaches, isAlive, isCacheBound, isCurrentlyRemoving, isCurrentlyRemoving, isEmptyRelationValue, isInCreate, isInstanceOf, isItemCheckBeforeRemoveableDisabled, isMarkModifiedDisabled, isRelationLocalizationFallbackEnabled, newInstance, notifyExtensionsAfterItemCreation, notifyExtensionsBeforeItemCreation, notifyItemRemoval, notifyManagerAboutItemRemoval, readResolve, registerAccessFor, registerAccessFor, registerJaloInvalidationListeners, remove, removeItemCollection, removeItemCollection, removeLinkedItems, removeLinkedItems, removeLinkedItems, removeLinkedItems, removePartOfItems, removePartOfItems, setAllAttributes, setAllAttributes, setAllAttributesInternal, setAllLinkedItems, setAllLinkedItems, setAllLinkedItems, setAllLinkedItems, setAttribute, setAttribute, setAttributeFromString, setAttributeFromString, setCacheBound, setComposedType, setCreationTime, setImplementation, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setModificationTime, setNonInitialAttributes, setOwner, setPermissionsByMap, setTransientObject, setUseTA, suppressRelation, toString, useTA, writeReplaceMethods inherited from class de.hybris.platform.util.BridgeAbstraction
setTenant
-
Field Details
-
DATERANGE
Deprecated.since ages- See Also:
-
DATE_RANGE
Deprecated.since ages- See Also:
-
START_TIME
Deprecated.since ages- See Also:
-
END_TIME
Deprecated.since ages- See Also:
-
ALL_PRODUCTS
Field ALL_PRODUCTS -
ALL_PRODUCT_GROUPS
Field ALL_PRODUCT_GROUPS -
ALL_USERS
Field ALL_USERS -
ALL_USER_GROUPS
Field ALL_USER_GROUPS
-
-
Constructor Details
-
PDTRow
public PDTRow()
-
-
Method Details
-
createItem
protected Item createItem(SessionContext ctx, ComposedType type, Item.ItemAttributeMap allAttributes) throws JaloBusinessException Description copied from class:ItemHas 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. ) duringComposedType.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:
createItemin classGenericItem- Parameters:
ctx- the current session context which this item is created withintype- 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
Overwritten to disallow changing this calculated field from outside this class- Overrides:
setProductMatchQualifierin classGeneratedPDTRowvalue- the productMatchQualifier
-
setUserMatchQualifier
Overwritten to disallow changing this calculated field from outside this class- Overrides:
setUserMatchQualifierin classGeneratedPDTRowvalue- the userMatchQualifier
-
getInitialProductMatchField
-
getInitialUserMatchField
-
updateProductMatchField
protected void updateProductMatchField() -
updateUserMatchField
protected void updateUserMatchField() -
setProduct
Whenever a non-null product is set the PG attribute is cleared.- Overrides:
setProductin classGeneratedPDTRowvalue- the product
-
setProductId
Description copied from class:GeneratedPDTRowGenerated method - Setter of thePDTRow.productIdattribute.- Overrides:
setProductIdin classGeneratedPDTRowvalue- the productId
-
setUser
Whenever a non-null user is set the UG attribute is cleared.- Overrides:
setUserin classGeneratedPDTRowvalue- the user
-
setPg
Whenever a non-null PG is set the product attribute is cleared.- Overrides:
setPgin classGeneratedPDTRowvalue- the pg
-
setUg
Whenever a non-null UG is set the user attribute is cleared.- Overrides:
setUgin classGeneratedPDTRowvalue- the ug
-
removeLinks
protected void removeLinks()Superclass method overridden to skip searching for links during removal of a PDTRow. PDTRows are not linked!- Overrides:
removeLinksin classItem
-
getProductPriceGroup
Deprecated.since ages - please use getProductGroup() insteadSpecified 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.nullis 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
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.nullis 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. -
getProductPriceGroup
@Deprecated(since="ages", forRemoval=false) public EnumerationValue getProductPriceGroup(SessionContext ctx) Deprecated.since ages - please use getProductGroup( SessionContext ctx ) instead- Parameters:
ctx-
-
getProductGroup
- Parameters:
ctx-
-
getCustomer
Deprecated.since ages - please use getUser() instead.The customer this rule is assigned to. Ifnullis set all customers are meant. If one is specified the customer price group field is not evaluated. -
getCustomer
Deprecated.since ages - please use getUser(SessionContext) instead.SeegetCustomer().- Parameters:
ctx-
-
getCustomerPriceGroup
Deprecated.since ages - please use getCustomerGroup() insteadThe 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.nullis a valid value and means that all groups are matched. -
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.nullis a valid value and means that all groups are matched. -
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.nullis a valid value and means that all groups are matched. -
getCustomerPriceGroup
@Deprecated(since="ages", forRemoval=false) public EnumerationValue getCustomerPriceGroup(SessionContext ctx) Deprecated.since ages - please use getUserGroup( SessionContext ctx) instead- Parameters:
ctx-
-
getCustomerGroup
@Deprecated(since="ages", forRemoval=false) public EnumerationValue getCustomerGroup(SessionContext ctx) Deprecated.since ages - please use getUserGroup instead.SeegetCustomerGroup().- Parameters:
ctx-
-
getUserGroup
SeegetUserGroup().- Parameters:
ctx-
-
getDateRange
-
getDateRange
The range of time which this row is valid within. If null the row is always valid. -
setDateRange
-
setDateRange
Method setDateRange- Parameters:
ctx-dateRange-
-
remove
Description copied from class:ItemRemoves 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:
removein classItem- Parameters:
ctx- A SessionContext object- Throws:
ConsistencyCheckException- if this item could not be removed for some reason
-
setProperty
Overwritten to mark owning product as modified each time a property of this row has been changed.- Overrides:
setPropertyin classExtensibleItem- Parameters:
ctx- A SessionContext objectname- the name (key) of the propertyvalue- the value- Returns:
- the property that was bound to the name or
nullif 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_MODIFIEDto 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.
-