public class CommentDaoImpl extends AbstractContentHierarchyDaoImpl<Comment,CommentAttribute,CommentFacet> implements CommentDao
relEntitiesDelTransformer
FILTER_PARENTS, FILTER_PARENTS_IMMEDIATE
em
ct, t
ATTRIB_CONTENT_PARENT, ATTRIB_HIERARCHY_STARTS_LIKE
Constructor and Description |
---|
CommentDaoImpl() |
Modifier and Type | Method and Description |
---|---|
void |
delete(Comment persistentObject) |
Long |
delete(Long id)
A special Delete operation on the entity that will remove the entity and related entities based on id.
|
Page<Comment> |
getComments(String topic,
PageInfo pageInfo) |
CommentFacet |
getContentFacetInstance(Comment comment,
String facetName) |
String |
getEntityName() |
String |
getFacetEntityName() |
String |
getNativeEntityName() |
void |
init() |
Comment |
load(Object id) |
Comment |
load(Object id,
Class entityClass)
In some situations the DAO represents an Interface or perhaps a parent of the actual Entity./
The exact type of the entity would have to be Supplied.
|
List |
query(String ql,
String dialect,
Object... params)
Execute a raw Query in the native implementation language.
|
Page |
query(String ql,
String dialect,
PageInfo pageInfo,
Object... params)
Execute a raw Query in the native implementation language.
|
Comment |
save(Comment transientObject) |
void |
unPublish(Comment post)
Delete published version from source.
|
protected void |
updateAttribute(List<Long> ids,
String attribute,
String value) |
constructQueryImpl, count, deleteContent, deleteFacet, deleteFacet, deleteFacet, deleteSubHierarchy, getAlterEgos, getContent, getContents, getContents, getContentsList, getFacetArray, getFacetArrayIndeces, getFacets, getFacets, getFacets, getLastChildHierarchyCode, getNameSetter, getQueryObject, getRelEntitiesDelTransformer, isExistsAsParent, loadHierarchyFlat, loadPage, makeSpaceForNodeInParent, moveParent, publish, publish, saveFacet, setContent, setNameSetter, setRelEntitiesDelTransformer, shiftHierarchy, updateContentMetaAll, updateContentName, updateContentStatus
convert, delete, delete, deleteSubHierarchy, deleteSubHierarchy, filterParents, getLastChildHierarchyCode, getParents, getPersistTransformer, makeSpaceForNodeInParent, move, setPersistTransformer, verifyHierarchy
conditionConstruct, ensureRowIsEntity, ensureRowIsEntity, getEntityInstance, query, query, queryPage, queryPage
getEntityManager, getNativeEntityName, paginate, setEntityManager, update
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
count, deleteContent, deleteFacet, deleteFacet, deleteFacet, getContent, getContents, getContents, getContentsList, getFacetArray, getFacetArrayIndeces, getFacets, getFacets, getFacets, loadPage, publish, publish, query, queryPage, saveFacet, setContent, updateContentMetaAll, updateContentName, updateContentStatus
convert
@PostConstruct public void init()
public CommentFacet getContentFacetInstance(Comment comment, String facetName)
getContentFacetInstance
in class AbstractContentHierarchyDaoImpl<Comment,CommentAttribute,CommentFacet>
protected void updateAttribute(List<Long> ids, String attribute, String value)
updateAttribute
in class AbstractContentHierarchyDaoImpl<Comment,CommentAttribute,CommentFacet>
public String getEntityName()
getEntityName
in class AbstractContentHierarchyDaoImpl<Comment,CommentAttribute,CommentFacet>
public String getFacetEntityName()
getFacetEntityName
in class AbstractContentHierarchyDaoImpl<Comment,CommentAttribute,CommentFacet>
public String getNativeEntityName()
getNativeEntityName
in class AbstractContentHierarchyDaoImpl<Comment,CommentAttribute,CommentFacet>
@Transactional(readOnly=true) public Page<Comment> getComments(String topic, PageInfo pageInfo)
getComments
in interface BasicCommentDao
@Transactional(readOnly=false) public void delete(Comment persistentObject)
delete
in interface GenericDao<Comment>
delete
in class GenericDaoImpl<Comment>
@Transactional(readOnly=true) public Comment load(Object id, Class entityClass)
GenericDao
load
in interface GenericDao<Comment>
load
in class GenericDaoImpl<Comment>
id
- as Id for EntityentityClass
- as Class
of entity@Transactional(readOnly=true) public Comment load(Object id)
load
in interface GenericDao<Comment>
load
in class GenericDaoImpl<Comment>
@Transactional(readOnly=false) public Comment save(Comment transientObject)
save
in interface GenericDao<Comment>
save
in class AbstractContentHierarchyDaoImpl<Comment,CommentAttribute,CommentFacet>
@Transactional(readOnly=false) public Long delete(Long id)
GenericDao
delete
in interface GenericDao<Comment>
delete
in class AbstractContentHierarchyDaoImpl<Comment,CommentAttribute,CommentFacet>
Long
@Transactional(readOnly=true) public List query(String ql, String dialect, Object... params) throws Exception
GenericDaoImpl
query
in interface FreeQuery
query
in class GenericDaoImpl<Comment>
ql
- as String in native Schema languagedialect
- as String. NULL or empty or "NATIVE" implies NATIVE, "JPA" implies JPA will be used. Additional dialects can be supported but they will be implementation dependent.params
- as Query parameters to the string.
List
Exception
@Transactional(readOnly=true) public Page query(String ql, String dialect, PageInfo pageInfo, Object... params) throws Exception
GenericDaoImpl
query
in interface FreeQuery
query
in class GenericDaoImpl<Comment>
ql
- as String in native Schema languagedialect
- as String. NULL or empty or "NATIVE" implies NATIVE, "JPA" implies JPA will be used. Additional dialects can be supported but they will be implementation dependent.pageInfo
- as PageInfo
for pagination of resultparams
- as Query parameters to the string
Page
Exception
@Transactional(readOnly=false) public void unPublish(Comment post)
ContentSource
unPublish
in interface ContentSource<Comment,CommentAttribute,CommentFacet>
unPublish
in class AbstractContentHierarchyDaoImpl<Comment,CommentAttribute,CommentFacet>
Copyright © 2018. All rights reserved.