public interface UserNotePropertyDao
UserNoteProperty
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<UserNoteProperty> |
create(Collection<UserNoteProperty> entities)
Creates a new instance of com.communote.server.persistence.user.UserNoteProperty and adds
from the passed in
entities collection |
Collection<?> |
create(int transform,
Collection<UserNoteProperty> entities)
Does the same thing as
create(com.communote.server.model.user.UserNoteProperty) with
an additional flag called transform . |
Object |
create(int transform,
UserNoteProperty userNoteProperty)
Does the same thing as
create(com.communote.server.model.user.UserNoteProperty) with
an additional flag called transform . |
UserNoteProperty |
create(UserNoteProperty userNoteProperty)
Creates an instance of com.communote.server.persistence.user.UserNoteProperty and adds it to
the persistent store.
|
void |
evict(UserNoteProperty entity)
Evicts (removes) the entity from the hibernate cache
|
Collection<UserNoteProperty> |
findProperties(Long noteId,
String keyGroup,
String key)
Return a collection of matching user note properties.
|
UserNoteProperty |
findProperty(Long noteId,
String keyGroup,
String key)
Return the property with the given key group and key for the given note ID or null if the
current user does not have such a property for that note.
|
Object |
load(int transform,
Long id)
Does the same thing as
load(Long) with an additional flag called
transform . |
UserNoteProperty |
load(Long id)
Loads an instance of com.communote.server.persistence.user.UserNoteProperty from the
persistent store.
|
Collection<UserNoteProperty> |
loadAll()
Loads all entities of type
UserNoteProperty . |
Collection<?> |
loadAll(int transform)
Does the same thing as
loadAll() with an additional flag called
transform . |
void |
remove(Collection<UserNoteProperty> entities)
Removes all entities in the given
entities |
void |
remove(Long id)
Removes the instance of com.communote.server.persistence.user.UserNoteProperty having the
given
identifier from the persistent store. |
void |
remove(UserNoteProperty userNoteProperty)
Removes the instance of com.communote.server.persistence.user.UserNoteProperty from the
persistent store.
|
int |
removePropertiesForNote(Long noteId)
Remove all properties for the given note.
|
int |
removePropertiesForUser(Long userId)
Remove all properties for the given user.
|
void |
update(Collection<UserNoteProperty> entities)
Updates all instances in the
entities collection in the persistent store. |
void |
update(UserNoteProperty userNoteProperty)
Updates the
userNoteProperty instance in the persistent store. |
static final int TRANSFORM_NONE
int
parameter called transform
.
This specific flag denotes no transformation will occur.UserNoteProperty create(UserNoteProperty userNoteProperty)
Object create(int transform, UserNoteProperty userNoteProperty)
Does the same thing as create(com.communote.server.model.user.UserNoteProperty)
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<UserNoteProperty> entities)
Does the same thing as create(com.communote.server.model.user.UserNoteProperty)
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<UserNoteProperty> create(Collection<UserNoteProperty> entities)
entities
collectionentities
- the collection of com.communote.server.persistence.user.UserNoteProperty instances
to create.void evict(UserNoteProperty entity)
entity
- the entity to evictCollection<UserNoteProperty> findProperties(Long noteId, String keyGroup, String key)
Return a collection of matching user note properties. This will consider all users and include their property for a given note if it has the provided group and key.
UserNoteProperty findProperty(Long noteId, String keyGroup, String key)
Return the property with the given key group and key for the given note ID or null if the current user does not have such a property for that note.
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.UserNoteProperty load(Long id)
Collection<UserNoteProperty> loadAll()
UserNoteProperty
.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(UserNoteProperty userNoteProperty)
void remove(Collection<UserNoteProperty> entities)
entities collection.
void remove(Long id)
identifier
from the persistent store.int removePropertiesForNote(Long noteId)
Remove all properties for the given note. This method should only be called by the UserNotePropertyAccessor.
noteId
- the ID of the note
int removePropertiesForUser(Long userId)
Remove all properties for the given user.
userId
- the ID of the user
void update(UserNoteProperty userNoteProperty)
userNoteProperty
instance in the persistent store.void update(Collection<UserNoteProperty> entities)
entities
collection in the persistent store.Copyright © 2019 Communote team. All rights reserved.