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