public abstract class AttachmentDaoBase extends org.springframework.orm.hibernate3.support.HibernateDaoSupport implements AttachmentDao
Base Spring DAO Class: is able to create, update, remove, load, and find objects of type
com.communote.server.persistence.resource.Attachment.
AttachmentTRANSFORM_NONE| Constructor and Description |
|---|
AttachmentDaoBase() |
| Modifier and Type | Method and Description |
|---|---|
Attachment |
create(Attachment attachment)
Creates an instance of Attachment and adds it to the persistent store.
|
Collection<Attachment> |
create(Collection<Attachment> entities)
Creates a new instance of Attachment and adds from the passed in
entities
collection |
Object |
create(int transform,
Attachment attachment)
Does the same thing as
AttachmentDao.create(Attachment) with an additional flag called
transform. |
Collection<Attachment> |
create(int transform,
Collection<Attachment> entities)
Does the same thing as
AttachmentDao.create(Attachment) with an additional flag called
transform. |
void |
evict(Attachment entity)
Evicts (removes) the entity from the hibernate cache
|
Object |
find(int transform,
String contentIdentifier,
String repositoryIdentifier)
Does the same thing as
AttachmentDao.find(String, String) with an additional flag called
transform. |
Attachment |
find(String contentIdentifier,
String repositoryIdentifier)
Find a resource by the given identifiers
|
Attachment |
findContentTypeNull()
Find an attachments with an empty content type to be migrated
|
Note |
findNoteByContentId(ContentId contentId)
Finds the note by a given content id of an attachment.
|
protected GlobalIdDao |
getGlobalIdDao()
Gets the reference to
globalIdDao. |
protected abstract Attachment |
handleFindContentTypeNull()
Performs the core logic for
findContentTypeNull() |
protected abstract Note |
handleFindNoteByContentId(ContentId contentId)
Performs the core logic for
findNoteByContentId(com.communote.server.core.crc.vo.ContentId) |
Object |
load(int transform,
Long id)
Does the same thing as
AttachmentDao.load(Long) with an additional flag called
transform. |
Attachment |
load(Long id)
Loads an instance of Attachment from the persistent store.
|
Collection<Attachment> |
loadAll()
Loads all entities of type
Attachment. |
Collection<?> |
loadAll(int transform)
Does the same thing as
AttachmentDao.loadAll() with an additional flag called
transform. |
void |
remove(Attachment attachment)
Removes the instance of Attachment from the persistent store.
|
void |
remove(Collection<Attachment> attachments)
Removes all entities in the given
entities |
void |
remove(Long id)
Removes the instance of Attachment 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,com.communote.server.model.attachment.Attachment) method. |
protected Object |
transformEntity(int transform,
Attachment 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
com.communote.server.persistence.resource.AttachmentDao, please note that the
AttachmentDao.TRANSFORM_NONE constant denotes no transformation, so the entity itself will be
returned. |
void |
update(Attachment attachment)
Updates the
attachment instance in the persistent store. |
void |
update(Collection<Attachment> entities)
Updates all instances in the
entities collection in the persistent store. |
checkDaoConfig, convertHibernateAccessException, createHibernateTemplate, getHibernateTemplate, getSession, getSession, getSessionFactory, releaseSession, setHibernateTemplate, setSessionFactoryclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfindOrphanedAttachmentspublic Attachment create(Attachment attachment)
AttachmentDaocreate in interface AttachmentDaoAttachmentDao.create(com.communote.server.model.attachment.Attachment)public Object create(int transform, Attachment attachment)
AttachmentDao
Does the same thing as AttachmentDao.create(Attachment) 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 AttachmentDaocom.communote.server.persistence.resource.AttachmentDao#create(int transform,
com.communote.server.persistence.resource.Attachment)public Collection<Attachment> create(int transform, Collection<Attachment> entities)
AttachmentDao
Does the same thing as AttachmentDao.create(Attachment) 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 AttachmentDaocom.communote.server.persistence.resource.AttachmentDao#create(int,
java.util.Collection) public Collection<Attachment> create(Collection<Attachment> entities)
AttachmentDaoentities
collectioncreate in interface AttachmentDaoentities - the collection of Attachment instances to create.AttachmentDao.create(java.util.Collection<
Attachment>)public void evict(Attachment entity)
evict in interface AttachmentDaoentity - the entity to evictpublic Object find(int transform, String contentIdentifier, String repositoryIdentifier)
AttachmentDao
Does the same thing as AttachmentDao.find(String, String) with an additional flag called
transform. If this flag is set to TRANSFORM_NONE then finder
results will NOT be transformed during retrieval. If this flag is any of the
other constants defined here then finder results WILL BE passed through an
operation which can optionally transform the entities (into value objects for example). By
default, transformation does not occur.
find in interface AttachmentDaoAttachmentDao.find(int, String, String)public Attachment find(String contentIdentifier, String repositoryIdentifier)
AttachmentDaofind in interface AttachmentDaoAttachmentDao.find(String, String)public Attachment findContentTypeNull()
AttachmentDaofindContentTypeNull in interface AttachmentDaoAttachmentDao.findContentTypeNull()public Note findNoteByContentId(ContentId contentId)
AttachmentDaofindNoteByContentId in interface AttachmentDaoAttachmentDao.findNoteByContentId(com.communote.server.core.crc.vo.ContentId)protected GlobalIdDao getGlobalIdDao()
globalIdDao.protected abstract Attachment handleFindContentTypeNull()
findContentTypeNull()protected abstract Note handleFindNoteByContentId(ContentId contentId)
findNoteByContentId(com.communote.server.core.crc.vo.ContentId)public Object load(int transform, Long id)
AttachmentDao
Does the same thing as AttachmentDao.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 AttachmentDaoid - the identifier of the entity to load.AttachmentDao.load(int, Long)public Attachment load(Long id)
AttachmentDaoload in interface AttachmentDaoAttachmentDao.load(Long)public Collection<Attachment> loadAll()
AttachmentDaoAttachment.loadAll in interface AttachmentDaoAttachmentDao.loadAll()public Collection<?> loadAll(int transform)
AttachmentDao
Does the same thing as AttachmentDao.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 AttachmentDaotransform - the flag indicating what transformation to use.AttachmentDao.loadAll(int)public void remove(Collection<Attachment> attachments)
AttachmentDaoentities collection.remove in interface AttachmentDaoAttachmentDao.remove(java.util.Collection<
Attachment>)public void remove(Attachment attachment)
AttachmentDaoremove in interface AttachmentDaoAttachmentDao.remove(com.communote.server.model.attachment.Attachment)public void remove(Long id)
AttachmentDaoidentifier from the
persistent store.remove in interface AttachmentDaoAttachmentDao.remove(Long)public void setGlobalIdDao(GlobalIdDao globalIdDao)
globalIdDao.protected void transformEntities(int transform,
Collection<?> entities)
transformEntity(int,com.communote.server.model.attachment.Attachment) method. This
method does not instantiate a new collection.
This method is to be used internally only.transform - one of the constants declared in
com.communote.server.persistence.resource.AttachmentDaoentities - the collection of entities to transformtransformEntity(int,com.communote.server.model.attachment.Attachment)protected Object transformEntity(int transform, Attachment entity)
transform flag is set to one of the constants defined in
com.communote.server.persistence.resource.AttachmentDao, please note that the
AttachmentDao.TRANSFORM_NONE constant denotes no transformation, so the entity itself will be
returned.
If the integer argument value is unknown AttachmentDao.TRANSFORM_NONE is assumed.transform - one of the constants declared in
AttachmentDaoentity - an entity that was foundtransformEntities(int,java.util.Collection)public void update(Attachment attachment)
AttachmentDaoattachment instance in the persistent store.update in interface AttachmentDaoAttachmentDao.update(com.communote.server.model.attachment.Attachment)public void update(Collection<Attachment> entities)
AttachmentDaoentities collection in the persistent store.update in interface AttachmentDaoAttachmentDao.update(java.util.Collection<
Attachment>)Copyright © 2019 Communote team. All rights reserved.