public interface TagDao
Tag
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 |
---|---|
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
create(Tag) with an additional flag called
transform . |
Object |
create(int transform,
Tag tag)
Does the same thing as
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.
|
List<Long> |
getFollowers(Long tagId)
Return the IDs of all users that follow the tag with the given ID.
|
Object |
load(int transform,
Long id)
Does the same thing as
load(Long) with an additional flag called
transform . |
Tag |
load(Long id)
Loads an instance of Tag from the persistent store.
|
Collection<? extends Tag> |
loadAll()
Loads all entities of type
Tag . |
Collection<? extends Tag> |
loadAll(int transform)
Does the same thing as
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 |
remove(Tag tag)
Removes the instance of Tag from the persistent store.
|
void |
removeNoteTag(long oldTagId,
Long newTagId)
This method removes the given tag.
|
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. |
static final int TRANSFORM_NONE
int
parameter called transform
.
This specific flag denotes no transformation will occur.Collection<Tag> create(Collection<Tag> entities)
entities
collectionentities
- the collection of Tag instances to create.Collection<Tag> create(int transform, Collection<Tag> entities)
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.Object create(int transform, Tag tag)
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.void evict(Tag entity)
entity
- the entity to evictList<TagData> findByPrefix(String prefix, ResultSpecification resultSpecification)
Tag findByTagStore(String tagStoreTagId, String tagStoreAlias)
List<Long> getFollowers(Long tagId)
tagId
- the ID of the tag for which the followers should be returnedObject load(int transform, Long id)
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.Collection<? extends Tag> loadAll()
Tag
.Collection<? extends Tag> loadAll(int transform)
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(Long id)
identifier
from the persistent
store.void remove(Tag tag)
void removeNoteTag(long oldTagId, Long newTagId)
oldTagId
- Id of the tag to delete.newTagId
- Id of an optional new tag, the data of the old tag should be assigned to.void update(Collection<Tag> entities)
entities
collection in the persistent store.void update(Tag tag)
tag
instance in the persistent store.Copyright © 2019 Communote team. All rights reserved.