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.
ContentTRANSFORM_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)
ContentDaocreate in interface ContentDaoContentDao.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 ContentDaoContentDao.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 ContentDaoContentDao#create(int, java.util.Collection) public Collection<Content> create(Collection<Content> entities)
ContentDaoentities collectioncreate in interface ContentDaoentities - 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 ContentDaoentity - 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 ContentDaoid - the identifier of the entity to load.ContentDao.load(int, Long)public Content load(Long id)
ContentDaoload in interface ContentDaoContentDao.load(Long)public Collection<Content> loadAll()
ContentDaoContent.loadAll in interface ContentDaoContentDao.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 ContentDaotransform - the flag indicating what transformation to use.ContentDao.loadAll(int)public void remove(Content content)
ContentDaoremove in interface ContentDaoContentDao.remove(Content)public void remove(Collection<Content> entities)
ContentDaoentities collection.remove in interface ContentDaoContentDao#remove(java.util.Collection) public void remove(Long id)
ContentDaoidentifier from the persistent store.remove in interface ContentDaoContentDao.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 ContentDaoentities - 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 ContentDaoentity - an entity that was foundtransformEntities(int,java.util.Collection)public void update(Content content)
ContentDaocontent instance in the persistent store.update in interface ContentDaoContentDao.update(Content)public void update(Collection<Content> entities)
ContentDaoentities collection in the persistent store.update in interface ContentDaoContentDao#update(java.util.Collection) Copyright © 2019 Communote team. All rights reserved.