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
public abstract class ExtensibleItemEJB extends ItemEJB implements ExtensibleItemRemote
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 Constructor Description ExtensibleItemEJB()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidclearEntityCaches()voidcopyPropertiesFrom(ExtensibleItemRemote ext)protected voidcreateFromTemplate(ItemRemote template)sets data from template item.protected java.lang.ObjectdecryptIfNecessaryWithFallback(java.lang.String name, java.lang.Object original)protected java.lang.StringdecryptValueWithFallback(ValueEncryptor vc, java.lang.String name, java.lang.String original)protected PKdoCreateInternal(PK pk, ComposedTypeRemote type, ItemRemote template, EJBPropertyContainer props)java.lang.StringejbHomeGetPropertyTableName()home method implvoidejbRemove()protected java.util.Collection<PK>getAllLanguagePKs()java.util.Map<java.lang.String,java.lang.Object>getAllProperties()protected java.util.Collection<PropertyAccess>getAllPropertyAccesses(boolean forWriting)protected EJBPropertyRowCachegetModifiedUnlocalizedPropertyCache()used by HJMP to get modifed unloc property cache to save it together with item row itself.java.lang.ObjectgetProperty(java.lang.String name)protected PropertyAccessgetPropertyAccess(java.lang.String name, boolean forWriting)protected PropertyAccessgetPropertyAccess(java.lang.String name, PK langPK, boolean forWriting)protected PropertyAccessgetPropertyAccessInternal(TypeInfoMap info, int type, PK langPK, boolean forWriting, java.lang.String name)java.util.Set<java.lang.String>getPropertyNames()java.lang.ObjectgetPropertyRaw(java.lang.String name)Same asExtensibleItemRemote.getProperty(String)without instantiating property values which have been saved asItemPropertyValue.abstract java.lang.StringgetPropertyTableNameImpl()longgetPropertyTimestamp()external property timestamp accessabstract longgetPropertyTimestampInternal()TypeInfoMapgetTypeInfoMap()protected booleanhasModifiedCaches()Checks if a modified property caches exist.protected voidpostCreateFromTemplate(ItemRemote template)sets (postcreate - )data from template item.protected booleanpreLoadUnlocalizedProperties()override to enable/disable unlocalized property cache preloading this applies only when BuildConstants.NO_UP_TABLES = true !java.lang.ObjectremoveProperty(java.lang.String name)protected voidremovePropertyData()called by HJMP only !!!voidsetAllProperties(EJBPropertyContainer propertyContainer)voidsetPropertiesFromContainer(java.util.Map<java.lang.String,java.lang.Object> values)java.lang.ObjectsetProperty(java.lang.String name, java.lang.Object value)abstract voidsetPropertyTimestampInternal(long timestamp)protected voidtypeChanged(PK oldTypePK, PK newTypePK)protected voidupdatePropertyVersion(long newTS)sets timestamp in all currently available property cachesprotected voidwarnOnDecryptionError(java.lang.String name, java.lang.Exception e)protected booleanwritePropertyCaches()called 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, writeACLEntries
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.hybris.platform.persistence.framework.EntityInstance
ejbFindByPrimaryKey
-
Methods inherited from interface de.hybris.platform.persistence.framework.EntityProxy
getPK
-
Methods inherited from interface de.hybris.platform.persistence.ItemHome
findAll, findByPKList, findByType, findChangedAfter
-
Methods inherited from interface de.hybris.platform.persistence.ItemRemote
getComposedType, getCreationTime, getHJMPTS, getModifiedTime, getOwner, getPkString, getTypeKey, hasJNDIName, remove, setComposedType, setCreationTime, setModifiedTime, setOwner, setOwnerRef, wasModifiedSince
-
-
-
-
Method Detail
-
setPropertyTimestampInternal
public abstract void setPropertyTimestampInternal(long timestamp)
-
getPropertyTimestampInternal
public abstract long getPropertyTimestampInternal()
-
getAllLanguagePKs
protected final java.util.Collection<PK> getAllLanguagePKs()
-
getAllPropertyAccesses
protected java.util.Collection<PropertyAccess> getAllPropertyAccesses(boolean forWriting)
-
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
public TypeInfoMap getTypeInfoMap()
- Specified by:
getTypeInfoMapin interfaceExtensibleItemRemote
-
getPropertyAccess
protected PropertyAccess getPropertyAccess(java.lang.String name, boolean forWriting)
-
getPropertyAccess
protected PropertyAccess getPropertyAccess(java.lang.String name, PK langPK, boolean forWriting)
-
getPropertyAccessInternal
protected final PropertyAccess getPropertyAccessInternal(TypeInfoMap info, int type, PK langPK, boolean forWriting, java.lang.String name)
-
getAllProperties
public java.util.Map<java.lang.String,java.lang.Object> 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
public java.lang.Object setProperty(java.lang.String name, java.lang.Object value)- 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
public void setPropertiesFromContainer(java.util.Map<java.lang.String,java.lang.Object> values)
-
getProperty
public java.lang.Object getProperty(java.lang.String name)
- Specified by:
getPropertyin interfaceExtensibleItemRemote- Parameters:
name- the qualifier of the property- Returns:
- the value, or
nullif the property was not set
-
decryptIfNecessaryWithFallback
protected java.lang.Object decryptIfNecessaryWithFallback(java.lang.String name, java.lang.Object original)
-
warnOnDecryptionError
protected void warnOnDecryptionError(java.lang.String name, java.lang.Exception e)
-
decryptValueWithFallback
protected java.lang.String decryptValueWithFallback(ValueEncryptor vc, java.lang.String name, java.lang.String original)
-
getPropertyRaw
public java.lang.Object getPropertyRaw(java.lang.String name)
Description copied from interface:ExtensibleItemRemoteSame asExtensibleItemRemote.getProperty(String)without instantiating property values which have been saved asItemPropertyValue.- Specified by:
getPropertyRawin interfaceExtensibleItemRemote
-
removeProperty
public java.lang.Object removeProperty(java.lang.String name)
- Specified by:
removePropertyin interfaceExtensibleItemRemote- Parameters:
name- the qualifier of the property- Returns:
- the old value, or
nullif the property was not set
-
getPropertyNames
public java.util.Set<java.lang.String> getPropertyNames()
- Specified by:
getPropertyNamesin interfaceExtensibleItemRemote
-
createFromTemplate
protected void createFromTemplate(ItemRemote template)
sets data from template item. override in all subclasses which define new fields!- Overrides:
createFromTemplatein classItemEJB
-
postCreateFromTemplate
protected void postCreateFromTemplate(ItemRemote template)
sets (postcreate - )data from template item. override in all subclasses which define new fields!- Overrides:
postCreateFromTemplatein classItemEJB
-
copyPropertiesFrom
public void copyPropertiesFrom(ExtensibleItemRemote ext)
- Specified by:
copyPropertiesFromin interfaceExtensibleItemRemote
-
getModifiedUnlocalizedPropertyCache
protected EJBPropertyRowCache 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:
ItemEJB.hasModifiedCaches()
-
updatePropertyVersion
protected final void updatePropertyVersion(long newTS)
sets timestamp in all currently available property caches
-
ejbHomeGetPropertyTableName
public java.lang.String ejbHomeGetPropertyTableName()
home method impl
-
getPropertyTableNameImpl
public abstract java.lang.String getPropertyTableNameImpl()
-
writePropertyCaches
protected final boolean writePropertyCaches()
called by HJMP only !!!
-
removePropertyData
protected final void removePropertyData()
called by HJMP only !!!
-
typeChanged
protected void typeChanged(PK oldTypePK, PK newTypePK)
- 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
-
-