public abstract class UserNoteEntityDaoBase extends org.springframework.orm.hibernate3.support.HibernateDaoSupport implements UserNoteEntityDao
Base Spring DAO Class: is able to create, update, remove, load, and find objects of type
com.communote.server.persistence.user.note.UserNoteEntity
.
UserNoteEntity
TRANSFORM_NONE
Constructor and Description |
---|
UserNoteEntityDaoBase() |
Modifier and Type | Method and Description |
---|---|
Collection<UserNoteEntity> |
create(Collection<UserNoteEntity> entities)
Creates a new instance of com.communote.server.persistence.user.note.UserNoteEntity and adds
from the passed in
entities collection |
Collection<UserNoteEntity> |
create(int transform,
Collection<UserNoteEntity> entities)
Does the same thing as
UserNoteEntityDao.create(com.communote.server.model.user.note.UserNoteEntity)
with an additional flag called transform . |
Object |
create(int transform,
UserNoteEntity userNoteEntity)
Does the same thing as
UserNoteEntityDao.create(com.communote.server.model.user.note.UserNoteEntity)
with an additional flag called transform . |
UserNoteEntity |
create(UserNoteEntity userNoteEntity)
Creates an instance of com.communote.server.persistence.user.note.UserNoteEntity and adds it
to the persistent store.
|
void |
evict(UserNoteEntity entity)
Evicts (removes) the entity from the hibernate cache
|
UserNoteEntity |
findByUserIdNoteId(Long userId,
Long noteId)
Find the user note entity by the given user and note id
|
protected abstract UserNoteEntity |
handleFindByUserIdNoteId(Long userId,
Long noteId)
Performs the core logic for
findByUserIdNoteId(Long, Long) |
protected abstract int |
handleRemoveUserNoteEntitiesForNote(Long noteId)
Performs the core logic for
removeUserNoteEntitiesForNote(Long) |
protected abstract int |
handleRemoveUserNoteEntitiesForUser(Long userid)
Performs the core logic for
removeUserNoteEntitiesForUser(Long) |
Object |
load(int transform,
Long id)
Does the same thing as
UserNoteEntityDao.load(Long) with an additional flag called
transform . |
UserNoteEntity |
load(Long id)
Loads an instance of com.communote.server.persistence.user.note.UserNoteEntity from the
persistent store.
|
Collection<UserNoteEntity> |
loadAll()
Loads all entities of type
UserNoteEntity . |
Collection<?> |
loadAll(int transform)
Does the same thing as
UserNoteEntityDao.loadAll() with an additional flag called
transform . |
void |
remove(Collection<UserNoteEntity> entities)
Removes all entities in the given
entities |
void |
remove(Long id)
Removes the instance of com.communote.server.persistence.user.note.UserNoteEntity having the
given
identifier from the persistent store. |
void |
remove(UserNoteEntity userNoteEntity)
Removes the instance of com.communote.server.persistence.user.note.UserNoteEntity from the
persistent store.
|
int |
removeUserNoteEntitiesForNote(Long noteId)
Remove all UserNoteEntity's for the given note id
|
int |
removeUserNoteEntitiesForUser(Long userid)
Remove all UserNoteEntity's for the given user id
|
protected void |
transformEntities(int transform,
Collection<?> entities)
Transforms a collection of entities using the
transformEntity(int,com.communote.server.model.user.note.UserNoteEntity) method. |
protected Object |
transformEntity(int transform,
UserNoteEntity 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
com.communote.server.persistence.user.note.UserNoteEntityDao , please note that
the UserNoteEntityDao.TRANSFORM_NONE constant denotes no transformation, so the entity itself will be
returned. |
void |
update(Collection<UserNoteEntity> entities)
Updates all instances in the
entities collection in the persistent store. |
void |
update(UserNoteEntity userNoteEntity)
Updates the
userNoteEntity instance in the persistent store. |
public UserNoteEntity create(UserNoteEntity userNoteEntity)
UserNoteEntityDao
create
in interface UserNoteEntityDao
UserNoteEntityDao.create(com.communote.server.model.user.note.UserNoteEntity)
public Object create(int transform, UserNoteEntity userNoteEntity)
UserNoteEntityDao
Does the same thing as UserNoteEntityDao.create(com.communote.server.model.user.note.UserNoteEntity)
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 UserNoteEntityDao
com.communote.server.persistence.user.note.UserNoteEntityDao#create(int transform,
com.communote.server.persistence.user.note.UserNoteEntity)
public Collection<UserNoteEntity> create(int transform, Collection<UserNoteEntity> entities)
UserNoteEntityDao
Does the same thing as UserNoteEntityDao.create(com.communote.server.model.user.note.UserNoteEntity)
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 UserNoteEntityDao
com.communote.server.persistence.user.note.UserNoteEntityDao#create(int,
java.util.Collection)
public Collection<UserNoteEntity> create(Collection<UserNoteEntity> entities)
UserNoteEntityDao
entities
collectioncreate
in interface UserNoteEntityDao
entities
- the collection of com.communote.server.persistence.user.note.UserNoteEntity
instances to create.UserNoteEntityDao.create(java.util.Collection<
com.communote.server.persistence.user.note.UserNoteEntity>)
public void evict(UserNoteEntity entity)
evict
in interface UserNoteEntityDao
entity
- the entity to evictpublic UserNoteEntity findByUserIdNoteId(Long userId, Long noteId)
UserNoteEntityDao
Find the user note entity by the given user and note id
findByUserIdNoteId
in interface UserNoteEntityDao
UserNoteEntityDao.findByUserIdNoteId(Long,
Long)
protected abstract UserNoteEntity handleFindByUserIdNoteId(Long userId, Long noteId)
findByUserIdNoteId(Long, Long)
protected abstract int handleRemoveUserNoteEntitiesForNote(Long noteId)
removeUserNoteEntitiesForNote(Long)
protected abstract int handleRemoveUserNoteEntitiesForUser(Long userid)
removeUserNoteEntitiesForUser(Long)
public Object load(int transform, Long id)
UserNoteEntityDao
Does the same thing as UserNoteEntityDao.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 UserNoteEntityDao
id
- the identifier of the entity to load.UserNoteEntityDao.load(int, Long)
public UserNoteEntity load(Long id)
UserNoteEntityDao
load
in interface UserNoteEntityDao
UserNoteEntityDao.load(Long)
public Collection<UserNoteEntity> loadAll()
UserNoteEntityDao
UserNoteEntity
.loadAll
in interface UserNoteEntityDao
UserNoteEntityDao.loadAll()
public Collection<?> loadAll(int transform)
UserNoteEntityDao
Does the same thing as UserNoteEntityDao.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 UserNoteEntityDao
transform
- the flag indicating what transformation to use.UserNoteEntityDao.loadAll(int)
public void remove(UserNoteEntity userNoteEntity)
UserNoteEntityDao
remove
in interface UserNoteEntityDao
UserNoteEntityDao.remove(com.communote.server.model.user.note.UserNoteEntity)
public void remove(Collection<UserNoteEntity> entities)
UserNoteEntityDao
entities collection.
remove
in interface UserNoteEntityDao
UserNoteEntityDao.remove(java.util.Collection<
com.communote.server.persistence.user.note.UserNoteEntity>)
public void remove(Long id)
UserNoteEntityDao
identifier
from the persistent store.remove
in interface UserNoteEntityDao
UserNoteEntityDao.remove(Long)
public int removeUserNoteEntitiesForNote(Long noteId)
UserNoteEntityDao
Remove all UserNoteEntity's for the given note id
removeUserNoteEntitiesForNote
in interface UserNoteEntityDao
UserNoteEntityDao.removeUserNoteEntitiesForNote(Long)
public int removeUserNoteEntitiesForUser(Long userid)
UserNoteEntityDao
Remove all UserNoteEntity's for the given user id
removeUserNoteEntitiesForUser
in interface UserNoteEntityDao
UserNoteEntityDao.removeUserNoteEntitiesForUser(Long)
protected void transformEntities(int transform, Collection<?> entities)
transformEntity(int,com.communote.server.model.user.note.UserNoteEntity)
method.
This method does not instantiate a new collection.
This method is to be used internally only.transform
- one of the constants declared in
com.communote.server.persistence.user.note.UserNoteEntityDao
entities
- the collection of entities to transformtransformEntity(int,com.communote.server.model.user.note.UserNoteEntity)
protected Object transformEntity(int transform, UserNoteEntity entity)
transform
flag is set to one of the constants defined in
com.communote.server.persistence.user.note.UserNoteEntityDao
, please note that
the UserNoteEntityDao.TRANSFORM_NONE
constant denotes no transformation, so the entity itself will be
returned.
If the integer argument value is unknown UserNoteEntityDao.TRANSFORM_NONE
is assumed.transform
- one of the constants declared in
UserNoteEntityDao
entity
- an entity that was foundtransformEntities(int,java.util.Collection)
public void update(UserNoteEntity userNoteEntity)
UserNoteEntityDao
userNoteEntity
instance in the persistent store.update
in interface UserNoteEntityDao
UserNoteEntityDao.update(com.communote.server.model.user.note.UserNoteEntity)
public void update(Collection<UserNoteEntity> entities)
UserNoteEntityDao
entities
collection in the persistent store.update
in interface UserNoteEntityDao
UserNoteEntityDao.update(java.util.Collection<
com.communote.server.persistence.user.note.UserNoteEntity>)
Copyright © 2019 Communote team. All rights reserved.