public abstract class TagDaoBase extends org.springframework.orm.hibernate3.support.HibernateDaoSupport implements TagDao
Tag
.Tag
TRANSFORM_NONE
Constructor and Description |
---|
TagDaoBase() |
Modifier and Type | Method and Description |
---|---|
Collection<Tag> |
create(Collection<Tag> entities)
Creates a new instance of Tag and adds from the passed in
entities collection |
Collection<Tag> |
create(int transform,
Collection<Tag> entities)
Does the same thing as
TagDao.create(Tag) with an additional flag called
transform . |
Object |
create(int transform,
Tag tag)
Does the same thing as
TagDao.create(Tag) with an additional flag called
transform . |
Tag |
create(Tag tag)
Creates an instance of Tag and adds it to the persistent store.
|
void |
evict(Tag entity)
Evicts (removes) the entity from the hibernate cache
|
List<TagData> |
findByPrefix(String prefix,
ResultSpecification resultSpecification) |
Tag |
findByTagStore(String tagStoreTagId,
String tagStoreAlias)
Finds a tag by its TagStore definition.
|
protected GlobalIdDao |
getGlobalIdDao()
Gets the reference to
globalIdDao . |
protected abstract List<TagData> |
handleFindByPrefix(String prefix,
ResultSpecification resultSpecification)
Performs the core logic for
findByPrefix(String, com.communote.server.core.filter.ResultSpecification) |
protected abstract Tag |
handleFindByTagStore(String tagStoreTagId,
String tagStoreAlias)
Performs the core logic for
findByTagStore(String, String) |
Object |
load(int transform,
Long id)
Does the same thing as
TagDao.load(Long) with an additional flag called
transform . |
Tag |
load(Long id)
Loads an instance of Tag from the persistent store.
|
Collection<TagImpl> |
loadAll()
Loads all entities of type
Tag . |
Collection<TagImpl> |
loadAll(int transform)
Does the same thing as
TagDao.loadAll() with an additional flag called
transform . |
void |
remove(Long id)
Removes the instance of Tag having the given
identifier from the persistent
store. |
void |
setGlobalIdDao(GlobalIdDao globalIdDao)
Sets the reference to
globalIdDao . |
protected void |
transformEntities(int transform,
Collection<?> entities)
Transforms a collection of entities using the
transformEntity(int,Tag) method. |
protected Object |
transformEntity(int transform,
Tag 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
TagDao , please note that the TagDao.TRANSFORM_NONE constant denotes no
transformation, so the entity itself will be returned. |
void |
update(Collection<Tag> entities)
Updates all instances in the
entities collection in the persistent store. |
void |
update(Tag tag)
Updates the
tag instance in the persistent store. |
checkDaoConfig, convertHibernateAccessException, createHibernateTemplate, getHibernateTemplate, getSession, getSession, getSessionFactory, releaseSession, setHibernateTemplate, setSessionFactory
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFollowers, remove, removeNoteTag
public Collection<Tag> create(Collection<Tag> entities)
TagDao
entities
collectionpublic Collection<Tag> create(int transform, Collection<Tag> entities)
TagDao
TagDao.create(Tag)
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.public Object create(int transform, Tag tag)
TagDao
TagDao.create(Tag)
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 TagDao
TagDao.create(int transform, Tag)
public Tag create(Tag tag)
TagDao
create
in interface TagDao
TagDao.create(Tag)
public void evict(Tag entity)
public List<TagData> findByPrefix(String prefix, ResultSpecification resultSpecification)
findByPrefix
in interface TagDao
TagDao.findByPrefix(String, com.communote.server.core.filter.ResultSpecification)
public Tag findByTagStore(String tagStoreTagId, String tagStoreAlias)
TagDao
findByTagStore
in interface TagDao
TagDao.findByTagStore(String, String)
protected GlobalIdDao getGlobalIdDao()
globalIdDao
.protected abstract List<TagData> handleFindByPrefix(String prefix, ResultSpecification resultSpecification)
findByPrefix(String, com.communote.server.core.filter.ResultSpecification)
protected abstract Tag handleFindByTagStore(String tagStoreTagId, String tagStoreAlias)
findByTagStore(String, String)
public Object load(int transform, Long id)
TagDao
TagDao.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 TagDao
id
- the identifier of the entity to load.TagDao.load(int, Long)
public Tag load(Long id)
TagDao
load
in interface TagDao
TagDao.load(Long)
public Collection<TagImpl> loadAll()
TagDao
Tag
.loadAll
in interface TagDao
TagDao.loadAll()
public Collection<TagImpl> loadAll(int transform)
TagDao
TagDao.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 TagDao
transform
- the flag indicating what transformation to use.TagDao.loadAll(int)
public void remove(Long id)
TagDao
identifier
from the persistent
store.remove
in interface TagDao
TagDao.remove(Long)
public void setGlobalIdDao(GlobalIdDao globalIdDao)
globalIdDao
.protected void transformEntities(int transform, Collection<?> entities)
transformEntity(int,Tag)
method. This
method does not instantiate a new collection.
This method is to be used internally only.transform
- one of the constants declared in TagDao
entities
- the collection of entities to transformtransformEntity(int,Tag)
protected Object transformEntity(int transform, Tag entity)
transform
flag is set to one of the constants defined in
TagDao
, please note that the TagDao.TRANSFORM_NONE
constant denotes no
transformation, so the entity itself will be returned.
If the integer argument value is unknown TagDao.TRANSFORM_NONE
is assumed.transform
- one of the constants declared in TagDao
entity
- an entity that was foundtransformEntities(int,Collection)
public void update(Collection<Tag> entities)
TagDao
entities
collection in the persistent store.public void update(Tag tag)
TagDao
tag
instance in the persistent store.update
in interface TagDao
TagDao.update(Tag)
Copyright © 2019 Communote team. All rights reserved.