Class 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  
    • 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 java.util.function.Predicate

        and, negate, or
    • Field Detail

      • pstatus

        protected int pstatus
      • greater

        protected int greater
    • 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 comparison
        greater - an integer indicating the comparison to be performed :
        • -1 : to select publications with a pstatus lower than or equals to the reference pstatus
        • 1 : to select publications with a pstatus greater than or equals to the reference pstatus
        • any 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 interface DataSelector
        Parameters:
        data - the data to evaluate.
        Returns:
        true if the data is selected. False otherwise.