public abstract class UserNotePropertyDaoBase extends org.springframework.orm.hibernate3.support.HibernateDaoSupport implements UserNotePropertyDao
Base Spring DAO Class: is able to create, update, remove, load, and find objects of type
UserNoteProperty
.
UserNoteProperty
TRANSFORM_NONE
Constructor and Description |
---|
UserNotePropertyDaoBase() |
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<UserNoteProperty> |
create(int transform,
Collection<UserNoteProperty> entities)
Does the same thing as
UserNotePropertyDao.create(com.communote.server.model.user.UserNoteProperty) with
an additional flag called transform . |
Object |
create(int transform,
UserNoteProperty userNoteProperty)
Does the same thing as
UserNotePropertyDao.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.
|
protected abstract Collection<UserNoteProperty> |
handleFindProperties(Long noteId,
String keyGroup,
String key)
Performs the core logic for
findProperties(Long, String, String) |
protected abstract UserNoteProperty |
handleFindProperty(Long noteId,
String keyGroup,
String key)
Performs the core logic for
findProperty(Long, String, String) |
protected abstract int |
handleRemovePropertiesForNote(Long noteId)
Performs the core logic for
removePropertiesForNote(Long) |
protected abstract int |
handleRemovePropertiesForUser(Long userId)
Performs the core logic for
removePropertiesForUser(Long) |
Object |
load(int transform,
Long id)
Does the same thing as
UserNotePropertyDao.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
UserNotePropertyDao.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.
|
protected void |
transformEntities(int transform,
Collection<?> entities)
Transforms a collection of entities using the
transformEntity(int,UserNoteProperty)
method. |
protected Object |
transformEntity(int transform,
UserNoteProperty 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
UserNotePropertyDao , please note that the UserNotePropertyDao.TRANSFORM_NONE constant
denotes no transformation, so the entity itself will be returned. |
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. |
public Collection<UserNoteProperty> create(int transform, Collection<UserNoteProperty> entities)
UserNotePropertyDao
Does the same thing as UserNotePropertyDao.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.
create
in interface UserNotePropertyDao
UserNotePropertyDao#create(int, java.util.Collection)
public Object create(int transform, UserNoteProperty userNoteProperty)
UserNotePropertyDao
Does the same thing as UserNotePropertyDao.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.
create
in interface UserNotePropertyDao
UserNotePropertyDao.create(int transform, UserNoteProperty)
public Collection<UserNoteProperty> create(Collection<UserNoteProperty> entities)
UserNotePropertyDao
entities
collectioncreate
in interface UserNotePropertyDao
entities
- the collection of com.communote.server.persistence.user.UserNoteProperty instances
to create.UserNotePropertyDao#create(java.util.Collection)
public UserNoteProperty create(UserNoteProperty userNoteProperty)
UserNotePropertyDao
create
in interface UserNotePropertyDao
UserNotePropertyDao.create(UserNoteProperty)
public void evict(UserNoteProperty entity)
evict
in interface UserNotePropertyDao
entity
- the entity to evictpublic Collection<UserNoteProperty> findProperties(Long noteId, String keyGroup, String key)
UserNotePropertyDao
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.
findProperties
in interface UserNotePropertyDao
UserNotePropertyDao.findProperties(Long, String, String)
public UserNoteProperty findProperty(Long noteId, String keyGroup, String key)
UserNotePropertyDao
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.
findProperty
in interface UserNotePropertyDao
UserNotePropertyDao.findProperty(Long, String, String)
protected abstract Collection<UserNoteProperty> handleFindProperties(Long noteId, String keyGroup, String key)
findProperties(Long, String, String)
protected abstract UserNoteProperty handleFindProperty(Long noteId, String keyGroup, String key)
findProperty(Long, String, String)
protected abstract int handleRemovePropertiesForNote(Long noteId)
removePropertiesForNote(Long)
protected abstract int handleRemovePropertiesForUser(Long userId)
removePropertiesForUser(Long)
public Object load(int transform, Long id)
UserNotePropertyDao
Does the same thing as UserNotePropertyDao.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 UserNotePropertyDao
id
- the identifier of the entity to load.UserNotePropertyDao.load(int, Long)
public UserNoteProperty load(Long id)
UserNotePropertyDao
load
in interface UserNotePropertyDao
UserNotePropertyDao.load(Long)
public Collection<UserNoteProperty> loadAll()
UserNotePropertyDao
UserNoteProperty
.loadAll
in interface UserNotePropertyDao
UserNotePropertyDao.loadAll()
public Collection<?> loadAll(int transform)
UserNotePropertyDao
Does the same thing as UserNotePropertyDao.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 UserNotePropertyDao
transform
- the flag indicating what transformation to use.UserNotePropertyDao.loadAll(int)
public void remove(Collection<UserNoteProperty> entities)
UserNotePropertyDao
entities collection.
remove
in interface UserNotePropertyDao
UserNotePropertyDao#remove(java.util.Collection)
public void remove(Long id)
UserNotePropertyDao
identifier
from the persistent store.remove
in interface UserNotePropertyDao
UserNotePropertyDao.remove(Long)
public void remove(UserNoteProperty userNoteProperty)
UserNotePropertyDao
remove
in interface UserNotePropertyDao
UserNotePropertyDao.remove(UserNoteProperty)
public int removePropertiesForNote(Long noteId)
UserNotePropertyDao
Remove all properties for the given note. This method should only be called by the UserNotePropertyAccessor.
removePropertiesForNote
in interface UserNotePropertyDao
noteId
- the ID of the note
UserNotePropertyDao.removePropertiesForNote(Long)
public int removePropertiesForUser(Long userId)
UserNotePropertyDao
Remove all properties for the given user.
removePropertiesForUser
in interface UserNotePropertyDao
userId
- the ID of the user
UserNotePropertyDao.removePropertiesForUser(Long)
protected void transformEntities(int transform, Collection<?> entities)
transformEntity(int,UserNoteProperty)
method. This method does not instantiate a new collection.
This method is to be used internally only.transform
- one of the constants declared in UserNotePropertyDao
entities
- the collection of entities to transformtransformEntity(int,UserNoteProperty)
protected Object transformEntity(int transform, UserNoteProperty entity)
transform
flag is set to one of the constants defined in
UserNotePropertyDao
, please note that the UserNotePropertyDao.TRANSFORM_NONE
constant
denotes no transformation, so the entity itself will be returned.
If the integer argument value is unknown UserNotePropertyDao.TRANSFORM_NONE
is assumed.transform
- one of the constants declared in UserNotePropertyDao
entity
- an entity that was foundtransformEntities(int,java.util.Collection)
public void update(Collection<UserNoteProperty> entities)
UserNotePropertyDao
entities
collection in the persistent store.update
in interface UserNotePropertyDao
UserNotePropertyDao#update(java.util.Collection)
public void update(UserNoteProperty userNoteProperty)
UserNotePropertyDao
userNoteProperty
instance in the persistent store.update
in interface UserNotePropertyDao
UserNotePropertyDao.update(UserNoteProperty)
Copyright © 2019 Communote team. All rights reserved.