public interface UserToBlogRoleMappingDao
UserToBlogRoleMapping
Modifier and Type | Field and Description |
---|---|
static int |
TRANSFORM_NONE
This constant is used as a transformation flag; entities can be converted automatically into
value objects or other types, different methods in a class implementing this interface
support this feature: look for an
int parameter called transform . |
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<?> |
create(int transform,
Collection<UserToBlogRoleMapping> entities)
Does the same thing as
create(com.communote.server.model.blog.UserToBlogRoleMapping)
with an additional flag called transform . |
Object |
create(int transform,
UserToBlogRoleMapping userToBlogRoleMapping)
Does the same thing as
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> |
findMappings(Long blogId,
Long userId,
Long groupId,
Boolean grantedByGroup,
BlogRole role)
Retrieves mappings matching the parameters.
|
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.
|
Object |
load(int transform,
Long id)
Does the same thing as
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
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.
|
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. |
static final int TRANSFORM_NONE
int
parameter called transform
.
This specific flag denotes no transformation will occur.UserToBlogRoleMapping create(UserToBlogRoleMapping userToBlogRoleMapping)
Object create(int transform, UserToBlogRoleMapping userToBlogRoleMapping)
Does the same thing as 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.
Collection<?> create(int transform, Collection<UserToBlogRoleMapping> entities)
Does the same thing as 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.
Collection<UserToBlogRoleMapping> create(Collection<UserToBlogRoleMapping> entities)
entities
collectionentities
- the collection of com.communote.server.persistence.blog.UserToBlogRoleMapping
instances to create.void evict(UserToBlogRoleMapping entity)
entity
- the entity to evictCollection<UserToBlogRoleMapping> findMappings(Long blogId, Long userId, Long groupId, Boolean grantedByGroup, BlogRole role)
grantedByGroup
- whether the mappings should be granted by a group. If null this doesn't matter,
set to true or false to explicitly include this filter.Collection<UserToBlogRoleMapping> findMappingsForExternal(Long blogId, Long userId, Long groupId, boolean grantedByGroup, BlogRole role, String externalSystemId)
Retrieves mappings matching the parameters. The external system ID is respected.
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.
Object load(int transform, Long id)
Does the same thing as 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.
id
- the identifier of the entity to load.UserToBlogRoleMapping load(Long id)
Collection<UserToBlogRoleMapping> loadAll()
UserToBlogRoleMapping
.Collection<?> loadAll(int transform)
Does the same thing as 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.
transform
- the flag indicating what transformation to use.void remove(UserToBlogRoleMapping userToBlogRoleMapping)
void remove(Collection<UserToBlogRoleMapping> entities)
entities collection.
void remove(Long id)
identifier
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.
void update(UserToBlogRoleMapping userToBlogRoleMapping)
userToBlogRoleMapping
instance in the persistent store.void update(Collection<UserToBlogRoleMapping> entities)
entities
collection in the persistent store.Copyright © 2019 Communote team. All rights reserved.