public interface AttachmentDao
Attachment
Modifier and Type | Field and Description |
---|---|
static int |
TRANSFORM_NONE
This constant is used as a transformation flag; entities can be converted automatically into
value objects or other types, different methods in a class implementing this interface
support this feature: look for an
int parameter called transform . |
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
create(Attachment) with an additional flag called
transform . |
Collection<?> |
create(int transform,
Collection<Attachment> entities)
Does the same thing as
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
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.
|
Collection<Long> |
findOrphanedAttachments(Date upperUploadDate)
Find all attachments which are not connected with a note and which are older than the given
date.
|
Object |
load(int transform,
Long id)
Does the same thing as
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
loadAll() with an additional flag called
transform . |
void |
remove(Attachment attachment)
Removes the instance of Attachment from the persistent store.
|
void |
remove(Collection<Attachment> entities)
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 |
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. |
static final int TRANSFORM_NONE
int
parameter called transform
.
This specific flag denotes no transformation will occur.Attachment create(Attachment attachment)
Collection<Attachment> create(Collection<Attachment> entities)
entities
collectionentities
- the collection of Attachment instances to create.Object create(int transform, Attachment attachment)
Does the same thing as 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.
Collection<?> create(int transform, Collection<Attachment> entities)
Does the same thing as 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.
void evict(Attachment entity)
entity
- the entity to evictObject find(int transform, String contentIdentifier, String repositoryIdentifier)
Does the same thing as 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.
Attachment find(String contentIdentifier, String repositoryIdentifier)
Attachment findContentTypeNull()
Note findNoteByContentId(ContentId contentId)
Collection<Long> findOrphanedAttachments(Date upperUploadDate)
upperUploadDate
- Attachments must be older than this date.Object load(int transform, Long id)
Does the same thing as 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.
id
- the identifier of the entity to load.Attachment load(Long id)
Collection<Attachment> loadAll()
Attachment
.Collection<?> loadAll(int transform)
Does the same thing as 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.
transform
- the flag indicating what transformation to use.void remove(Attachment attachment)
void remove(Collection<Attachment> entities)
entities collection.
void remove(Long id)
identifier
from the
persistent store.void update(Attachment attachment)
attachment
instance in the persistent store.void update(Collection<Attachment> entities)
entities
collection in the persistent store.Copyright © 2019 Communote team. All rights reserved.