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.
UserNotePropertyTRANSFORM_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 UserNotePropertyDaoUserNotePropertyDao#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 UserNotePropertyDaoUserNotePropertyDao.create(int transform, UserNoteProperty)public Collection<UserNoteProperty> create(Collection<UserNoteProperty> entities)
UserNotePropertyDaoentities collectioncreate in interface UserNotePropertyDaoentities - the collection of com.communote.server.persistence.user.UserNoteProperty instances
to create.UserNotePropertyDao#create(java.util.Collection) public UserNoteProperty create(UserNoteProperty userNoteProperty)
UserNotePropertyDaocreate in interface UserNotePropertyDaoUserNotePropertyDao.create(UserNoteProperty)public void evict(UserNoteProperty entity)
evict in interface UserNotePropertyDaoentity - the entity to evictpublic Collection<UserNoteProperty> findProperties(Long noteId, String keyGroup, String key)
UserNotePropertyDaoReturn 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 UserNotePropertyDaoUserNotePropertyDao.findProperties(Long, String, String)public UserNoteProperty findProperty(Long noteId, String keyGroup, String key)
UserNotePropertyDaoReturn 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 UserNotePropertyDaoUserNotePropertyDao.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 UserNotePropertyDaoid - the identifier of the entity to load.UserNotePropertyDao.load(int, Long)public UserNoteProperty load(Long id)
UserNotePropertyDaoload in interface UserNotePropertyDaoUserNotePropertyDao.load(Long)public Collection<UserNoteProperty> loadAll()
UserNotePropertyDaoUserNoteProperty.loadAll in interface UserNotePropertyDaoUserNotePropertyDao.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 UserNotePropertyDaotransform - the flag indicating what transformation to use.UserNotePropertyDao.loadAll(int)public void remove(Collection<UserNoteProperty> entities)
UserNotePropertyDaoentities collection.remove in interface UserNotePropertyDaoUserNotePropertyDao#remove(java.util.Collection) public void remove(Long id)
UserNotePropertyDaoidentifier from the persistent store.remove in interface UserNotePropertyDaoUserNotePropertyDao.remove(Long)public void remove(UserNoteProperty userNoteProperty)
UserNotePropertyDaoremove in interface UserNotePropertyDaoUserNotePropertyDao.remove(UserNoteProperty)public int removePropertiesForNote(Long noteId)
UserNotePropertyDaoRemove all properties for the given note. This method should only be called by the UserNotePropertyAccessor.
removePropertiesForNote in interface UserNotePropertyDaonoteId - the ID of the note
UserNotePropertyDao.removePropertiesForNote(Long)public int removePropertiesForUser(Long userId)
UserNotePropertyDaoRemove all properties for the given user.
removePropertiesForUser in interface UserNotePropertyDaouserId - 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 UserNotePropertyDaoentities - 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 UserNotePropertyDaoentity - an entity that was foundtransformEntities(int,java.util.Collection)public void update(Collection<UserNoteProperty> entities)
UserNotePropertyDaoentities collection in the persistent store.update in interface UserNotePropertyDaoUserNotePropertyDao#update(java.util.Collection) public void update(UserNoteProperty userNoteProperty)
UserNotePropertyDaouserNoteProperty instance in the persistent store.update in interface UserNotePropertyDaoUserNotePropertyDao.update(UserNoteProperty)Copyright © 2019 Communote team. All rights reserved.