Package de.hybris.platform.persistence
Class ItemEJBImpl
- java.lang.Object
-
- de.hybris.platform.core.BridgeImplementation
-
- de.hybris.platform.persistence.ItemEJBImpl
-
- All Implemented Interfaces:
Item.ItemImpl
,BridgeInterface
,ExposesPermissionFacade
,java.io.Serializable
- Direct Known Subclasses:
ExtensibleItemEJBImpl
public abstract class ItemEJBImpl extends BridgeImplementation implements Item.ItemImpl
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ItemEJBImpl(Tenant tenant, ItemRemote remoteObject)
constructors used to create a Item with a remote or with a primary key.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addPermission(PK principalPK, PK rightPK, boolean negative)
int
checkItemPermission(PK princpalPK, PK rightPK)
void
clearPermission(PK principalPK, PK rightPK)
protected Cache
getCache()
ComposedType
getComposedType()
java.util.Date
getCreationTime()
long
getHJMPTS()
java.lang.Class
getJaloObjectClass()
returns the class of the jalo object that implements this bridge interface.java.util.Date
getModificationTime()
Item
getOwner(SessionContext ctx)
ItemPermissionFacade
getPermissionFacade()
java.util.Map
getPermissionMap(java.util.List userRights)
PK
getPK()
Gets the primary key of this item.
This pk does not change in the lifetime of an item, so the pk can definitly always cached.java.util.Collection
getPrincipalPermissions(PK principalPK, boolean negative)
protected ItemRemote
getRemote()
java.util.Collection
getRestrictedPrincipals()
JaloSession
getSession()
PK
getTypeKey()
void
invalidateLocalCaches()
protected boolean
isHandlingOwnerAsReferenceSupported()
void
remove(SessionContext ctx)
protected abstract void
removeInternal(SessionContext ctx)
void
setComposedType(ComposedType type)
void
setCreationTime(java.util.Date time)
void
setModificationTime(java.util.Date timestamp)
void
setOwner(SessionContext ctx, Item item)
void
setPermissionMap(java.util.List<UserRight> userRights, java.util.Map<Principal,java.util.List<java.lang.Boolean>> permissionMap)
void
setRemote(ItemRemote remote)
java.lang.Object
unwrap(java.lang.Object object)
ItemPropertyValue
unwrapToRef(Item item)
java.lang.Object
wrap(java.lang.Object object)
-
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.jalo.Item.ItemImpl
isLocalCachingSupported
-
-
-
-
Constructor Detail
-
ItemEJBImpl
protected ItemEJBImpl(Tenant tenant, ItemRemote remoteObject)
constructors used to create a Item with a remote or with a primary key.
-
-
Method Detail
-
getPermissionFacade
public ItemPermissionFacade getPermissionFacade()
- Specified by:
getPermissionFacade
in interfaceExposesPermissionFacade
-
getJaloObjectClass
public java.lang.Class getJaloObjectClass()
Description copied from interface:BridgeInterface
returns the class of the jalo object that implements this bridge interface.- Specified by:
getJaloObjectClass
in interfaceBridgeInterface
- Returns:
- the Class object
-
getHJMPTS
public long getHJMPTS()
- Specified by:
getHJMPTS
in interfaceItem.ItemImpl
-
setRemote
public void setRemote(ItemRemote remote)
-
getPK
public PK getPK()
Gets the primary key of this item.
This pk does not change in the lifetime of an item, so the pk can definitly always cached.You can be sure that no exception will be thrown if the underlaying EJB is no longer valid.
getPK() is a simple Java method invocation which NEVER hits the database.
- Specified by:
getPK
in interfaceItem.ItemImpl
-
invalidateLocalCaches
public void invalidateLocalCaches()
- Specified by:
invalidateLocalCaches
in interfaceItem.ItemImpl
-
getTypeKey
public PK getTypeKey()
- Specified by:
getTypeKey
in interfaceItem.ItemImpl
-
getCreationTime
public java.util.Date getCreationTime()
- Specified by:
getCreationTime
in interfaceItem.ItemImpl
-
setCreationTime
public void setCreationTime(java.util.Date time)
- Specified by:
setCreationTime
in interfaceItem.ItemImpl
-
getModificationTime
public java.util.Date getModificationTime()
- Specified by:
getModificationTime
in interfaceItem.ItemImpl
-
setModificationTime
public void setModificationTime(java.util.Date timestamp)
- Specified by:
setModificationTime
in interfaceItem.ItemImpl
-
getSession
public JaloSession getSession()
-
remove
public final void remove(SessionContext ctx) throws ConsistencyCheckException
- Specified by:
remove
in interfaceItem.ItemImpl
- Throws:
ConsistencyCheckException
-
removeInternal
protected abstract void removeInternal(SessionContext ctx) throws ConsistencyCheckException
- Throws:
ConsistencyCheckException
-
getComposedType
public ComposedType getComposedType()
- Specified by:
getComposedType
in interfaceItem.ItemImpl
-
setComposedType
public void setComposedType(ComposedType type) throws JaloInvalidParameterException
- Specified by:
setComposedType
in interfaceItem.ItemImpl
- Throws:
JaloInvalidParameterException
-
getOwner
public Item getOwner(SessionContext ctx)
- Specified by:
getOwner
in interfaceItem.ItemImpl
-
setOwner
public void setOwner(SessionContext ctx, Item item) throws ConsistencyCheckException
- Specified by:
setOwner
in interfaceItem.ItemImpl
- Throws:
ConsistencyCheckException
-
isHandlingOwnerAsReferenceSupported
protected boolean isHandlingOwnerAsReferenceSupported()
-
getRemote
protected ItemRemote getRemote()
-
checkItemPermission
public int checkItemPermission(PK princpalPK, PK rightPK)
- Specified by:
checkItemPermission
in interfaceItem.ItemImpl
-
getRestrictedPrincipals
public java.util.Collection getRestrictedPrincipals()
- Specified by:
getRestrictedPrincipals
in interfaceItem.ItemImpl
-
getPrincipalPermissions
public java.util.Collection getPrincipalPermissions(PK principalPK, boolean negative)
- Specified by:
getPrincipalPermissions
in interfaceItem.ItemImpl
-
getPermissionMap
public java.util.Map getPermissionMap(java.util.List userRights)
- Specified by:
getPermissionMap
in interfaceItem.ItemImpl
-
setPermissionMap
public void setPermissionMap(java.util.List<UserRight> userRights, java.util.Map<Principal,java.util.List<java.lang.Boolean>> permissionMap) throws JaloSecurityException
- Specified by:
setPermissionMap
in interfaceItem.ItemImpl
- Throws:
JaloSecurityException
-
addPermission
public void addPermission(PK principalPK, PK rightPK, boolean negative)
- Specified by:
addPermission
in interfaceItem.ItemImpl
-
clearPermission
public void clearPermission(PK principalPK, PK rightPK)
- Specified by:
clearPermission
in interfaceItem.ItemImpl
-
wrap
public java.lang.Object wrap(java.lang.Object object)
-
unwrap
public java.lang.Object unwrap(java.lang.Object object)
-
unwrapToRef
public ItemPropertyValue unwrapToRef(Item item)
-
getCache
protected final Cache getCache()
-
-