public abstract class UserSecurityCodeDaoBase extends org.springframework.orm.hibernate3.support.HibernateDaoSupport implements UserSecurityCodeDao
Base Spring DAO Class: is able to create, update, remove, load, and find objects of type
com.communote.server.persistence.user.security.UserSecurityCode
.
UserSecurityCode
TRANSFORM_NONE
Constructor and Description |
---|
UserSecurityCodeDaoBase() |
Modifier and Type | Method and Description |
---|---|
Collection<UserSecurityCode> |
create(Collection<UserSecurityCode> entities)
Creates a new instance of com.communote.server.persistence.user.security.UserSecurityCode and
adds from the passed in
entities collection |
Collection<UserSecurityCode> |
create(int transform,
Collection<UserSecurityCode> entities)
Does the same thing as
UserSecurityCodeDao.create(com.communote.server.model.user.security.UserSecurityCode) with an additional
flag called transform . |
Object |
create(int transform,
UserSecurityCode userSecurityCode)
Does the same thing as
UserSecurityCodeDao.create(com.communote.server.model.user.security.UserSecurityCode) with an additional
flag called transform . |
UserSecurityCode |
create(UserSecurityCode userSecurityCode)
Creates an instance of com.communote.server.persistence.user.security.UserSecurityCode and
adds it to the persistent store.
|
UserSecurityCode |
createCode(User user)
Creates an user security code
|
void |
evict(UserSecurityCode entity)
Evicts (removes) the entity from the hibernate cache
|
UserSecurityCode |
findBySecurityCode(String code)
Finds the SecurityCode by the code.
|
UserSecurityCode |
findByUser(Long userId,
SecurityCodeAction action)
Finds a code for an given user
|
protected SecurityCodeDao |
getSecurityCodeDao()
Gets the reference to
securityCodeDao . |
protected abstract UserSecurityCode |
handleCreateCode(User user)
Performs the core logic for
createCode(com.communote.server.model.user.User) |
protected abstract UserSecurityCode |
handleFindBySecurityCode(String code)
Performs the core logic for
findBySecurityCode(String) |
protected abstract UserSecurityCode |
handleFindByUser(Long userId,
SecurityCodeAction action)
Performs the core logic for
findByUser(Long, com.communote.server.model.security.SecurityCodeAction) |
Object |
load(int transform,
Long id)
Does the same thing as
UserSecurityCodeDao.load(Long) with an additional flag called
transform . |
UserSecurityCode |
load(Long id)
Loads an instance of com.communote.server.persistence.user.security.UserSecurityCode from the
persistent store.
|
Collection<UserSecurityCode> |
loadAll()
Loads all entities of type
UserSecurityCode . |
Collection<?> |
loadAll(int transform)
Does the same thing as
UserSecurityCodeDao.loadAll() with an additional flag called
transform . |
void |
remove(Collection<UserSecurityCode> entities)
Removes all entities in the given
entities |
void |
remove(Long id)
Removes the instance of com.communote.server.persistence.user.security.UserSecurityCode
having the given
identifier from the persistent store. |
void |
remove(UserSecurityCode userSecurityCode)
Removes the instance of com.communote.server.persistence.user.security.UserSecurityCode from
the persistent store.
|
void |
setSecurityCodeDao(SecurityCodeDao securityCodeDao)
Sets the reference to
securityCodeDao . |
protected void |
transformEntities(int transform,
Collection<?> entities)
Transforms a collection of entities using the
transformEntity(int,com.communote.server.model.user.security.UserSecurityCode)
method. |
protected Object |
transformEntity(int transform,
UserSecurityCode 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.security.UserSecurityCodeDao , please note
that the UserSecurityCodeDao.TRANSFORM_NONE constant denotes no transformation, so the entity itself
will be returned. |
void |
update(Collection<UserSecurityCode> entities)
Updates all instances in the
entities collection in the persistent store. |
void |
update(UserSecurityCode userSecurityCode)
Updates the
userSecurityCode instance in the persistent store. |
public UserSecurityCode create(UserSecurityCode userSecurityCode)
UserSecurityCodeDao
create
in interface UserSecurityCodeDao
UserSecurityCodeDao.create(com.communote.server.model.user.security.UserSecurityCode)
public Object create(int transform, UserSecurityCode userSecurityCode)
UserSecurityCodeDao
Does the same thing as
UserSecurityCodeDao.create(com.communote.server.model.user.security.UserSecurityCode)
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 UserSecurityCodeDao
com.communote.server.persistence.user.security.UserSecurityCodeDao#create(int transform,
com.communote.server.persistence.user.security.UserSecurityCode)
public Collection<UserSecurityCode> create(int transform, Collection<UserSecurityCode> entities)
UserSecurityCodeDao
Does the same thing as
UserSecurityCodeDao.create(com.communote.server.model.user.security.UserSecurityCode)
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 UserSecurityCodeDao
com.communote.server.persistence.user.security.UserSecurityCodeDao#create(int,
java.util.Collection)
public Collection<UserSecurityCode> create(Collection<UserSecurityCode> entities)
UserSecurityCodeDao
entities
collectioncreate
in interface UserSecurityCodeDao
entities
- the collection of com.communote.server.persistence.user.security.UserSecurityCode
instances to create.com.communote.server.persistence.user.security.UserSecurityCodeDao#create(java.util.
Collection)
public UserSecurityCode createCode(User user)
UserSecurityCodeDao
Creates an user security code
createCode
in interface UserSecurityCodeDao
UserSecurityCodeDao.createCode(com.communote.server.model.user.User)
public void evict(UserSecurityCode entity)
evict
in interface UserSecurityCodeDao
entity
- the entity to evictpublic UserSecurityCode findBySecurityCode(String code)
UserSecurityCodeDao
Finds the SecurityCode by the code.
findBySecurityCode
in interface UserSecurityCodeDao
UserSecurityCodeDao.findBySecurityCode(String)
public UserSecurityCode findByUser(Long userId, SecurityCodeAction action)
UserSecurityCodeDao
Finds a code for an given user
findByUser
in interface UserSecurityCodeDao
UserSecurityCodeDao.findByUser(Long,
com.communote.server.model.security.SecurityCodeAction)
protected SecurityCodeDao getSecurityCodeDao()
securityCodeDao
.protected abstract UserSecurityCode handleCreateCode(User user)
createCode(com.communote.server.model.user.User)
protected abstract UserSecurityCode handleFindBySecurityCode(String code)
findBySecurityCode(String)
protected abstract UserSecurityCode handleFindByUser(Long userId, SecurityCodeAction action)
findByUser(Long, com.communote.server.model.security.SecurityCodeAction)
public Object load(int transform, Long id)
UserSecurityCodeDao
Does the same thing as UserSecurityCodeDao.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 UserSecurityCodeDao
id
- the identifier of the entity to load.UserSecurityCodeDao.load(int, Long)
public UserSecurityCode load(Long id)
UserSecurityCodeDao
load
in interface UserSecurityCodeDao
UserSecurityCodeDao.load(Long)
public Collection<UserSecurityCode> loadAll()
UserSecurityCodeDao
UserSecurityCode
.loadAll
in interface UserSecurityCodeDao
UserSecurityCodeDao.loadAll()
public Collection<?> loadAll(int transform)
UserSecurityCodeDao
Does the same thing as UserSecurityCodeDao.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 UserSecurityCodeDao
transform
- the flag indicating what transformation to use.UserSecurityCodeDao.loadAll(int)
public void remove(UserSecurityCode userSecurityCode)
UserSecurityCodeDao
remove
in interface UserSecurityCodeDao
UserSecurityCodeDao.remove(com.communote.server.model.user.security.UserSecurityCode)
public void remove(Collection<UserSecurityCode> entities)
UserSecurityCodeDao
entities collection.
remove
in interface UserSecurityCodeDao
com.communote.server.persistence.user.security.UserSecurityCodeDao#remove(java.util.
Collection)
public void remove(Long id)
UserSecurityCodeDao
identifier
from the persistent store.remove
in interface UserSecurityCodeDao
UserSecurityCodeDao.remove(Long)
public void setSecurityCodeDao(SecurityCodeDao securityCodeDao)
securityCodeDao
.protected void transformEntities(int transform, Collection<?> entities)
transformEntity(int,com.communote.server.model.user.security.UserSecurityCode)
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.security.UserSecurityCodeDao
entities
- the collection of entities to transformtransformEntity(int,com.communote.server.model.user.security.UserSecurityCode)
protected Object transformEntity(int transform, UserSecurityCode entity)
transform
flag is set to one of the constants defined in
com.communote.server.persistence.user.security.UserSecurityCodeDao
, please note
that the UserSecurityCodeDao.TRANSFORM_NONE
constant denotes no transformation, so the entity itself
will be returned.
If the integer argument value is unknown UserSecurityCodeDao.TRANSFORM_NONE
is assumed.transform
- one of the constants declared in
UserSecurityCodeDao
entity
- an entity that was foundtransformEntities(int,java.util.Collection)
public void update(UserSecurityCode userSecurityCode)
UserSecurityCodeDao
userSecurityCode
instance in the persistent store.update
in interface UserSecurityCodeDao
UserSecurityCodeDao.update(com.communote.server.model.user.security.UserSecurityCode)
public void update(Collection<UserSecurityCode> entities)
UserSecurityCodeDao
entities
collection in the persistent store.update
in interface UserSecurityCodeDao
com.communote.server.persistence.user.security.UserSecurityCodeDao#update(java.util.
Collection)
Copyright © 2019 Communote team. All rights reserved.