public class PostDaoImpl extends AbstractContentHierarchyDaoImpl<Post,PostAttribute,PostFacet> implements ContentSource<Post,PostAttribute,PostFacet>
relEntitiesDelTransformer
FILTER_PARENTS, FILTER_PARENTS_IMMEDIATE
em
ct, t
ATTRIB_CONTENT_PARENT, ATTRIB_HIERARCHY_STARTS_LIKE
Constructor and Description |
---|
PostDaoImpl() |
Modifier and Type | Method and Description |
---|---|
Long |
delete(Long id)
A special Delete operation on the entity that will remove the entity and related entities based on id.
|
void |
delete(Post persistentObject) |
PostFacet |
getContentFacetInstance(Post post,
String facetName) |
String |
getEntityName() |
String |
getFacetEntityName() |
String |
getNativeEntityName() |
void |
init() |
Post |
load(Object id) |
Post |
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.
|
Post |
save(Post transientObject) |
void |
unPublish(Post 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 PostFacet getContentFacetInstance(Post post, String facetName)
getContentFacetInstance
in class AbstractContentHierarchyDaoImpl<Post,PostAttribute,PostFacet>
protected void updateAttribute(List<Long> ids, String attribute, String value)
updateAttribute
in class AbstractContentHierarchyDaoImpl<Post,PostAttribute,PostFacet>
public String getEntityName()
getEntityName
in class AbstractContentHierarchyDaoImpl<Post,PostAttribute,PostFacet>
public String getFacetEntityName()
getFacetEntityName
in class AbstractContentHierarchyDaoImpl<Post,PostAttribute,PostFacet>
public String getNativeEntityName()
getNativeEntityName
in class AbstractContentHierarchyDaoImpl<Post,PostAttribute,PostFacet>
@Transactional(readOnly=false) public void delete(Post persistentObject)
delete
in interface GenericDao<Post>
delete
in class GenericDaoImpl<Post>
@Transactional(readOnly=true) public Post load(Object id, Class entityClass)
GenericDao
load
in interface GenericDao<Post>
load
in class GenericDaoImpl<Post>
id
- as Id for EntityentityClass
- as Class
of entity@Transactional(readOnly=true) public Post load(Object id)
load
in interface GenericDao<Post>
load
in class GenericDaoImpl<Post>
@Transactional(readOnly=false) public Post save(Post transientObject)
save
in interface GenericDao<Post>
save
in class AbstractContentHierarchyDaoImpl<Post,PostAttribute,PostFacet>
@Transactional(readOnly=false) public Long delete(Long id)
GenericDao
delete
in interface GenericDao<Post>
delete
in class AbstractContentHierarchyDaoImpl<Post,PostAttribute,PostFacet>
Long
@Transactional(readOnly=true) public List query(String ql, String dialect, Object... params) throws Exception
GenericDaoImpl
query
in interface FreeQuery
query
in class GenericDaoImpl<Post>
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<Post>
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(Post post)
ContentSource
unPublish
in interface ContentSource<Post,PostAttribute,PostFacet>
unPublish
in class AbstractContentHierarchyDaoImpl<Post,PostAttribute,PostFacet>
Copyright © 2018. All rights reserved.