public abstract class UserOfGroupDaoBase extends org.springframework.orm.hibernate3.support.HibernateDaoSupport implements UserOfGroupDao
Base Spring DAO Class: is able to create, update, remove, load, and find objects of type
com.communote.server.persistence.user.group.UserOfGroup
.
UserOfGroup
TRANSFORM_NONE
Constructor and Description |
---|
UserOfGroupDaoBase() |
Modifier and Type | Method and Description |
---|---|
Collection<UserOfGroup> |
create(Collection<UserOfGroup> entities)
Creates a new instance of com.communote.server.persistence.user.group.UserOfGroup and adds
from the passed in
entities collection |
Collection<UserOfGroup> |
create(int transform,
Collection<UserOfGroup> entities)
Does the same thing as
UserOfGroupDao.create(com.communote.server.model.user.group.UserOfGroup)
with an additional flag called transform . |
Object |
create(int transform,
UserOfGroup userOfGroup)
Does the same thing as
UserOfGroupDao.create(com.communote.server.model.user.group.UserOfGroup)
with an additional flag called transform . |
UserOfGroup |
create(UserOfGroup userOfGroup)
Creates an instance of com.communote.server.persistence.user.group.UserOfGroup and adds it to
the persistent store.
|
void |
evict(UserOfGroup entity)
Evicts (removes) the entity from the hibernate cache
|
UserOfGroup |
findByUserIdGroupId(Long userId,
Long groupId)
Returns a UserOfGroup entity identified by the userId and groupId.
|
Collection<UserOfGroup> |
getUserOfGroupEntities(UserOfGroupModificationType modificationType)
Returns the UserOfGroup entities that have the provided UserOfGroupModificationType.
|
Collection<Long> |
getUsersOfGroup(Long groupId)
Returns for a given group all users participating in the UserOfGroup association.
|
protected abstract UserOfGroup |
handleFindByUserIdGroupId(Long userId,
Long groupId)
Performs the core logic for
findByUserIdGroupId(Long, Long) |
protected abstract Collection<UserOfGroup> |
handleGetUserOfGroupEntities(UserOfGroupModificationType modificationType)
Performs the core logic for
getUserOfGroupEntities(com.communote.server.model.user.group.UserOfGroupModificationType) |
protected abstract Collection<Long> |
handleGetUsersOfGroup(Long groupId)
Performs the core logic for
getUsersOfGroup(Long) |
protected abstract boolean |
handleIsUserOfGroup(Long userId,
Long groupId)
Performs the core logic for
isUserOfGroup(Long, Long) |
boolean |
isUserOfGroup(Long userId,
Long groupId)
Tests wether there is an association between the user and the group.
|
Object |
load(int transform,
Long id)
Does the same thing as
UserOfGroupDao.load(Long) with an additional flag called
transform . |
UserOfGroup |
load(Long id)
Loads an instance of com.communote.server.persistence.user.group.UserOfGroup from the
persistent store.
|
Collection<UserOfGroup> |
loadAll()
Loads all entities of type
UserOfGroup . |
Collection<?> |
loadAll(int transform)
Does the same thing as
UserOfGroupDao.loadAll() with an additional flag called
transform . |
void |
remove(Collection<UserOfGroup> entities)
Removes all entities in the given
entities |
void |
remove(Long id)
Removes the instance of com.communote.server.persistence.user.group.UserOfGroup having the
given
identifier from the persistent store. |
void |
remove(UserOfGroup userOfGroup)
Removes the instance of com.communote.server.persistence.user.group.UserOfGroup from the
persistent store.
|
protected void |
transformEntities(int transform,
Collection<?> entities)
Transforms a collection of entities using the
transformEntity(int,com.communote.server.model.user.group.UserOfGroup) method. |
protected Object |
transformEntity(int transform,
UserOfGroup 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.user.group.UserOfGroupDao , please note that the
UserOfGroupDao.TRANSFORM_NONE constant denotes no transformation, so the entity itself will be
returned. |
void |
update(Collection<UserOfGroup> entities)
Updates all instances in the
entities collection in the persistent store. |
void |
update(UserOfGroup userOfGroup)
Updates the
userOfGroup instance in the persistent store. |
public UserOfGroup create(UserOfGroup userOfGroup)
UserOfGroupDao
create
in interface UserOfGroupDao
UserOfGroupDao.create(com.communote.server.model.user.group.UserOfGroup)
public Object create(int transform, UserOfGroup userOfGroup)
UserOfGroupDao
Does the same thing as UserOfGroupDao.create(com.communote.server.model.user.group.UserOfGroup)
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 UserOfGroupDao
com.communote.server.persistence.user.group.UserOfGroupDao#create(int transform,
com.communote.server.persistence.user.group.UserOfGroup)
public Collection<UserOfGroup> create(int transform, Collection<UserOfGroup> entities)
UserOfGroupDao
Does the same thing as UserOfGroupDao.create(com.communote.server.model.user.group.UserOfGroup)
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 UserOfGroupDao
com.communote.server.persistence.user.group.UserOfGroupDao#create(int,
java.util.Collection)
public Collection<UserOfGroup> create(Collection<UserOfGroup> entities)
UserOfGroupDao
entities
collectioncreate
in interface UserOfGroupDao
entities
- the collection of com.communote.server.persistence.user.group.UserOfGroup
instances to create.com.communote.server.persistence.user.group.UserOfGroupDao#create(java.util.Collection)
public void evict(UserOfGroup entity)
evict
in interface UserOfGroupDao
entity
- the entity to evictpublic UserOfGroup findByUserIdGroupId(Long userId, Long groupId)
UserOfGroupDao
Returns a UserOfGroup entity identified by the userId and groupId.
findByUserIdGroupId
in interface UserOfGroupDao
UserOfGroupDao.findByUserIdGroupId(Long,
Long)
public Collection<UserOfGroup> getUserOfGroupEntities(UserOfGroupModificationType modificationType)
UserOfGroupDao
Returns the UserOfGroup entities that have the provided UserOfGroupModificationType. If the modification type is null the entities having null as modification type value are retrieved.
getUserOfGroupEntities
in interface UserOfGroupDao
UserOfGroupDao.getUserOfGroupEntities(com.communote.server.model.user.group.UserOfGroupModificationType)
public Collection<Long> getUsersOfGroup(Long groupId)
UserOfGroupDao
Returns for a given group all users participating in the UserOfGroup association. The return value will be a collection of user IDs.
getUsersOfGroup
in interface UserOfGroupDao
UserOfGroupDao.getUsersOfGroup(Long)
protected abstract UserOfGroup handleFindByUserIdGroupId(Long userId, Long groupId)
findByUserIdGroupId(Long, Long)
protected abstract Collection<UserOfGroup> handleGetUserOfGroupEntities(UserOfGroupModificationType modificationType)
getUserOfGroupEntities(com.communote.server.model.user.group.UserOfGroupModificationType)
protected abstract Collection<Long> handleGetUsersOfGroup(Long groupId)
getUsersOfGroup(Long)
protected abstract boolean handleIsUserOfGroup(Long userId, Long groupId)
isUserOfGroup(Long, Long)
public boolean isUserOfGroup(Long userId, Long groupId)
UserOfGroupDao
Tests wether there is an association between the user and the group.
isUserOfGroup
in interface UserOfGroupDao
UserOfGroupDao.isUserOfGroup(Long, Long)
public Object load(int transform, Long id)
UserOfGroupDao
Does the same thing as UserOfGroupDao.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 UserOfGroupDao
id
- the identifier of the entity to load.UserOfGroupDao.load(int, Long)
public UserOfGroup load(Long id)
UserOfGroupDao
load
in interface UserOfGroupDao
UserOfGroupDao.load(Long)
public Collection<UserOfGroup> loadAll()
UserOfGroupDao
UserOfGroup
.loadAll
in interface UserOfGroupDao
UserOfGroupDao.loadAll()
public Collection<?> loadAll(int transform)
UserOfGroupDao
Does the same thing as UserOfGroupDao.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 UserOfGroupDao
transform
- the flag indicating what transformation to use.UserOfGroupDao.loadAll(int)
public void remove(UserOfGroup userOfGroup)
UserOfGroupDao
remove
in interface UserOfGroupDao
UserOfGroupDao.remove(com.communote.server.model.user.group.UserOfGroup)
public void remove(Collection<UserOfGroup> entities)
UserOfGroupDao
entities collection.
remove
in interface UserOfGroupDao
com.communote.server.persistence.user.group.UserOfGroupDao#remove(java.util.Collection)
public void remove(Long id)
UserOfGroupDao
identifier
from the persistent store.remove
in interface UserOfGroupDao
UserOfGroupDao.remove(Long)
protected void transformEntities(int transform, Collection<?> entities)
transformEntity(int,com.communote.server.model.user.group.UserOfGroup)
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.user.group.UserOfGroupDao
entities
- the collection of entities to transformtransformEntity(int,com.communote.server.model.user.group.UserOfGroup)
protected Object transformEntity(int transform, UserOfGroup entity)
transform
flag is set to one of the constants defined in
com.communote.server.persistence.user.group.UserOfGroupDao
, please note that the
UserOfGroupDao.TRANSFORM_NONE
constant denotes no transformation, so the entity itself will be
returned.
If the integer argument value is unknown UserOfGroupDao.TRANSFORM_NONE
is assumed.transform
- one of the constants declared in
UserOfGroupDao
entity
- an entity that was foundtransformEntities(int,java.util.Collection)
public void update(UserOfGroup userOfGroup)
UserOfGroupDao
userOfGroup
instance in the persistent store.update
in interface UserOfGroupDao
UserOfGroupDao.update(com.communote.server.model.user.group.UserOfGroup)
public void update(Collection<UserOfGroup> entities)
UserOfGroupDao
entities
collection in the persistent store.update
in interface UserOfGroupDao
com.communote.server.persistence.user.group.UserOfGroupDao#update(java.util.Collection)
Copyright © 2019 Communote team. All rights reserved.