com.jalios.jcms.db
Class PublicationCriteria

java.lang.Object
  extended by com.jalios.jcms.db.PublicationCriteria
All Implemented Interfaces:
DBConstants, JaliosConstants

public class PublicationCriteria
extends Object
implements JaliosConstants, DBConstants

This class contains criteria for a DB publication query.

Since:
jcms-6.0.0
Version:
$Revision: 69355 $
Author:
Olivier Dedieu

Field Summary
static String REVISION
           
 
Fields inherited from interface com.jalios.util.JaliosConstants
CRLF, MILLIS_IN_ONE_DAY, MILLIS_IN_ONE_HOUR, MILLIS_IN_ONE_MINUTE, MILLIS_IN_ONE_MONTH, MILLIS_IN_ONE_SECOND, MILLIS_IN_ONE_WEEK, MILLIS_IN_ONE_YEAR
 
Fields inherited from interface com.jalios.jcms.db.DBConstants
ALL_CATEGORIES_SET_FIELD, AUTH_GRP_SET_FIELD, AUTH_MBR_SET_FIELD, AUTHOR_ID_FIELD, CATEGORIES_SET_FIELD, CDATE_FIELD, CHANNEL_JCMSDB_PROP, DBDATA_URID, HAS_NO_READ_RIGHTS, HIBERNATE_MAPPING_ADATE, HIBERNATE_MAPPING_AUTHOR, HIBERNATE_MAPPING_CDATE, HIBERNATE_MAPPING_EDATE, HIBERNATE_MAPPING_MDATE, HIBERNATE_MAPPING_PDATE, HIBERNATE_MAPPING_PSTATUS, HIBERNATE_MAPPING_TITLE, HIBERNATE_MAPPING_WORKFLOW_ID, HIBERNATE_MAPPING_WORKSPACE_ID, MDATE_FIELD, PSTATUS_FIELD, ROW_ID_FIELD, SCROLL_FETCH_SIZE, WORKFLOW_ID_FIELD, WORKSPACE_ID_FIELD
 
Constructor Summary
PublicationCriteria(Class<? extends Publication> clazz)
           
PublicationCriteria(Class<? extends Publication> clazz, QueryHandler qh)
           
 
Method Summary
 org.hibernate.Criteria buildCriteria(boolean count)
           
 boolean checkReadRights()
           
 String getAuthorId()
           
 Date getBeginDate()
           
 String getDateType()
           
 Date getEndDate()
           
 int getFirstResult()
           
 int getMaxResults()
           
 Member getMember()
           
 Comparator getMergeComparator()
          Returns the merge comparator used to sort hybrid search.
 String getOrder()
           
 int[] getPstatusArray()
           
 Class<? extends Publication> getPubClass()
           
 QueryHandler getQueryHandler()
           
 String getText()
           
 String getWorkspaceId()
          Use instead getWorkspaceIdSet().
 Set<String> getWorkspaceIdSet()
           
 boolean hasAdvancedLuceneQuery()
          Returns true if there is an advanced lucene query to be performed.
 boolean isAscendingOrder()
           
 boolean isHybridSearch()
           
 boolean isIncludePstatus()
           
 boolean isPolymorphicQuery()
           
 boolean isTextSearch()
          Returns true if the text parameter has been setup.
 PublicationCriteria setAscendingOrder(boolean ascendingOrder)
           
 PublicationCriteria setAuthor(Member author)
           
 PublicationCriteria setAuthorId(String authorId)
           
 PublicationCriteria setBeginDate(Date beginDate)
           
 PublicationCriteria setCustomCriterion(org.hibernate.criterion.Criterion customCriterion)
           
 PublicationCriteria setDateType(String dateType)
           
 PublicationCriteria setEndDate(Date endDate)
           
 PublicationCriteria setFirstResult(int firstResult)
           
 void setHybridSearch(boolean isHybridSearch)
           
 PublicationCriteria setIncludePstatus(boolean includePstatus)
           
 PublicationCriteria setMaxResults(int maxResults)
           
 void setMember(Member member)
           
 PublicationCriteria setMergeComparator(Comparator mergeComparator)
          Set the merge comparator to be used to sort hybrid search (and set the isHybridSearch flag)
 PublicationCriteria setOrder(String order)
           
 PublicationCriteria setPstatusArray(int[] pstatusArray)
           
 PublicationCriteria setPubClass(Class<? extends Publication> clazz)
           
 PublicationCriteria setQueryHandler(QueryHandler qh)
           
 PublicationCriteria setRowIdSet(Set<Long> rowIdSet)
           
 PublicationCriteria setText(String text)
           
 PublicationCriteria setWorkspace(Workspace workspace)
          Use instead setWorkspaceIdSet(Collection).
 PublicationCriteria setWorkspaceId(String workspaceId)
          Use instead setWorkspaceIdSet(Collection).
 void setWorkspaceIdSet(Collection<String> wsIds)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

