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