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