public abstract class UserAuthorityDaoBase extends org.springframework.orm.hibernate3.support.HibernateDaoSupport implements UserAuthorityDao
Base Spring DAO Class: is able to create, update, remove, load, and find objects of type
UserAuthority
.
UserAuthority
TRANSFORM_NONE
Constructor and Description |
---|
UserAuthorityDaoBase() |
Modifier and Type | Method and Description |
---|---|
Collection<UserAuthority> |
create(Collection<UserAuthority> entities)
Creates a new instance of UserAuthority and adds from the passed in
entities
collection |
Collection<UserAuthority> |
create(int transform,
Collection<UserAuthority> entities)
Does the same thing as
UserAuthorityDao.create(com.communote.server.model.user.UserAuthority) with an
additional flag called transform . |
Object |
create(int transform,
UserAuthority kenmeiUserAuthority)
Does the same thing as
UserAuthorityDao.create(com.communote.server.model.user.UserAuthority) with an
additional flag called transform . |
UserAuthority |
create(UserAuthority kenmeiUserAuthority)
Creates an instance of the authority entity and adds it to the persistent store.
|
Set<UserAuthority> |
createAuthorities(UserRole[] roles,
boolean save) |
void |
evict(UserAuthority entity)
Evicts (removes) the entity from the hibernate cache
|
protected abstract Set<UserAuthority> |
handleCreateAuthorities(UserRole[] roles,
boolean save)
Performs the core logic for
createAuthorities(com.communote.server.model.user.UserRole[], boolean) |
Object |
load(int transform,
Long id)
Does the same thing as
UserAuthorityDao.load(Long) with an additional flag called
transform . |
UserAuthority |
load(Long id)
Loads an instance of the authority entity from the persistent store.
|
Collection<UserAuthority> |
loadAll()
Loads all entities of type
UserAuthority . |
Collection<?> |
loadAll(int transform)
Does the same thing as
UserAuthorityDao.loadAll() with an additional flag called
transform . |
void |
remove(Collection<UserAuthority> entities)
Removes all entities in the given
entities |
void |
remove(Long id)
Removes the instance of UserAuthority having the given
identifier from the
persistent store. |
void |
remove(UserAuthority kenmeiUserAuthority)
Removes the instance of UserAuthority 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.UserAuthority) method. |
protected Object |
transformEntity(int transform,
UserAuthority 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.UserAuthorityDao , please note that the
UserAuthorityDao.TRANSFORM_NONE constant denotes no transformation, so the entity itself will be
returned. |
void |
update(Collection<UserAuthority> entities)
Updates all instances in the
entities collection in the persistent store. |
void |
update(UserAuthority kenmeiUserAuthority)
Updates the
UserAuthority instance in the persistent store. |
public UserAuthority create(UserAuthority kenmeiUserAuthority)
UserAuthorityDao
create
in interface UserAuthorityDao
UserAuthorityDao.create(com.communote.server.model.user.UserAuthority)
public Object create(int transform, UserAuthority kenmeiUserAuthority)
UserAuthorityDao
Does the same thing as UserAuthorityDao.create(com.communote.server.model.user.UserAuthority)
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 UserAuthorityDao
UserAuthorityDao.create(int transform,
UserAuthority)
public Collection<UserAuthority> create(int transform, Collection<UserAuthority> entities)
UserAuthorityDao
Does the same thing as UserAuthorityDao.create(com.communote.server.model.user.UserAuthority)
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 UserAuthorityDao
com.communote.server.persistence.user.UserAuthorityDao#create(int,
java.util.Collection)
public Collection<UserAuthority> create(Collection<UserAuthority> entities)
UserAuthorityDao
entities
collectioncreate
in interface UserAuthorityDao
entities
- the collection of UserAuthority instances to create.UserAuthorityDao.create(java.util.Collection<
UserAuthority>)
public Set<UserAuthority> createAuthorities(UserRole[] roles, boolean save)
createAuthorities
in interface UserAuthorityDao
UserAuthorityDao.createAuthorities(com.communote.server.model.user.UserRole[],
boolean)
public void evict(UserAuthority entity)
evict
in interface UserAuthorityDao
entity
- the entity to evictprotected abstract Set<UserAuthority> handleCreateAuthorities(UserRole[] roles, boolean save)
createAuthorities(com.communote.server.model.user.UserRole[], boolean)
public Object load(int transform, Long id)
UserAuthorityDao
Does the same thing as UserAuthorityDao.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 UserAuthorityDao
id
- the identifier of the entity to load.UserAuthorityDao.load(int, Long)
public UserAuthority load(Long id)
UserAuthorityDao
load
in interface UserAuthorityDao
UserAuthorityDao.load(Long)
public Collection<UserAuthority> loadAll()
UserAuthorityDao
UserAuthority
.loadAll
in interface UserAuthorityDao
UserAuthorityDao.loadAll()
public Collection<?> loadAll(int transform)
UserAuthorityDao
Does the same thing as UserAuthorityDao.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 UserAuthorityDao
transform
- the flag indicating what transformation to use.UserAuthorityDao.loadAll(int)
public void remove(UserAuthority kenmeiUserAuthority)
UserAuthorityDao
remove
in interface UserAuthorityDao
UserAuthorityDao.remove(com.communote.server.model.user.UserAuthority)
public void remove(Collection<UserAuthority> entities)
UserAuthorityDao
entities collection.
remove
in interface UserAuthorityDao
UserAuthorityDao.remove(java.util.Collection<
UserAuthority>)
public void remove(Long id)
UserAuthorityDao
identifier
from the
persistent store.remove
in interface UserAuthorityDao
UserAuthorityDao.remove(Long)
protected void transformEntities(int transform, Collection<?> entities)
transformEntity(int,com.communote.server.model.user.UserAuthority)
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.UserAuthorityDao
entities
- the collection of entities to transformtransformEntity(int,com.communote.server.model.user.UserAuthority)
protected Object transformEntity(int transform, UserAuthority entity)
transform
flag is set to one of the constants defined in
com.communote.server.persistence.user.UserAuthorityDao
, please note that the
UserAuthorityDao.TRANSFORM_NONE
constant denotes no transformation, so the entity itself will be
returned.
If the integer argument value is unknown UserAuthorityDao.TRANSFORM_NONE
is assumed.transform
- one of the constants declared in
UserAuthorityDao
entity
- an entity that was foundtransformEntities(int,java.util.Collection)
public void update(UserAuthority kenmeiUserAuthority)
UserAuthorityDao
UserAuthority
instance in the persistent store.update
in interface UserAuthorityDao
UserAuthorityDao.update(com.communote.server.model.user.UserAuthority)
public void update(Collection<UserAuthority> entities)
UserAuthorityDao
entities
collection in the persistent store.update
in interface UserAuthorityDao
UserAuthorityDao.update(java.util.Collection<
UserAuthority>)
Copyright © 2019 Communote team. All rights reserved.