public abstract class ItemEJB extends java.lang.Object implements EntityInstance, ItemRemote, ItemHome, ItemPermissionFacade
| Modifier and Type | Field and Description |
|---|---|
protected EntityInstanceContext |
entityContext
entity context accessible for subclasses if this is an entitybean
|
protected static boolean |
READ |
protected static boolean |
WRITE |
| Constructor and Description |
|---|
ItemEJB() |
| Modifier and Type | Method and Description |
|---|---|
int |
checkItemPermission(PK principalPK,
PK permissionPK)
The return value for checkPermission(...) if no permission was set, or positive and negative settings were
found.
|
int |
checkOwnGlobalPermission(PK permissionPK) |
protected void |
clearEntityCaches() |
protected void |
copyComposedTypeFromTemplate(ItemRemote template) |
protected void |
createFromTemplate(ItemRemote template)
sets data from template item.
|
protected PK |
doCreateInternal(PK pk,
ComposedTypeRemote type,
ItemRemote template)
is responsible for assigning Item with a unique primary key and a given type.
|
protected void |
doPostCreateInternal(PK pkBase,
ComposedTypeRemote type,
ItemRemote template) |
java.lang.String |
ejbHomeGetItemTableName()
home method impl
|
java.lang.String |
ejbHomeGetOwnJNDIName()
home method impl
|
void |
ejbHomeLoadItemData(java.sql.ResultSet resultSet) |
void |
ejbLoad() |
void |
ejbRemove() |
void |
ejbStore() |
abstract long |
getACLTimestampInternal() |
protected java.lang.Object |
getCachedValueForModification(ItemCacheKey key) |
protected java.lang.Object |
getCachedValueForReading(ItemCacheKey key)
the returned cached value may be unmodifiable
|
protected java.lang.Object |
getCachedValueForReadingIfAvailable(ItemCacheKey key)
will return the cached value if it has already been computed, or null otherwise
|
protected java.util.Collection<java.lang.Object> |
getCachedValuesStartingWith(java.lang.String qualifierPrefix) |
protected ItemCacheKey |
getCacheKey(java.lang.Object quali) |
protected abstract java.util.Map<java.lang.Object,ItemCacheKey> |
getCacheKeyMap() |
ComposedTypeRemote |
getComposedType() |
java.util.Date |
getCreationTime() |
abstract java.util.Date |
getCreationTimestampInternal() |
protected ComposedTypeRemote |
getDefaultType() |
EntityInstanceContext |
getEntityContext() |
java.util.Collection<PK> |
getGlobalPermissionPKs(boolean negative) |
abstract long |
getHJMPTS() |
protected abstract java.lang.String |
getItemTableNameImpl()
instance method impl
|
java.util.Date |
getModifiedTime() |
abstract java.util.Date |
getModifiedTimestampInternal() |
protected ItemCacheKey |
getOrAddCacheKey(ItemCacheKey key) |
ItemRemote |
getOwner() |
abstract PK |
getOwnerPkString() |
abstract java.lang.String |
getOwnJNDIName()
instance method impl
|
java.util.Collection<PK> |
getPermissionPKs(PK principalPK,
boolean negative) |
PK |
getPK() |
abstract PK |
getPkString() |
java.util.Map<ItemPropertyValue,java.util.List<java.lang.Boolean>> |
getPrincipalToBooleanListMap(java.util.List<PK> rightPKs)
finds all restricted principals for a given list of user rights.
|
java.util.Collection<PK> |
getRestrictedPrincipalPKs() |
PK |
getTypeKey() |
abstract PK |
getTypePkString() |
boolean |
hasJNDIName(java.lang.String jndiName) |
protected boolean |
hasModifiedCaches()
Used by HJMP to optimize calls to
ejbStore(). |
abstract boolean |
isBeforeCreate()
Special method indicating that the entity instance is currently within its ejbCreate() state and has not been
written to database yet.
|
void |
loadItemData(java.sql.ResultSet resultSet)
still experimental - dont use
|
protected void |
logACLCacheChange(ACLCache aclChache) |
boolean |
needsStoring() |
protected void |
postCreateFromTemplate(ItemRemote template)
sets (postcreate - )data from template item.
|
static java.lang.String |
quoteSQLStringLiteralForQuery(java.lang.String str)
Doubles each occurence of a single quotation mark (').
|
void |
remove() |
protected void |
removeACLEntries()
called by HJMP only !!!
|
boolean |
removeGlobalPermission(PK permissionPK) |
boolean |
removeGlobalPermissions(java.util.Collection<PermissionContainer> permissions) |
boolean |
removePermission(PK principalPK,
PK permissionPK) |
boolean |
removePermissions(java.util.Collection<PermissionContainer> permissions) |
abstract void |
setACLTimestampInternal(long timestamp) |
void |
setComposedType(ComposedTypeRemote type) |
void |
setCreationTime(java.util.Date date) |
abstract void |
setCreationTimestampInternal(java.util.Date time) |
void |
setEntityContext(EntityInstanceContext ctx)
Stores entityContext in
entityContext. |
boolean |
setGlobalPermission(PK permissionPK,
boolean negative) |
boolean |
setGlobalPermissions(java.util.Collection<PermissionContainer> permissions) |
void |
setModifiedTime(java.util.Date timestamp) |
protected void |
setModifiedTimestamp(java.util.Date timestamp) |
abstract void |
setModifiedTimestampInternal(java.util.Date time) |
void |
setNeedsStoring(boolean needsStoring) |
void |
setOwner(ItemRemote owner) |
protected void |
setOwnerPK(PK ownerPK) |
abstract void |
setOwnerPkString(PK pk) |
boolean |
setPermission(PK principalPK,
PK permissionPK,
boolean negative) |
boolean |
setPermissions(java.util.Collection<PermissionContainer> permissions) |
abstract void |
setPkString(PK pk) |
void |
setPrincipalToBooleanListMap(java.util.List<PK> rightPKs,
java.util.Map<PK,java.util.List<java.lang.Boolean>> principalPKToBooleanListMap)
changes restricted principals for a given list of user rights.
|
abstract void |
setTypePkString(PK pk) |
protected boolean |
skipRemovePermission(ACLCache acl,
PK principalPK,
PK permissionPK) |
protected boolean |
skipSetPermission(ACLCache acl,
PK principalPK,
PK permissionPK,
boolean negative) |
protected void |
storeCaches()
override if you use own ItemCacheKeys which may contain changed data.
|
protected void |
typeChanged(PK oldTypePK,
PK newTypePK) |
protected abstract int |
typeCode() |
boolean |
wasModifiedSince(java.util.Date time) |
protected boolean |
writeACLEntries()
called by HJMP only !!!
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitejbFindByPrimaryKeyfindAll, findByPKList, findByType, findChangedAfterprotected static final boolean READ
protected static final boolean WRITE
protected EntityInstanceContext entityContext
public abstract PK getPkString()
getPkString in interface ItemRemotepublic abstract void setPkString(PK pk)
public abstract java.util.Date getCreationTimestampInternal()
public abstract void setCreationTimestampInternal(java.util.Date time)
public abstract long getACLTimestampInternal()
public abstract void setACLTimestampInternal(long timestamp)
public abstract java.util.Date getModifiedTimestampInternal()
public abstract void setModifiedTimestampInternal(java.util.Date time)
public abstract PK getTypePkString()
public abstract void setTypePkString(PK pk)
public abstract PK getOwnerPkString()
public abstract void setOwnerPkString(PK pk)
public abstract long getHJMPTS()
getHJMPTS in interface ItemRemotepublic abstract boolean isBeforeCreate()
public PK getPK()
getPK in interface EntityProxypublic PK getTypeKey()
getTypeKey in interface ItemRemotepublic static java.lang.String quoteSQLStringLiteralForQuery(java.lang.String str)
str - public void ejbHomeLoadItemData(java.sql.ResultSet resultSet)
protected abstract int typeCode()
protected PK doCreateInternal(PK pk, ComposedTypeRemote type, ItemRemote template)
protected void createFromTemplate(ItemRemote template)
protected final void copyComposedTypeFromTemplate(ItemRemote template)
protected void postCreateFromTemplate(ItemRemote template)
protected void doPostCreateInternal(PK pkBase, ComposedTypeRemote type, ItemRemote template)
protected void removeACLEntries()
protected boolean writeACLEntries()
public void setEntityContext(EntityInstanceContext ctx)
entityContext. Do not call method yourself!setEntityContext in interface EntityInstancepublic EntityInstanceContext getEntityContext()
getEntityContext in interface EntityInstancepublic void ejbStore()
ejbStore in interface EntityInstancepublic void ejbLoad()
ejbLoad in interface EntityInstanceprotected boolean hasModifiedCaches()
ejbStore(). Dont use elsewhere!
This method just checks if a ACL cache is present and needs storing.
public void ejbRemove()
ejbRemove in interface EntityInstanceprotected void clearEntityCaches()
public java.util.Date getCreationTime()
getCreationTime in interface ItemRemotepublic void setCreationTime(java.util.Date date)
setCreationTime in interface ItemRemotepublic java.util.Date getModifiedTime()
getModifiedTime in interface ItemRemotepublic void setModifiedTime(java.util.Date timestamp)
setModifiedTime in interface ItemRemoteprotected void setModifiedTimestamp(java.util.Date timestamp)
public boolean wasModifiedSince(java.util.Date time)
wasModifiedSince in interface ItemRemotepublic ComposedTypeRemote getComposedType()
getComposedType in interface ItemRemotepublic void setComposedType(ComposedTypeRemote type) throws EJBInvalidParameterException
setComposedType in interface ItemRemoteEJBInvalidParameterExceptionprotected ComposedTypeRemote getDefaultType() throws EJBItemNotFoundException
EJBItemNotFoundExceptionpublic ItemRemote getOwner()
getOwner in interface ItemRemotepublic void setOwner(ItemRemote owner)
setOwner in interface ItemRemoteprotected void setOwnerPK(PK ownerPK)
protected void storeCaches()
protected abstract java.util.Map<java.lang.Object,ItemCacheKey> getCacheKeyMap()
protected java.lang.Object getCachedValueForReading(ItemCacheKey key)
protected java.lang.Object getCachedValueForModification(ItemCacheKey key)
protected java.lang.Object getCachedValueForReadingIfAvailable(ItemCacheKey key)
protected final java.util.Collection<java.lang.Object> getCachedValuesStartingWith(java.lang.String qualifierPrefix)
protected final ItemCacheKey getCacheKey(java.lang.Object quali)
protected final ItemCacheKey getOrAddCacheKey(ItemCacheKey key)
public java.util.Collection<PK> getRestrictedPrincipalPKs()
getRestrictedPrincipalPKs in interface ItemPermissionFacadepublic java.util.Map<ItemPropertyValue,java.util.List<java.lang.Boolean>> getPrincipalToBooleanListMap(java.util.List<PK> rightPKs)
ItemPermissionFacadegetPrincipalToBooleanListMap in interface ItemPermissionFacaderightPKs - the user right pks to get principals and permissions forpublic void setPrincipalToBooleanListMap(java.util.List<PK> rightPKs, java.util.Map<PK,java.util.List<java.lang.Boolean>> principalPKToBooleanListMap) throws EJBSecurityException
ItemPermissionFacadesetPrincipalToBooleanListMap in interface ItemPermissionFacaderightPKs - the user right pks to get principals and permissions forprincipalPKToBooleanListMap - a map { principalPK -> [ Boolean.TRUE | Boolean.FALSE | null ]EJBSecurityExceptionprotected boolean skipSetPermission(ACLCache acl, PK principalPK, PK permissionPK, boolean negative)
public boolean setPermission(PK principalPK, PK permissionPK, boolean negative) throws EJBSecurityException
setPermission in interface ItemPermissionFacadeEJBSecurityExceptionpublic boolean setPermissions(java.util.Collection<PermissionContainer> permissions) throws EJBSecurityException
setPermissions in interface ItemPermissionFacadeEJBSecurityExceptionprotected boolean skipRemovePermission(ACLCache acl, PK principalPK, PK permissionPK)
public boolean removePermission(PK principalPK, PK permissionPK) throws EJBSecurityException
removePermission in interface ItemPermissionFacadeEJBSecurityExceptionpublic boolean removePermissions(java.util.Collection<PermissionContainer> permissions) throws EJBSecurityException
removePermissions in interface ItemPermissionFacadeEJBSecurityExceptionpublic int checkItemPermission(PK principalPK, PK permissionPK)
checkItemPermission in interface ItemPermissionFacadepublic java.util.Collection<PK> getPermissionPKs(PK principalPK, boolean negative)
getPermissionPKs in interface ItemPermissionFacadeprotected void logACLCacheChange(ACLCache aclChache)
public java.lang.String ejbHomeGetItemTableName()
protected abstract java.lang.String getItemTableNameImpl()
public java.lang.String ejbHomeGetOwnJNDIName()
public boolean hasJNDIName(java.lang.String jndiName)
hasJNDIName in interface ItemRemotepublic abstract java.lang.String getOwnJNDIName()
getOwnJNDIName in interface ItemHomepublic boolean needsStoring()
needsStoring in interface EntityInstancepublic void setNeedsStoring(boolean needsStoring)
setNeedsStoring in interface EntityInstancepublic void remove()
throws YEJBException,
YRemoveException
remove in interface ItemRemoteYEJBExceptionYRemoveExceptionpublic void loadItemData(java.sql.ResultSet resultSet)
ItemHomeloadItemData in interface ItemHomepublic int checkOwnGlobalPermission(PK permissionPK)
checkOwnGlobalPermission in interface ItemPermissionFacadepublic java.util.Collection<PK> getGlobalPermissionPKs(boolean negative)
getGlobalPermissionPKs in interface ItemPermissionFacadepublic boolean setGlobalPermission(PK permissionPK, boolean negative) throws EJBSecurityException
setGlobalPermission in interface ItemPermissionFacadeEJBSecurityExceptionpublic boolean setGlobalPermissions(java.util.Collection<PermissionContainer> permissions) throws EJBSecurityException
setGlobalPermissions in interface ItemPermissionFacadeEJBSecurityExceptionpublic boolean removeGlobalPermission(PK permissionPK) throws EJBSecurityException
removeGlobalPermission in interface ItemPermissionFacadeEJBSecurityExceptionpublic boolean removeGlobalPermissions(java.util.Collection<PermissionContainer> permissions) throws EJBSecurityException
removeGlobalPermissions in interface ItemPermissionFacadeEJBSecurityExceptionCopyright © 2018 SAP SE. All Rights Reserved.