public abstract class BlogDaoBase extends org.springframework.orm.hibernate3.support.HibernateDaoSupport implements BlogDao
Base Spring DAO Class: is able to create, update, remove, load, and find objects of type
Blog
.
Blog
TRANSFORM_NONE
Constructor and Description |
---|
BlogDaoBase() |
Modifier and Type | Method and Description |
---|---|
Blog |
create(Blog blog)
Creates an instance of com.communote.server.persistence.blog.Blog and adds it to the
persistent store.
|
Collection<Blog> |
create(Collection<Blog> entities)
Creates a new instance of com.communote.server.persistence.blog.Blog and adds from the passed
in
entities collection |
Object |
create(int transform,
Blog blog)
Does the same thing as
BlogDao.create(com.communote.server.model.blog.Blog) with an
additional flag called transform . |
Collection<Blog> |
create(int transform,
Collection<Blog> entities)
Does the same thing as
BlogDao.create(com.communote.server.model.blog.Blog) with an
additional flag called transform . |
void |
evict(Blog entity)
Evicts (removes) the entity from the hibernate cache
|
List<Blog> |
findBlogs(Long[] ids) |
Blog |
findByExternalObject(Long internalExternalObjectId)
Return the blog that has the given external object assigned
|
Blog |
findByExternalObject(String externalSystemId,
String externalId)
Find a blog that has a given external object
|
List<Blog> |
findByExternalSystemId(String systemId)
Return all blogs that have an external object with the given external system id
|
Object |
findByNameIdentifier(int transform,
String nameIdentifier)
Does the same thing as
BlogDao.findByNameIdentifier(String) with an additional flag called
transform . |
Object |
findByNameIdentifier(int transform,
String queryString,
String nameIdentifier)
Does the same thing as
#findByNameIdentifier(boolean, String) with an additional
argument called queryString . |
Blog |
findByNameIdentifier(String nameIdentifier)
Find the blog with the given name identifier.
|
Blog |
findByNameIdentifier(String queryString,
String nameIdentifier)
Does the same thing as
BlogDao.findByNameIdentifier(String) with an additional argument
called queryString . |
List<Blog> |
findDirectlyManagedBlogsOfUser(Long userId)
Returns all blogs that are managed by a user.
|
Blog |
findLatestBlog()
Returns the Blog entity with the highest ID value.
|
protected GlobalIdDao |
getGlobalIdDao()
Gets the reference to
globalIdDao . |
List<BlogData> |
getLastUsedBlogs(Long userId,
int maxResult) |
List<BlogData> |
getMostUsedBlogs(Long userId,
int maxResults,
int maxDays) |
protected abstract List<Blog> |
handleFindBlogs(Long[] ids)
Performs the core logic for
findBlogs(Long[]) |
protected abstract Blog |
handleFindByExternalObject(Long internalExternalObjectId)
Performs the core logic for
findByExternalObject(Long) |
protected abstract Blog |
handleFindByExternalObject(String externalSystemId,
String externalId)
Performs the core logic for
findByExternalObject(String, String) |
protected abstract List<Blog> |
handleFindByExternalSystemId(String systemId)
Performs the core logic for
findByExternalSystemId(String) |
protected abstract List<Blog> |
handleFindDirectlyManagedBlogsOfUser(Long userId)
Performs the core logic for
findDirectlyManagedBlogsOfUser(Long) |
protected abstract Blog |
handleFindLatestBlog()
Performs the core logic for
findLatestBlog() |
protected abstract List<BlogData> |
handleGetLastUsedBlogs(Long userId,
int maxResult)
Performs the core logic for
getLastUsedBlogs(Long, int) |
protected abstract List<BlogData> |
handleGetMostUsedBlogs(Long userId,
int maxResults,
int maxDays)
Performs the core logic for
getMostUsedBlogs(Long, int, int) |
Object |
load(int transform,
Long id)
Does the same thing as
BlogDao.load(Long) with an additional flag called
transform . |
Blog |
load(Long id)
Loads an instance of com.communote.server.persistence.blog.Blog from the persistent store.
|
Collection<Blog> |
loadAll()
Loads all entities of type
Blog . |
Collection<?> |
loadAll(int transform)
Does the same thing as
BlogDao.loadAll() with an additional flag called
transform . |
void |
remove(Blog blog)
Removes the instance of com.communote.server.persistence.blog.Blog from the persistent store.
|
void |
remove(Collection<Blog> entities)
Removes all entities in the given
entities |
void |
remove(Long id)
Removes the instance of com.communote.server.persistence.blog.Blog having the given
identifier from the persistent store. |
void |
setGlobalIdDao(GlobalIdDao globalIdDao)
Sets the reference to
globalIdDao . |
protected void |
transformEntities(int transform,
Collection<?> entities)
Transforms a collection of entities using the
transformEntity(int,Blog) method. |
protected Object |
transformEntity(int transform,
Blog 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.blog.BlogDao , please note that the
BlogDao.TRANSFORM_NONE constant denotes no transformation, so the entity itself will be
returned. |
void |
update(Blog blog)
Updates the
blog instance in the persistent store. |
void |
update(Collection<Blog> entities)
Updates all instances in the
entities collection in the persistent store. |
checkDaoConfig, convertHibernateAccessException, createHibernateTemplate, getHibernateTemplate, getSession, getSession, getSessionFactory, releaseSession, setHibernateTemplate, setSessionFactory
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getBlogCount, resetGlobalPermissions
public Blog create(Blog blog)
BlogDao
create
in interface BlogDao
BlogDao.create(Blog)
public Object create(int transform, Blog blog)
BlogDao
Does the same thing as BlogDao.create(com.communote.server.model.blog.Blog)
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.
public Collection<Blog> create(int transform, Collection<Blog> entities)
BlogDao
Does the same thing as BlogDao.create(com.communote.server.model.blog.Blog)
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.
public Collection<Blog> create(Collection<Blog> entities)
BlogDao
entities
collectionpublic void evict(Blog entity)
public List<Blog> findBlogs(Long[] ids)
findBlogs
in interface BlogDao
BlogDao.findBlogs(Long[])
public Blog findByExternalObject(Long internalExternalObjectId)
BlogDao
Return the blog that has the given external object assigned
findByExternalObject
in interface BlogDao
BlogDao.findByExternalObject(Long)
public Blog findByExternalObject(String externalSystemId, String externalId)
BlogDao
Find a blog that has a given external object
findByExternalObject
in interface BlogDao
BlogDao.findByExternalObject(String, String)
public List<Blog> findByExternalSystemId(String systemId)
BlogDao
Return all blogs that have an external object with the given external system id
findByExternalSystemId
in interface BlogDao
BlogDao.findByExternalSystemId(String)
public Object findByNameIdentifier(int transform, String nameIdentifier)
BlogDao
Does the same thing as BlogDao.findByNameIdentifier(String)
with an additional flag called
transform
. If this flag is set to TRANSFORM_NONE
then finder
results will NOT be transformed during retrieval. If this flag is any of the
other constants defined here then finder results WILL BE passed through an
operation which can optionally transform the entities (into value objects for example). By
default, transformation does not occur.
findByNameIdentifier
in interface BlogDao
BlogDao.findByNameIdentifier(int, String)
public Object findByNameIdentifier(int transform, String queryString, String nameIdentifier)
BlogDao
Does the same thing as #findByNameIdentifier(boolean, String)
with an additional
argument called queryString
. This queryString
argument allows you
to override the query string defined in BlogDao.findByNameIdentifier(int, String
nameIdentifier)
.
findByNameIdentifier
in interface BlogDao
BlogDao.findByNameIdentifier(int, String, String)
public Blog findByNameIdentifier(String nameIdentifier)
BlogDao
Find the blog with the given name identifier.
findByNameIdentifier
in interface BlogDao
BlogDao.findByNameIdentifier(String)
public Blog findByNameIdentifier(String queryString, String nameIdentifier)
BlogDao
Does the same thing as BlogDao.findByNameIdentifier(String)
with an additional argument
called queryString
. This queryString
argument allows you to
override the query string defined in BlogDao.findByNameIdentifier(String)
.
findByNameIdentifier
in interface BlogDao
BlogDao.findByNameIdentifier(String, String)
public List<Blog> findDirectlyManagedBlogsOfUser(Long userId)
BlogDao
Returns all blogs that are managed by a user. This does only include blogs to which the user was explicitly added as manager and not those the user can manage because of his membership in a group with management access.
findDirectlyManagedBlogsOfUser
in interface BlogDao
BlogDao.findDirectlyManagedBlogsOfUser(Long)
public Blog findLatestBlog()
BlogDao
Returns the Blog entity with the highest ID value.
findLatestBlog
in interface BlogDao
BlogDao.findLatestBlog()
protected GlobalIdDao getGlobalIdDao()
globalIdDao
.public List<BlogData> getLastUsedBlogs(Long userId, int maxResult)
getLastUsedBlogs
in interface BlogDao
BlogDao.getLastUsedBlogs(Long, int)
public List<BlogData> getMostUsedBlogs(Long userId, int maxResults, int maxDays)
getMostUsedBlogs
in interface BlogDao
BlogDao.getMostUsedBlogs(Long, int, int)
protected abstract List<Blog> handleFindBlogs(Long[] ids)
findBlogs(Long[])
protected abstract Blog handleFindByExternalObject(Long internalExternalObjectId)
findByExternalObject(Long)
protected abstract Blog handleFindByExternalObject(String externalSystemId, String externalId)
findByExternalObject(String, String)
protected abstract List<Blog> handleFindByExternalSystemId(String systemId)
findByExternalSystemId(String)
protected abstract List<Blog> handleFindDirectlyManagedBlogsOfUser(Long userId)
findDirectlyManagedBlogsOfUser(Long)
protected abstract Blog handleFindLatestBlog()
findLatestBlog()
protected abstract List<BlogData> handleGetLastUsedBlogs(Long userId, int maxResult)
getLastUsedBlogs(Long, int)
protected abstract List<BlogData> handleGetMostUsedBlogs(Long userId, int maxResults, int maxDays)
getMostUsedBlogs(Long, int, int)
public Object load(int transform, Long id)
BlogDao
Does the same thing as BlogDao.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 BlogDao
id
- the identifier of the entity to load.BlogDao.load(int, Long)
public Blog load(Long id)
BlogDao
load
in interface BlogDao
BlogDao.load(Long)
public Collection<Blog> loadAll()
BlogDao
Blog
.loadAll
in interface BlogDao
BlogDao.loadAll()
public Collection<?> loadAll(int transform)
BlogDao
Does the same thing as BlogDao.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 BlogDao
transform
- the flag indicating what transformation to use.BlogDao.loadAll(int)
public void remove(Blog blog)
BlogDao
remove
in interface BlogDao
BlogDao.remove(Blog)
public void remove(Collection<Blog> entities)
BlogDao
entities collection.
public void remove(Long id)
BlogDao
identifier
from the persistent store.remove
in interface BlogDao
BlogDao.remove(Long)
public void setGlobalIdDao(GlobalIdDao globalIdDao)
globalIdDao
.protected void transformEntities(int transform, Collection<?> entities)
transformEntity(int,Blog)
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.blog.BlogDao
entities
- the collection of entities to transformtransformEntity(int,Blog)
protected Object transformEntity(int transform, Blog entity)
transform
flag is set to one of the constants defined in
com.communote.server.persistence.blog.BlogDao
, please note that the
BlogDao.TRANSFORM_NONE
constant denotes no transformation, so the entity itself will be
returned.
If the integer argument value is unknown BlogDao.TRANSFORM_NONE
is assumed.transform
- one of the constants declared in BlogDao
entity
- an entity that was foundtransformEntities(int,java.util.Collection)
public void update(Blog blog)
BlogDao
blog
instance in the persistent store.update
in interface BlogDao
BlogDao.update(Blog)
public void update(Collection<Blog> entities)
BlogDao
entities
collection in the persistent store.Copyright © 2019 Communote team. All rights reserved.