public abstract class ItemEJB extends Object implements EntityInstance, ItemRemote, ItemHome
| 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) |
String |
ejbHomeGetItemTableName()
home method impl
|
String |
ejbHomeGetOwnJNDIName()
home method impl
|
void |
ejbHomeLoadItemData(ResultSet resultSet) |
void |
ejbLoad() |
void |
ejbRemove() |
void |
ejbStore() |
abstract long |
getACLTimestampInternal() |
protected Object |
getCachedValueForModification(ItemCacheKey key) |
protected Object |
getCachedValueForReading(ItemCacheKey key)
the returned cached value may be unmodifiable
|
protected Object |
getCachedValueForReadingIfAvailable(ItemCacheKey key)
will return the cached value if it has already been computed, or null otherwise
|
protected Collection<Object> |
getCachedValuesStartingWith(String qualifierPrefix) |
protected ItemCacheKey |
getCacheKey(Object quali) |
protected abstract Map<Object,ItemCacheKey> |
getCacheKeyMap() |
ComposedTypeRemote |
getComposedType() |
Date |
getCreationTime() |
abstract Date |
getCreationTimestampInternal() |
protected ComposedTypeRemote |
getDefaultType() |
EntityInstanceContext |
getEntityContext() |
Collection<PK> |
getGlobalPermissionPKs(boolean negative) |
abstract long |
getHJMPTS() |
protected abstract String |
getItemTableNameImpl()
instance method impl
|
Date |
getModifiedTime() |
abstract Date |
getModifiedTimestampInternal() |
protected ItemCacheKey |
getOrAddCacheKey(ItemCacheKey key) |
ItemRemote |
getOwner() |
abstract PK |
getOwnerPkString() |
abstract String |
getOwnJNDIName()
instance method impl
|
Collection<PK> |
getPermissionPKs(PK principalPK,
boolean negative) |
PK |
getPK() |
abstract PK |
getPkString() |
Map<ItemPropertyValue,List<Boolean>> |
getPrincipalToBooleanListMap(List<PK> rightPKs)
finds all restricted principals for a given list of user rights.
|
Collection<PK> |
getRestrictedPrincipalPKs() |
PK |
getTypeKey() |
abstract PK |
getTypePkString() |
boolean |
hasJNDIName(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(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 String |
quoteSQLStringLiteralForQuery(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(Collection<PermissionContainer> permissions) |
boolean |
removePermission(PK principalPK,
PK permissionPK) |
boolean |
removePermissions(Collection<PermissionContainer> permissions) |
abstract void |
setACLTimestampInternal(long timestamp) |
void |
setComposedType(ComposedTypeRemote type) |
void |
setCreationTime(Date date) |
abstract void |
setCreationTimestampInternal(Date time) |
protected void |
setCreationTimestamps()
Deprecated.
|
void |
setEntityContext(EntityInstanceContext ctx)
Stores entityContext in
entityContext. |
boolean |
setGlobalPermission(PK permissionPK,
boolean negative) |
boolean |
setGlobalPermissions(Collection<PermissionContainer> permissions) |
protected void |
setModificationTimestamps()
Deprecated.
|
void |
setModifiedTime(Date timestamp) |
protected void |
setModifiedTimestamp(Date timestamp) |
abstract void |
setModifiedTimestampInternal(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(Collection<PermissionContainer> permissions) |
abstract void |
setPkString(PK pk) |
void |
setPrincipalToBooleanListMap(List<PK> rightPKs,
Map<PK,List<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(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 Date getCreationTimestampInternal()
public abstract void setCreationTimestampInternal(Date time)
public abstract long getACLTimestampInternal()
public abstract void setACLTimestampInternal(long timestamp)
public abstract Date getModifiedTimestampInternal()
public abstract void setModifiedTimestampInternal(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 String quoteSQLStringLiteralForQuery(String str)
str - public void ejbHomeLoadItemData(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 Date getCreationTime()
getCreationTime in interface ItemRemotepublic void setCreationTime(Date date)
setCreationTime in interface ItemRemotepublic Date getModifiedTime()
getModifiedTime in interface ItemRemotepublic void setModifiedTime(Date timestamp)
setModifiedTime in interface ItemRemoteprotected void setModifiedTimestamp(Date timestamp)
public boolean wasModifiedSince(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 Map<Object,ItemCacheKey> getCacheKeyMap()
protected Object getCachedValueForReading(ItemCacheKey key)
protected Object getCachedValueForModification(ItemCacheKey key)
protected Object getCachedValueForReadingIfAvailable(ItemCacheKey key)
protected final Collection<Object> getCachedValuesStartingWith(String qualifierPrefix)
protected final ItemCacheKey getCacheKey(Object quali)
protected final ItemCacheKey getOrAddCacheKey(ItemCacheKey key)
public Collection<PK> getRestrictedPrincipalPKs()
getRestrictedPrincipalPKs in interface ItemRemotepublic Map<ItemPropertyValue,List<Boolean>> getPrincipalToBooleanListMap(List<PK> rightPKs)
ItemRemotegetPrincipalToBooleanListMap in interface ItemRemoterightPKs - the user right pks to get principals and permissions forpublic void setPrincipalToBooleanListMap(List<PK> rightPKs, Map<PK,List<Boolean>> principalPKToBooleanListMap) throws EJBSecurityException
ItemRemotesetPrincipalToBooleanListMap in interface ItemRemoterightPKs - 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 ItemRemoteEJBSecurityExceptionpublic boolean setPermissions(Collection<PermissionContainer> permissions) throws EJBSecurityException
setPermissions in interface ItemRemoteEJBSecurityExceptionprotected boolean skipRemovePermission(ACLCache acl, PK principalPK, PK permissionPK)
public boolean removePermission(PK principalPK, PK permissionPK) throws EJBSecurityException
removePermission in interface ItemRemoteEJBSecurityExceptionpublic boolean removePermissions(Collection<PermissionContainer> permissions) throws EJBSecurityException
removePermissions in interface ItemRemoteEJBSecurityExceptionpublic int checkItemPermission(PK principalPK, PK permissionPK)
checkItemPermission in interface ItemRemotepublic Collection<PK> getPermissionPKs(PK principalPK, boolean negative)
getPermissionPKs in interface ItemRemoteprotected void logACLCacheChange(ACLCache aclChache)
@Deprecated protected void setCreationTimestamps()
@Deprecated protected void setModificationTimestamps()
public String ejbHomeGetItemTableName()
protected abstract String getItemTableNameImpl()
public String ejbHomeGetOwnJNDIName()
public boolean hasJNDIName(String jndiName)
hasJNDIName in interface ItemRemotepublic abstract 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(ResultSet resultSet)
ItemHomeloadItemData in interface ItemHomepublic int checkOwnGlobalPermission(PK permissionPK)
checkOwnGlobalPermission in interface ItemRemotepublic Collection<PK> getGlobalPermissionPKs(boolean negative)
getGlobalPermissionPKs in interface ItemRemotepublic boolean setGlobalPermission(PK permissionPK, boolean negative) throws EJBSecurityException
setGlobalPermission in interface ItemRemoteEJBSecurityExceptionpublic boolean setGlobalPermissions(Collection<PermissionContainer> permissions) throws EJBSecurityException
setGlobalPermissions in interface ItemRemoteEJBSecurityExceptionpublic boolean removeGlobalPermission(PK permissionPK) throws EJBSecurityException
removeGlobalPermission in interface ItemRemoteEJBSecurityExceptionpublic boolean removeGlobalPermissions(Collection<PermissionContainer> permissions) throws EJBSecurityException
removeGlobalPermissions in interface ItemRemoteEJBSecurityExceptionCopyright © 2017 SAP SE. All Rights Reserved.