public abstract class UserToBlogRoleMappingDaoBase extends org.springframework.orm.hibernate3.support.HibernateDaoSupport implements UserToBlogRoleMappingDao
Base Spring DAO Class: is able to create, update, remove, load, and find objects of type
com.communote.server.persistence.blog.UserToBlogRoleMapping.
UserToBlogRoleMappingTRANSFORM_NONE| Constructor and Description |
|---|
UserToBlogRoleMappingDaoBase() |
| Modifier and Type | Method and Description |
|---|---|
Collection<UserToBlogRoleMapping> |
create(Collection<UserToBlogRoleMapping> entities)
Creates a new instance of com.communote.server.persistence.blog.UserToBlogRoleMapping and
adds from the passed in
entities collection |
Collection<UserToBlogRoleMapping> |
create(int transform,
Collection<UserToBlogRoleMapping> entities)
Does the same thing as
UserToBlogRoleMappingDao.create(com.communote.server.model.blog.UserToBlogRoleMapping)
with an additional flag called transform. |
Object |
create(int transform,
UserToBlogRoleMapping userToBlogRoleMapping)
Does the same thing as
UserToBlogRoleMappingDao.create(com.communote.server.model.blog.UserToBlogRoleMapping)
with an additional flag called transform. |
UserToBlogRoleMapping |
create(UserToBlogRoleMapping userToBlogRoleMapping)
Creates an instance of com.communote.server.persistence.blog.UserToBlogRoleMapping and adds
it to the persistent store.
|
void |
evict(UserToBlogRoleMapping entity)
Evicts (removes) the entity from the hibernate cache
|
Collection<UserToBlogRoleMapping> |
findMappingsForExternal(Long blogId,
Long userId,
Long groupId,
boolean grantedByGroup,
BlogRole role,
String externalSystemId)
Retrieves mappings matching the parameters.
|
BlogRole |
getRoleOfUser(Long blogId,
Long userId)
Returns the role of the user for the blog or null if the user has no role for the blog.
|
protected abstract Collection<UserToBlogRoleMapping> |
handleFindMappingsForExternal(Long blogId,
Long userId,
Long groupId,
boolean grantedByGroup,
BlogRole role,
String externalSystemId)
Performs the core logic for
findMappingsForExternal(Long, Long, Long, boolean, com.communote.server.model.blog.BlogRole, String) |
protected abstract BlogRole |
handleGetRoleOfUser(Long blogId,
Long userId)
Performs the core logic for
getRoleOfUser(Long, Long) |
protected abstract void |
handleRemoveAllForBlog(Long blogId)
Performs the core logic for
removeAllForBlog(Long) |
protected abstract void |
handleRemoveAllForGroup(Long groupId)
Performs the core logic for
removeAllForGroup(Long) |
protected abstract void |
handleRemoveAllForGroupMember(Long userId,
Long groupId)
Performs the core logic for
removeAllForGroupMember(Long, Long) |
Object |
load(int transform,
Long id)
Does the same thing as
UserToBlogRoleMappingDao.load(Long) with an additional flag called
transform. |
UserToBlogRoleMapping |
load(Long id)
Loads an instance of com.communote.server.persistence.blog.UserToBlogRoleMapping from the
persistent store.
|
Collection<UserToBlogRoleMapping> |
loadAll()
Loads all entities of type
UserToBlogRoleMapping. |
Collection<?> |
loadAll(int transform)
Does the same thing as
UserToBlogRoleMappingDao.loadAll() with an additional flag called
transform. |
void |
remove(Collection<UserToBlogRoleMapping> entities)
Removes all entities in the given
entities |
void |
remove(Long id)
Removes the instance of com.communote.server.persistence.blog.UserToBlogRoleMapping having
the given
identifier from the persistent store. |
void |
remove(UserToBlogRoleMapping userToBlogRoleMapping)
Removes the instance of com.communote.server.persistence.blog.UserToBlogRoleMapping from the
persistent store.
|
void |
removeAllForBlog(Long blogId)
Removes all entries for one blog.
|
void |
removeAllForGroup(Long groupId) |
void |
removeAllForGroupMember(Long userId,
Long groupId)
Removes all entries for group member.
|
protected void |
transformEntities(int transform,
Collection<?> entities)
Transforms a collection of entities using the
transformEntity(int,com.communote.server.model.blog.UserToBlogRoleMapping) method. |
protected Object |
transformEntity(int transform,
UserToBlogRoleMapping entity)
Allows transformation of entities into value objects (or something else for that matter),
when the
transform flag is set to one of the constants defined in
com.communote.server.persistence.blog.UserToBlogRoleMappingDao, please note that
the UserToBlogRoleMappingDao.TRANSFORM_NONE constant denotes no transformation, so the entity itself will be
returned. |
void |
update(Collection<UserToBlogRoleMapping> entities)
Updates all instances in the
entities collection in the persistent store. |
void |
update(UserToBlogRoleMapping userToBlogRoleMapping)
Updates the
userToBlogRoleMapping instance in the persistent store. |
checkDaoConfig, convertHibernateAccessException, createHibernateTemplate, getHibernateTemplate, getSession, getSession, getSessionFactory, releaseSession, setHibernateTemplate, setSessionFactoryclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfindMappingspublic UserToBlogRoleMapping create(UserToBlogRoleMapping userToBlogRoleMapping)
UserToBlogRoleMappingDaocreate in interface UserToBlogRoleMappingDaoUserToBlogRoleMappingDao.create(com.communote.server.model.blog.UserToBlogRoleMapping)public Object create(int transform, UserToBlogRoleMapping userToBlogRoleMapping)
UserToBlogRoleMappingDao
Does the same thing as UserToBlogRoleMappingDao.create(com.communote.server.model.blog.UserToBlogRoleMapping)
with an additional flag called transform. If this flag is set to
TRANSFORM_NONE then the returned entity will NOT be
transformed. If this flag is any of the other constants defined here then the result
WILL BE passed through an operation which can optionally transform the
entity (into a value object for example). By default, transformation does not occur.
create in interface UserToBlogRoleMappingDaocom.communote.server.persistence.blog.UserToBlogRoleMappingDao#create(int transform,
com.communote.server.persistence.blog.UserToBlogRoleMapping)public Collection<UserToBlogRoleMapping> create(int transform, Collection<UserToBlogRoleMapping> entities)
UserToBlogRoleMappingDao
Does the same thing as UserToBlogRoleMappingDao.create(com.communote.server.model.blog.UserToBlogRoleMapping)
with an additional flag called transform. If this flag is set to
TRANSFORM_NONE then the returned entity will NOT be
transformed. If this flag is any of the other constants defined here then the result
WILL BE passed through an operation which can optionally transform the
entities (into value objects for example). By default, transformation does not occur.
create in interface UserToBlogRoleMappingDaocom.communote.server.persistence.blog.UserToBlogRoleMappingDao#create(int,
java.util.Collection) public Collection<UserToBlogRoleMapping> create(Collection<UserToBlogRoleMapping> entities)
UserToBlogRoleMappingDaoentities collectioncreate in interface UserToBlogRoleMappingDaoentities - the collection of com.communote.server.persistence.blog.UserToBlogRoleMapping
instances to create.UserToBlogRoleMappingDao.create(java.util.Collection
<com.communote.server.persistence.blog.UserToBlogRoleMapping>)public void evict(UserToBlogRoleMapping entity)
evict in interface UserToBlogRoleMappingDaoentity - the entity to evictpublic Collection<UserToBlogRoleMapping> findMappingsForExternal(Long blogId, Long userId, Long groupId, boolean grantedByGroup, BlogRole role, String externalSystemId)
UserToBlogRoleMappingDaoRetrieves mappings matching the parameters. The external system ID is respected.
public BlogRole getRoleOfUser(Long blogId, Long userId)
UserToBlogRoleMappingDaoReturns the role of the user for the blog or null if the user has no role for the blog.
getRoleOfUser in interface UserToBlogRoleMappingDaoUserToBlogRoleMappingDao.getRoleOfUser(Long, Long)protected abstract Collection<UserToBlogRoleMapping> handleFindMappingsForExternal(Long blogId, Long userId, Long groupId, boolean grantedByGroup, BlogRole role, String externalSystemId)
findMappingsForExternal(Long, Long, Long, boolean, com.communote.server.model.blog.BlogRole, String)protected abstract BlogRole handleGetRoleOfUser(Long blogId, Long userId)
getRoleOfUser(Long, Long)protected abstract void handleRemoveAllForBlog(Long blogId)
removeAllForBlog(Long)protected abstract void handleRemoveAllForGroup(Long groupId)
removeAllForGroup(Long)protected abstract void handleRemoveAllForGroupMember(Long userId, Long groupId)
removeAllForGroupMember(Long, Long)public Object load(int transform, Long id)
UserToBlogRoleMappingDao
Does the same thing as UserToBlogRoleMappingDao.load(Long) with an additional flag called
transform. If this flag is set to TRANSFORM_NONE then the returned
entity will NOT be transformed. If this flag is any of the other constants
defined in this class then the result WILL BE passed through an operation
which can optionally transform the entity (into a value object for example). By default,
transformation does not occur.
load in interface UserToBlogRoleMappingDaoid - the identifier of the entity to load.UserToBlogRoleMappingDao.load(int, Long)public UserToBlogRoleMapping load(Long id)
UserToBlogRoleMappingDaoload in interface UserToBlogRoleMappingDaoUserToBlogRoleMappingDao.load(Long)public Collection<UserToBlogRoleMapping> loadAll()
UserToBlogRoleMappingDaoUserToBlogRoleMapping.loadAll in interface UserToBlogRoleMappingDaoUserToBlogRoleMappingDao.loadAll()public Collection<?> loadAll(int transform)
UserToBlogRoleMappingDao
Does the same thing as UserToBlogRoleMappingDao.loadAll() with an additional flag called
transform. If this flag is set to TRANSFORM_NONE then the returned
entity will NOT be transformed. If this flag is any of the other constants
defined here then the result WILL BE passed through an operation which can
optionally transform the entity (into a value object for example). By default, transformation
does not occur.
loadAll in interface UserToBlogRoleMappingDaotransform - the flag indicating what transformation to use.UserToBlogRoleMappingDao.loadAll(int)public void remove(UserToBlogRoleMapping userToBlogRoleMapping)
UserToBlogRoleMappingDaoremove in interface UserToBlogRoleMappingDaoUserToBlogRoleMappingDao.remove(com.communote.server.model.blog.UserToBlogRoleMapping)public void remove(Collection<UserToBlogRoleMapping> entities)
UserToBlogRoleMappingDaoentities collection.remove in interface UserToBlogRoleMappingDaoUserToBlogRoleMappingDao.remove(java.util.Collection
<com.communote.server.persistence.blog.UserToBlogRoleMapping>)public void remove(Long id)
UserToBlogRoleMappingDaoidentifier from the persistent store.remove in interface UserToBlogRoleMappingDaoUserToBlogRoleMappingDao.remove(Long)public void removeAllForBlog(Long blogId)
UserToBlogRoleMappingDaoRemoves all entries for one blog.
removeAllForBlog in interface UserToBlogRoleMappingDaoUserToBlogRoleMappingDao.removeAllForBlog(Long)public void removeAllForGroup(Long groupId)
removeAllForGroup in interface UserToBlogRoleMappingDaoUserToBlogRoleMappingDao.removeAllForGroup(Long)public void removeAllForGroupMember(Long userId, Long groupId)
UserToBlogRoleMappingDaoRemoves all entries for group member.
removeAllForGroupMember in interface UserToBlogRoleMappingDaoUserToBlogRoleMappingDao.removeAllForGroupMember(Long,
Long)protected void transformEntities(int transform,
Collection<?> entities)
transformEntity(int,com.communote.server.model.blog.UserToBlogRoleMapping) method.
This method does not instantiate a new collection.
This method is to be used internally only.transform - one of the constants declared in
com.communote.server.persistence.blog.UserToBlogRoleMappingDaoentities - the collection of entities to transformtransformEntity(int,com.communote.server.model.blog.UserToBlogRoleMapping)protected Object transformEntity(int transform, UserToBlogRoleMapping entity)
transform flag is set to one of the constants defined in
com.communote.server.persistence.blog.UserToBlogRoleMappingDao, please note that
the UserToBlogRoleMappingDao.TRANSFORM_NONE constant denotes no transformation, so the entity itself will be
returned.
If the integer argument value is unknown UserToBlogRoleMappingDao.TRANSFORM_NONE is assumed.transform - one of the constants declared in
UserToBlogRoleMappingDaoentity - an entity that was foundtransformEntities(int,java.util.Collection)public void update(UserToBlogRoleMapping userToBlogRoleMapping)
UserToBlogRoleMappingDaouserToBlogRoleMapping instance in the persistent store.update in interface UserToBlogRoleMappingDaoUserToBlogRoleMappingDao.update(com.communote.server.model.blog.UserToBlogRoleMapping)public void update(Collection<UserToBlogRoleMapping> entities)
UserToBlogRoleMappingDaoentities collection in the persistent store.update in interface UserToBlogRoleMappingDaoUserToBlogRoleMappingDao.update(java.util.Collection
<com.communote.server.persistence.blog.UserToBlogRoleMapping>)Copyright © 2019 Communote team. All rights reserved.