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