Package com.jalios.jcms
Class Publication.PstatusSelector
- java.lang.Object
-
- com.jalios.jcms.Publication.PstatusSelector
-
- All Implemented Interfaces:
DataSelector
,java.util.function.Predicate<Data>
- Enclosing class:
- Publication
public static class Publication.PstatusSelector extends java.lang.Object implements DataSelector
PstatusSelector selects all the publications with a given pstatus.- Since:
- jcms-2.1
-
-
Field Summary
Fields Modifier and Type Field Description protected int
greater
protected int
pstatus
-
Fields inherited from interface com.jalios.jcms.DataSelector
REVISION
-
-
Constructor Summary
Constructors Constructor Description PstatusSelector(int pstatus)
Build a new PstatusSelector to select publications having the same pstatus as the pstatus specified in this constructor.PstatusSelector(int pstatus, int greater)
Build a new PstatusSelector to select publications according to their pstatus.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isSelected(Data data)
Evaluates if a data must be selected or not.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.jalios.jcms.DataSelector
test
-
-
-
-
Constructor Detail
-
PstatusSelector
public PstatusSelector(int pstatus, int greater)
Build a new PstatusSelector to select publications according to their pstatus.- Parameters:
pstatus
- the reference pstatus to be used during comparisongreater
- an integer indicating the comparison to be performed :-1
: to select publications with a pstatus lower than or equals to the reference pstatus1
: to select publications with a pstatus greater than or equals to the reference pstatusany other value
: to select publications with a pstatus equals to the reference pstatus
-
PstatusSelector
public PstatusSelector(int pstatus)
Build a new PstatusSelector to select publications having the same pstatus as the pstatus specified in this constructor.- Parameters:
pstatus
- the pstatus value the publications must equals in order to be selected
-
-
Method Detail
-
isSelected
public boolean isSelected(Data data)
Description copied from interface:DataSelector
Evaluates if a data must be selected or not.- Specified by:
isSelected
in interfaceDataSelector
- Parameters:
data
- the data to evaluate.- Returns:
- true if the data is selected. False otherwise.
-
-