public interface BlogDao
Blog
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 |
---|---|
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
create(com.communote.server.model.blog.Blog) with an
additional flag called transform . |
Collection<?> |
create(int transform,
Collection<Blog> entities)
Does the same thing as
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
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
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.
|
long |
getBlogCount()
Gets the current count of blogs.
|
List<BlogData> |
getLastUsedBlogs(Long userId,
int maxResult) |
List<BlogData> |
getMostUsedBlogs(Long userId,
int maxResults,
int maxDays) |
Object |
load(int transform,
Long id)
Does the same thing as
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
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 |
resetGlobalPermissions()
Removes "all read" and "all write" from all topics.
|
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. |
static final int TRANSFORM_NONE
int
parameter called transform
. Blog create(Blog blog)
Object create(int transform, Blog blog)
Does the same thing as 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.
Collection<?> create(int transform, Collection<Blog> entities)
Does the same thing as 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.
Collection<Blog> create(Collection<Blog> entities)
entities
collectionentities
- the collection of com.communote.server.persistence.blog.Blog instances to create.void evict(Blog entity)
entity
- the entity to evictBlog 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 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.
Object findByNameIdentifier(int transform, String queryString, String nameIdentifier)
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 findByNameIdentifier(int, String
nameIdentifier)
.
Blog findByNameIdentifier(String nameIdentifier)
Find the blog with the given name identifier.
Blog findByNameIdentifier(String queryString, String nameIdentifier)
Does the same thing as findByNameIdentifier(String)
with an additional argument
called queryString
. This queryString
argument allows you to
override the query string defined in findByNameIdentifier(String)
.
List<Blog> findDirectlyManagedBlogsOfUser(Long userId)
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.
Blog findLatestBlog()
Returns the Blog entity with the highest ID value.
long getBlogCount()
Gets the current count of blogs.
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.Blog load(Long id)
Collection<Blog> loadAll()
Blog
.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(Blog blog)
void remove(Collection<Blog> entities)
entities collection.
void remove(Long id)
identifier
from the persistent store.void resetGlobalPermissions()
Removes "all read" and "all write" from all topics.
void update(Blog blog)
blog
instance in the persistent store.void update(Collection<Blog> entities)
entities
collection in the persistent store.Copyright © 2019 Communote team. All rights reserved.