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