public abstract class SecurityCodeDaoBase extends org.springframework.orm.hibernate3.support.HibernateDaoSupport implements SecurityCodeDao
Base Spring DAO Class: is able to create, update, remove, load, and find objects of type
SecurityCode
.
SecurityCode
TRANSFORM_NONE
Constructor and Description |
---|
SecurityCodeDaoBase() |
Modifier and Type | Method and Description |
---|---|
Collection<SecurityCode> |
create(Collection<SecurityCode> entities)
Creates a new instance of SecurityCode and adds
from the passed in
entities collection |
Collection<SecurityCode> |
create(int transform,
Collection<SecurityCode> entities)
Does the same thing as
SecurityCodeDao.create(com.communote.server.model.security.SecurityCode) with
an additional flag called transform . |
Object |
create(int transform,
SecurityCode securityCode)
Does the same thing as
SecurityCodeDao.create(com.communote.server.model.security.SecurityCode) with
an additional flag called transform . |
SecurityCode |
create(SecurityCode securityCode)
Creates an instance of SecurityCode and adds it
to the persistent store.
|
void |
deleteAllCodesByUser(Long userId,
Class<? extends SecurityCode> clazz) |
void |
evict(SecurityCode entity)
Evicts (removes) the entity from the hibernate cache
|
SecurityCode |
findByCode(String securityCode) |
protected abstract void |
handleDeleteAllCodesByUser(Long userId,
Class<? extends SecurityCode> clazz)
Performs the core logic for
deleteAllCodesByUser(Long, Class<? extends
SecurityCode>) |
protected abstract SecurityCode |
handleFindByCode(String securityCode)
Performs the core logic for
findByCode(String) |
Object |
load(int transform,
Long id)
Does the same thing as
SecurityCodeDao.load(Long) with an additional flag called
transform . |
SecurityCode |
load(Long id)
Loads an instance of SecurityCode from the
persistent store.
|
Collection<SecurityCode> |
loadAll()
Loads all entities of type
SecurityCode . |
Collection<?> |
loadAll(int transform)
Does the same thing as
SecurityCodeDao.loadAll() with an additional flag called
transform . |
void |
remove(Collection<SecurityCode> entities)
Removes all entities in the given
entities |
void |
remove(Long id)
Removes the instance of SecurityCode having the
given
identifier from the persistent store. |
void |
remove(SecurityCode securityCode)
Removes the instance of SecurityCode from the
persistent store.
|
protected void |
transformEntities(int transform,
Collection<?> entities)
Transforms a collection of entities using the
transformEntity(int,com.communote.server.model.security.SecurityCode) method. |
protected Object |
transformEntity(int transform,
SecurityCode 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
SecurityCodeDao , please note that the SecurityCodeDao.TRANSFORM_NONE constant denotes
no transformation, so the entity itself will be returned. |
void |
update(Collection<SecurityCode> entities)
Updates all instances in the
entities collection in the persistent store. |
void |
update(SecurityCode securityCode)
Updates the
securityCode instance in the persistent store. |
public SecurityCode create(SecurityCode securityCode)
SecurityCodeDao
create
in interface SecurityCodeDao
public Object create(int transform, SecurityCode securityCode)
SecurityCodeDao
Does the same thing as SecurityCodeDao.create(com.communote.server.model.security.SecurityCode)
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 SecurityCodeDao
public Collection<SecurityCode> create(int transform, Collection<SecurityCode> entities)
SecurityCodeDao
Does the same thing as SecurityCodeDao.create(com.communote.server.model.security.SecurityCode)
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 SecurityCodeDao
public Collection<SecurityCode> create(Collection<SecurityCode> entities)
SecurityCodeDao
entities
collectioncreate
in interface SecurityCodeDao
entities
- the collection of SecurityCode
instances to create.public void deleteAllCodesByUser(Long userId, Class<? extends SecurityCode> clazz)
deleteAllCodesByUser
in interface SecurityCodeDao
public void evict(SecurityCode entity)
evict
in interface SecurityCodeDao
entity
- the entity to evictpublic SecurityCode findByCode(String securityCode)
findByCode
in interface SecurityCodeDao
SecurityCodeDao.findByCode(String)
protected abstract void handleDeleteAllCodesByUser(Long userId, Class<? extends SecurityCode> clazz)
deleteAllCodesByUser(Long, Class<? extends
SecurityCode>)
protected abstract SecurityCode handleFindByCode(String securityCode)
findByCode(String)
public Object load(int transform, Long id)
SecurityCodeDao
Does the same thing as SecurityCodeDao.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 SecurityCodeDao
id
- the identifier of the entity to load.SecurityCodeDao.load(int, Long)
public SecurityCode load(Long id)
SecurityCodeDao
load
in interface SecurityCodeDao
SecurityCodeDao.load(Long)
public Collection<SecurityCode> loadAll()
SecurityCodeDao
SecurityCode
.loadAll
in interface SecurityCodeDao
SecurityCodeDao.loadAll()
public Collection<?> loadAll(int transform)
SecurityCodeDao
Does the same thing as SecurityCodeDao.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 SecurityCodeDao
transform
- the flag indicating what transformation to use.SecurityCodeDao.loadAll(int)
public void remove(SecurityCode securityCode)
SecurityCodeDao
remove
in interface SecurityCodeDao
SecurityCodeDao.remove(com.communote.server.model.security.SecurityCode)
public void remove(Collection<SecurityCode> entities)
SecurityCodeDao
entities collection.
remove
in interface SecurityCodeDao
public void remove(Long id)
SecurityCodeDao
identifier
from the persistent store.remove
in interface SecurityCodeDao
SecurityCodeDao.remove(Long)
protected void transformEntities(int transform, Collection<?> entities)
transformEntity(int,com.communote.server.model.security.SecurityCode)
method. This
method does not instantiate a new collection.
This method is to be used internally only.transform
- one of the constants declared in SecurityCodeDao
entities
- the collection of entities to transformtransformEntity(int,com.communote.server.model.security.SecurityCode)
protected Object transformEntity(int transform, SecurityCode entity)
transform
flag is set to one of the constants defined in
SecurityCodeDao
, please note that the SecurityCodeDao.TRANSFORM_NONE
constant denotes
no transformation, so the entity itself will be returned.
If the integer argument value is unknown SecurityCodeDao.TRANSFORM_NONE
is assumed.transform
- one of the constants declared in
SecurityCodeDao
entity
- an entity that was foundtransformEntities(int,java.util.Collection)
public void update(SecurityCode securityCode)
SecurityCodeDao
securityCode
instance in the persistent store.update
in interface SecurityCodeDao
SecurityCodeDao.update(com.communote.server.model.security.SecurityCode)
public void update(Collection<SecurityCode> entities)
SecurityCodeDao
entities
collection in the persistent store.update
in interface SecurityCodeDao
Copyright © 2019 Communote team. All rights reserved.