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