REVISION

public static final String REVISION
See Also:
Constant Field Values
Constructor Detail

PublicationCriteria

public PublicationCriteria(Class<? extends Publication> clazz)

PublicationCriteria

public PublicationCriteria(Class<? extends Publication> clazz,
                           QueryHandler qh)
Method Detail

toString

public String toString()
Overrides:
toString in class Object

buildCriteria

public org.hibernate.Criteria buildCriteria(boolean count)

isTextSearch

public boolean isTextSearch()
Returns true if the text parameter has been setup.

Returns:
true if the text parameter has been setup.
Since:
jcms-6.0.0

hasAdvancedLuceneQuery

public boolean hasAdvancedLuceneQuery()
Returns true if there is an advanced lucene query to be performed.

Returns:
true if there is an advanced lucene query to be performed.
Since:
jcms-6.2.0

getPubClass

public Class<? extends Publication> getPubClass()

setPubClass

public PublicationCriteria setPubClass(Class<? extends Publication> clazz)

getQueryHandler

public QueryHandler getQueryHandler()

setQueryHandler

public PublicationCriteria setQueryHandler(QueryHandler qh)

getWorkspaceId

public String getWorkspaceId()
Use instead getWorkspaceIdSet().

Returns:
the workspace id to refine on.

setWorkspaceId

public PublicationCriteria setWorkspaceId(String workspaceId)
Use instead setWorkspaceIdSet(Collection).

Parameters:
workspaceId - the workspace id to refine on.
Returns:
the publication criteria.

setWorkspace

public PublicationCriteria setWorkspace(Workspace workspace)
Use instead setWorkspaceIdSet(Collection).

Parameters:
workspace - the workspace to refine on.
Returns:
the publication criteria.

setWorkspaceIdSet

public void setWorkspaceIdSet(Collection<String> wsIds)
Parameters:
wsIds - the set of workspace's ids to refine on.
Since:
jcms-7.1.3, jcms-8.0.0

getWorkspaceIdSet

public Set<String> getWorkspaceIdSet()
Returns:
the workspaceIdSet to refine on.
Since:
jcms-7.1.3, jcms-8.0.0

getAuthorId

public String getAuthorId()

setAuthorId

public PublicationCriteria setAuthorId(String authorId)

setAuthor

public PublicationCriteria setAuthor(Member author)

getPstatusArray

public int[] getPstatusArray()

setPstatusArray

public PublicationCriteria setPstatusArray(int[] pstatusArray)

isIncludePstatus

public boolean isIncludePstatus()

setIncludePstatus

public PublicationCriteria setIncludePstatus(boolean includePstatus)

getText

public String getText()

setText

public PublicationCriteria setText(String text)

getBeginDate

public Date getBeginDate()

setBeginDate

public PublicationCriteria setBeginDate(Date beginDate)

getEndDate

public Date getEndDate()

setEndDate

public PublicationCriteria setEndDate(Date endDate)

getDateType

public String getDateType()

setDateType

public PublicationCriteria setDateType(String dateType)

setRowIdSet

public PublicationCriteria setRowIdSet(Set<Long> rowIdSet)

setMember

public void setMember(Member member)

getMember

public Member getMember()

checkReadRights

public boolean checkReadRights()

getFirstResult

public int getFirstResult()

setFirstResult

public PublicationCriteria setFirstResult(int firstResult)

getMaxResults

public int getMaxResults()

setMaxResults

public PublicationCriteria setMaxResults(int maxResults)

getOrder

public String getOrder()

setOrder

public PublicationCriteria setOrder(String order)

isAscendingOrder

public boolean isAscendingOrder()

setAscendingOrder

public PublicationCriteria setAscendingOrder(boolean ascendingOrder)

setCustomCriterion

public PublicationCriteria setCustomCriterion(org.hibernate.criterion.Criterion customCriterion)

getMergeComparator

public Comparator getMergeComparator()
Returns the merge comparator used to sort hybrid search. If no comparator has been provided, it is deduced from getOrder() and isAscendingOrder().

Returns:
the merge comparator
Since:
jcms-7.0.0

setMergeComparator

public PublicationCriteria setMergeComparator(Comparator mergeComparator)
Set the merge comparator to be used to sort hybrid search (and set the isHybridSearch flag)

Parameters:
mergeComparator - the merge comparator
Returns:
this PublicationCriteria for chained invocation
Since:
jcms-7.0.0

isHybridSearch

public boolean isHybridSearch()

setHybridSearch

public void setHybridSearch(boolean isHybridSearch)

isPolymorphicQuery

public boolean isPolymorphicQuery()


Copyright © 2001-2010 Jalios SA. All Rights Reserved.