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.
CountryTRANSFORM_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)
CountryDaocreate in interface CountryDaoCountryDao.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 CountryDaocom.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 CountryDaocom.communote.server.persistence.user.CountryDao#create(int,
java.util.Collection) public Collection<Country> create(Collection<Country> entities)
CountryDaoentities collectioncreate in interface CountryDaoentities - 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 CountryDaoentity - the entity to evictpublic Country findCountryByCode(String countryCode)
CountryDaoFinds a country object by the given code
findCountryByCode in interface CountryDaoCountryDao.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 CountryDaoid - the identifier of the entity to load.CountryDao.load(int, Long)public Country load(Long id)
CountryDaoload in interface CountryDaoCountryDao.load(Long)public Collection<Country> loadAll()
CountryDaoCountry.loadAll in interface CountryDaoCountryDao.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 CountryDaotransform - the flag indicating what transformation to use.CountryDao.loadAll(int)public void remove(Country country)
CountryDaoremove in interface CountryDaoCountryDao.remove(com.communote.server.model.user.Country)public void remove(Collection<Country> entities)
CountryDaoentities collection.remove in interface CountryDaocom.communote.server.persistence.user.CountryDao#remove(java.util.Collection) public void remove(Long id)
CountryDaoidentifier from the persistent store.remove in interface CountryDaoCountryDao.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.CountryDaoentities - 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
CountryDaoentity - an entity that was foundtransformEntities(int,java.util.Collection)public void update(Country country)
CountryDaocountry instance in the persistent store.update in interface CountryDaoCountryDao.update(com.communote.server.model.user.Country)public void update(Collection<Country> entities)
CountryDaoentities collection in the persistent store.update in interface CountryDaocom.communote.server.persistence.user.CountryDao#update(java.util.Collection) Copyright © 2019 Communote team. All rights reserved.