public interface GlobalIdDao
GlobalId
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<GlobalId> |
create(Collection<GlobalId> entities)
Creates a new instance of com.communote.server.persistence.global.GlobalId and adds from the
passed in
entities collection |
GlobalId |
create(GlobalId globalId)
Creates an instance of com.communote.server.persistence.global.GlobalId and adds it to the
persistent store.
|
Collection<?> |
create(int transform,
Collection<GlobalId> entities)
Does the same thing as
create(com.communote.server.model.global.GlobalId) with an
additional flag called transform . |
Object |
create(int transform,
GlobalId globalId)
Does the same thing as
create(com.communote.server.model.global.GlobalId) with an
additional flag called transform . |
GlobalId |
createGlobalId(Attachment attachment) |
GlobalId |
createGlobalId(Blog blog) |
GlobalId |
createGlobalId(Group group) |
GlobalId |
createGlobalId(Note note) |
GlobalId |
createGlobalId(Tag tag) |
GlobalId |
createGlobalId(User user) |
void |
evict(GlobalId entity)
Evicts (removes) the entity from the hibernate cache
|
GlobalId |
findByGlobalIdentifier(String globalIdentifier)
Returns a global ID matching the global identifier or null if there is no matching global ID.
|
GlobalId |
findLatestGlobalId()
Returns the latest GlobalID, which is the GlobalID with highest ID member.
|
Object |
load(int transform,
Long id)
Does the same thing as
load(Long) with an additional flag called
transform . |
GlobalId |
load(Long id)
Loads an instance of com.communote.server.persistence.global.GlobalId from the persistent
store.
|
Collection<GlobalId> |
loadAll()
Loads all entities of type
GlobalId . |
Collection<?> |
loadAll(int transform)
Does the same thing as
loadAll() with an additional flag called
transform . |
void |
remove(Collection<GlobalId> entities)
Removes all entities in the given
entities |
void |
remove(GlobalId globalId)
Removes the instance of com.communote.server.persistence.global.GlobalId from the persistent
store.
|
void |
remove(Long id)
Removes the instance of com.communote.server.persistence.global.GlobalId having the given
identifier from the persistent store. |
void |
update(Collection<GlobalId> entities)
Updates all instances in the
entities collection in the persistent store. |
void |
update(GlobalId globalId)
Updates the
globalId instance in the persistent store. |
static final int TRANSFORM_NONE
int
parameter called transform
.
This specific flag denotes no transformation will occur.GlobalId create(GlobalId globalId)
Object create(int transform, GlobalId globalId)
Does the same thing as create(com.communote.server.model.global.GlobalId)
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<GlobalId> entities)
Does the same thing as create(com.communote.server.model.global.GlobalId)
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.
Collection<GlobalId> create(Collection<GlobalId> entities)
entities
collectionentities
- the collection of com.communote.server.persistence.global.GlobalId instances to
create.GlobalId createGlobalId(Attachment attachment)
void evict(GlobalId entity)
entity
- the entity to evictGlobalId findByGlobalIdentifier(String globalIdentifier)
Returns a global ID matching the global identifier or null if there is no matching global ID.
GlobalId findLatestGlobalId()
Returns the latest GlobalID, which is the GlobalID with highest ID member. The return value might be null if there is no global ID yet.
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.GlobalId load(Long id)
Collection<GlobalId> loadAll()
GlobalId
.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(GlobalId globalId)
void remove(Collection<GlobalId> entities)
entities collection.
void remove(Long id)
identifier
from the persistent store.void update(GlobalId globalId)
globalId
instance in the persistent store.void update(Collection<GlobalId> entities)
entities
collection in the persistent store.Copyright © 2019 Communote team. All rights reserved.