Package de.hybris.platform.persistence
Class ExtensibleItemEJB
java.lang.Object
de.hybris.platform.persistence.ItemEJB
de.hybris.platform.persistence.ExtensibleItemEJB
- All Implemented Interfaces:
ExtensibleItemRemote,EntityInstance,EntityProxy,HomeProxy,ItemHome,ItemPermissionFacade,ItemRemote
- Direct Known Subclasses:
LinkEJB,LocalizableItemEJB,MetaInformationEJB
The extensible item entity implementation.
Mainly property access is handled here.
-
Field Summary
Fields inherited from class de.hybris.platform.persistence.ItemEJB
entityContext, READ, WRITE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidvoidprotected voidcreateFromTemplate(ItemRemote template) sets data from template item.protected ObjectdecryptIfNecessaryWithFallback(String name, Object original) protected StringdecryptValueWithFallback(ValueEncryptor vc, String name, String original) protected PKdoCreateInternal(PK pk, ComposedTypeRemote type, ItemRemote template, EJBPropertyContainer props) home method implvoidprotected final Collection<PK>protected Collection<PropertyAccess>getAllPropertyAccesses(boolean forWriting) protected EJBPropertyRowCacheused by HJMP to get modifed unloc property cache to save it together with item row itself.getProperty(String name) protected PropertyAccessgetPropertyAccess(String name, boolean forWriting) protected PropertyAccessgetPropertyAccess(String name, PK langPK, boolean forWriting) protected final PropertyAccessgetPropertyAccessInternal(TypeInfoMap info, int type, PK langPK, boolean forWriting, String name) getPropertyRaw(String name) Same asExtensibleItemRemote.getProperty(String)without instantiating property values which have been saved asItemPropertyValue.abstract Stringlongexternal property timestamp accessabstract longprotected booleanChecks if a modified property caches exist.protected voidpostCreateFromTemplate(ItemRemote template) sets (postcreate - )data from template item.protected booleanoverride to enable/disable unlocalized property cache preloading this applies only when BuildConstants.NO_UP_TABLES = true !removeProperty(String name) protected final voidcalled by HJMP only !!!voidsetAllProperties(EJBPropertyContainer propertyContainer) voidsetPropertiesFromContainer(Map<String, Object> values) setProperty(String name, Object value) abstract voidsetPropertyTimestampInternal(long timestamp) protected voidtypeChanged(PK oldTypePK, PK newTypePK) protected final voidupdatePropertyVersion(long newTS) sets timestamp in all currently available property cachesprotected voidwarnOnDecryptionError(String name, Exception e) protected final booleancalled by HJMP only !!!Methods inherited from class de.hybris.platform.persistence.ItemEJB
checkItemPermission, checkOwnGlobalPermission, copyComposedTypeFromTemplate, doCreateInternal, doPostCreateInternal, ejbHomeGetItemTableName, ejbHomeGetOwnJNDIName, ejbHomeLoadItemData, ejbLoad, ejbStore, getACLTimestampInternal, getCachedValueForModification, getCachedValueForReading, getCachedValueForReadingIfAvailable, getCachedValuesStartingWith, getCacheKey, getCacheKeyMap, getComposedType, getCreationTime, getCreationTimestampInternal, getDefaultType, getEntityContext, getGlobalPermissionPKs, getHJMPTS, getItemTableNameImpl, getModifiedTime, getModifiedTimestampInternal, getOrAddCacheKey, getOwner, getOwnerPkString, getOwnJNDIName, getPermissionPKs, getPK, getPkString, getPrincipalToBooleanListMap, getRestrictedPrincipalPKs, getTypeKey, getTypePkString, hasJNDIName, isBeforeCreate, loadItemData, logACLCacheChange, needsStoring, quoteSQLStringLiteralForQuery, remove, removeACLEntries, removeGlobalPermission, removeGlobalPermissions, removePermission, removePermissions, setACLTimestampInternal, setComposedType, setCreationTime, setCreationTimestampInternal, setEntityContext, setGlobalPermission, setGlobalPermissions, setModifiedTime, setModifiedTimestamp, setModifiedTimestampInternal, setNeedsStoring, setOwner, setOwnerPkString, setOwnerRef, setPermission, setPermissions, setPkString, setPrincipalToBooleanListMap, setTypePkString, skipRemovePermission, skipSetPermission, storeCaches, typeCode, wasModifiedSince, writeACLEntriesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.hybris.platform.persistence.framework.EntityInstance
ejbFindByPrimaryKeyMethods inherited from interface de.hybris.platform.persistence.framework.EntityProxy
getPKMethods inherited from interface de.hybris.platform.persistence.ItemHome
findAll, findByPKList, findByType, findChangedAfterMethods inherited from interface de.hybris.platform.persistence.ItemRemote
getComposedType, getCreationTime, getHJMPTS, getModifiedTime, getOwner, getPkString, getTypeKey, hasJNDIName, remove, setComposedType, setCreationTime, setModifiedTime, setOwner, setOwnerRef, wasModifiedSince
-
Constructor Details
-
ExtensibleItemEJB
public ExtensibleItemEJB()
-
-
Method Details
-
setPropertyTimestampInternal
public abstract void setPropertyTimestampInternal(long timestamp) -
getPropertyTimestampInternal
public abstract long getPropertyTimestampInternal() -
getAllLanguagePKs
-
getAllPropertyAccesses
-
doCreateInternal
protected PK doCreateInternal(PK pk, ComposedTypeRemote type, ItemRemote template, EJBPropertyContainer props) -
preLoadUnlocalizedProperties
protected boolean preLoadUnlocalizedProperties()override to enable/disable unlocalized property cache preloading this applies only when BuildConstants.NO_UP_TABLES = true ! -
getTypeInfoMap
- Specified by:
getTypeInfoMapin interfaceExtensibleItemRemote
-
getPropertyAccess
-
getPropertyAccess
-
getPropertyAccessInternal
protected final PropertyAccess getPropertyAccessInternal(TypeInfoMap info, int type, PK langPK, boolean forWriting, String name) -
getAllProperties
- Specified by:
getAllPropertiesin interfaceExtensibleItemRemote
-
setAllProperties
public void setAllProperties(EJBPropertyContainer propertyContainer) throws ConsistencyCheckException - Specified by:
setAllPropertiesin interfaceExtensibleItemRemote- Throws:
ConsistencyCheckException- if the property container contains localized properties, and the called item is not localizable
-
setProperty
- Specified by:
setPropertyin interfaceExtensibleItemRemote- Parameters:
name- the qualifier if this propertyvalue- the new value- Returns:
- the old value if the property was set before
-
setPropertiesFromContainer
-
getProperty
- Specified by:
getPropertyin interfaceExtensibleItemRemote- Parameters:
name- the qualifier of the property- Returns:
- the value, or
nullif the property was not set
-
decryptIfNecessaryWithFallback
-
warnOnDecryptionError
-
decryptValueWithFallback
-
getPropertyRaw
Description copied from interface:ExtensibleItemRemoteSame asExtensibleItemRemote.getProperty(String)without instantiating property values which have been saved asItemPropertyValue.- Specified by:
getPropertyRawin interfaceExtensibleItemRemote
-
removeProperty
- Specified by:
removePropertyin interfaceExtensibleItemRemote- Parameters:
name- the qualifier of the property- Returns:
- the old value, or
nullif the property was not set
-
getPropertyNames
- Specified by:
getPropertyNamesin interfaceExtensibleItemRemote
-
createFromTemplate
sets data from template item. override in all subclasses which define new fields!- Overrides:
createFromTemplatein classItemEJB
-
postCreateFromTemplate
sets (postcreate - )data from template item. override in all subclasses which define new fields!- Overrides:
postCreateFromTemplatein classItemEJB
-
copyPropertiesFrom
- Specified by:
copyPropertiesFromin interfaceExtensibleItemRemote
-
getModifiedUnlocalizedPropertyCache
used by HJMP to get modifed unloc property cache to save it together with item row itself. dont use elsewhere ! -
hasModifiedCaches
protected boolean hasModifiedCaches()Checks if a modified property caches exist.- Overrides:
hasModifiedCachesin classItemEJB- Returns:
- true if this item instance owns modified caches which need to be stored
- See Also:
-
updatePropertyVersion
protected final void updatePropertyVersion(long newTS) sets timestamp in all currently available property caches -
ejbHomeGetPropertyTableName
home method impl -
getPropertyTableNameImpl
-
writePropertyCaches
protected final boolean writePropertyCaches()called by HJMP only !!! -
removePropertyData
protected final void removePropertyData()called by HJMP only !!! -
typeChanged
- Overrides:
typeChangedin classItemEJB
-
clearEntityCaches
protected void clearEntityCaches()- Overrides:
clearEntityCachesin classItemEJB
-
ejbRemove
public void ejbRemove()- Specified by:
ejbRemovein interfaceEntityInstance- Overrides:
ejbRemovein classItemEJB
-
getPropertyTimestamp
public long getPropertyTimestamp()external property timestamp access- Specified by:
getPropertyTimestampin interfaceExtensibleItemRemote
-