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 void
clearEntityCaches()
void
copyPropertiesFrom(ExtensibleItemRemote ext)
protected void
createFromTemplate(ItemRemote template)
sets data from template item.protected java.lang.Object
decryptIfNecessaryWithFallback(java.lang.String name, java.lang.Object original)
protected java.lang.String
decryptValueWithFallback(ValueEncryptor vc, java.lang.String name, java.lang.String original)
protected PK
doCreateInternal(PK pk, ComposedTypeRemote type, ItemRemote template, EJBPropertyContainer props)
java.lang.String
ejbHomeGetPropertyTableName()
home method implvoid
ejbRemove()
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 EJBPropertyRowCache
getModifiedUnlocalizedPropertyCache()
used by HJMP to get modifed unloc property cache to save it together with item row itself.java.lang.Object
getProperty(java.lang.String name)
protected PropertyAccess
getPropertyAccess(java.lang.String name, boolean forWriting)
protected PropertyAccess
getPropertyAccess(java.lang.String name, PK langPK, boolean forWriting)
protected PropertyAccess
getPropertyAccessInternal(TypeInfoMap info, int type, PK langPK, boolean forWriting, java.lang.String name)
java.util.Set<java.lang.String>
getPropertyNames()
java.lang.Object
getPropertyRaw(java.lang.String name)
Same asExtensibleItemRemote.getProperty(String)
without instantiating property values which have been saved asItemPropertyValue
.abstract java.lang.String
getPropertyTableNameImpl()
long
getPropertyTimestamp()
external property timestamp accessabstract long
getPropertyTimestampInternal()
TypeInfoMap
getTypeInfoMap()
protected boolean
hasModifiedCaches()
Checks if a modified property caches exist.protected void
postCreateFromTemplate(ItemRemote template)
sets (postcreate - )data from template item.protected boolean
preLoadUnlocalizedProperties()
override to enable/disable unlocalized property cache preloading this applies only when BuildConstants.NO_UP_TABLES = true !java.lang.Object
removeProperty(java.lang.String name)
protected void
removePropertyData()
called by HJMP only !!!void
setAllProperties(EJBPropertyContainer propertyContainer)
void
setPropertiesFromContainer(java.util.Map<java.lang.String,java.lang.Object> values)
java.lang.Object
setProperty(java.lang.String name, java.lang.Object value)
abstract void
setPropertyTimestampInternal(long timestamp)
protected void
typeChanged(PK oldTypePK, PK newTypePK)
protected void
updatePropertyVersion(long newTS)
sets timestamp in all currently available property cachesprotected void
warnOnDecryptionError(java.lang.String name, java.lang.Exception e)
protected boolean
writePropertyCaches()
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:
getTypeInfoMap
in 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:
getAllProperties
in interfaceExtensibleItemRemote
-
setAllProperties
public void setAllProperties(EJBPropertyContainer propertyContainer) throws ConsistencyCheckException
- Specified by:
setAllProperties
in 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:
setProperty
in 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:
getProperty
in interfaceExtensibleItemRemote
- Parameters:
name
- the qualifier of the property- Returns:
- the value, or
null
if 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:ExtensibleItemRemote
Same asExtensibleItemRemote.getProperty(String)
without instantiating property values which have been saved asItemPropertyValue
.- Specified by:
getPropertyRaw
in interfaceExtensibleItemRemote
-
removeProperty
public java.lang.Object removeProperty(java.lang.String name)
- Specified by:
removeProperty
in interfaceExtensibleItemRemote
- Parameters:
name
- the qualifier of the property- Returns:
- the old value, or
null
if the property was not set
-
getPropertyNames
public java.util.Set<java.lang.String> getPropertyNames()
- Specified by:
getPropertyNames
in interfaceExtensibleItemRemote
-
createFromTemplate
protected void createFromTemplate(ItemRemote template)
sets data from template item. override in all subclasses which define new fields!- Overrides:
createFromTemplate
in classItemEJB
-
postCreateFromTemplate
protected void postCreateFromTemplate(ItemRemote template)
sets (postcreate - )data from template item. override in all subclasses which define new fields!- Overrides:
postCreateFromTemplate
in classItemEJB
-
copyPropertiesFrom
public void copyPropertiesFrom(ExtensibleItemRemote ext)
- Specified by:
copyPropertiesFrom
in 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:
hasModifiedCaches
in 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:
typeChanged
in classItemEJB
-
clearEntityCaches
protected void clearEntityCaches()
- Overrides:
clearEntityCaches
in classItemEJB
-
ejbRemove
public void ejbRemove()
- Specified by:
ejbRemove
in interfaceEntityInstance
- Overrides:
ejbRemove
in classItemEJB
-
getPropertyTimestamp
public long getPropertyTimestamp()
external property timestamp access- Specified by:
getPropertyTimestamp
in interfaceExtensibleItemRemote
-
-