| 
Oracle Fusion Middleware Java API Reference for Oracle WebCenter 11g Release 1 (11.1.1.3.0) E15995-02  | 
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
  
oracle.webcenter.search.refine.Refinement<java.util.Calendar>
      
oracle.webcenter.search.refine.DateRefinement
public class DateRefinement
A Calendar based refinement that captures a lot of the logic dates go through when used as Refiners for a search.
| Nested Class Summary | |
|---|---|
static class | 
DateRefinement.DateClause | 
| Nested classes/interfaces inherited from class oracle.webcenter.search.refine.Refinement | 
|---|
Refinement.Clause<T> | 
| Constructor Summary | |
|---|---|
DateRefinement(java.util.Calendar date, int count)Constructs a DateRefinement with one single Calendar value and the number of times that Calendar value shows up.  | 
|
DateRefinement(java.util.List<Refinement.Clause<java.util.Calendar>> clauses, int count)Constructs a DateRefinement with a List of clauses and a count.  | 
|
| Method Summary | |
|---|---|
protected  void | 
addAttributePredicate(java.util.List<Predicate> children, AttributePredicate<java.util.Calendar> newPredicate)Adds an attribute predicate to the list of Predicate objects held within a top-level ComplexPredicate.  | 
protected  void | 
buildName(java.util.Calendar calendar)Builds the name of the DateRefinement with a Calendar by formatting it and setting the name to be that String value.  | 
protected  AttributePredicate<java.util.Calendar> | 
createPredicate(QName name, java.lang.String comparator, java.util.Calendar value) | 
static java.util.Calendar | 
getCalendarSinceNumDays(java.util.Calendar cal)Get Calendar object for query execution of SinceNumDays comparator  | 
 ComplexPredicate.ConjunctionOp | 
getConjunctionOp()Returns the conjunction operator for this DateRefinement.  | 
static int | 
getNumDays(java.util.Date date)Get number of days from Date object of operand of SinceNumDays comparator  | 
static java.util.Calendar | 
getNumDaysAsCalendar(int num)Get Calendar object for operand of SinceNumDays comparator  | 
 java.util.Calendar | 
getYear()If refinement is a yearly refinement, return a calendar object of the year.  | 
 boolean | 
hasMatch(java.util.Calendar value)Returns whether the calendar value passed in matches the criteria held in this Refinement.  | 
static boolean | 
hasMatch(java.util.Calendar value, java.lang.String comparator, java.util.Calendar clauseValue)Matches a Calendar value with a criterion made up of a comparator and another Calendar.  | 
protected  java.util.List<Refinement.Clause<java.util.Calendar>> | 
initClauses(java.util.Calendar value, java.lang.String comparator) | 
 boolean | 
isAccumulative()Is this refinement accumulative over another refinement?  | 
 boolean | 
isDaily()Is calendar type daily?  | 
 boolean | 
isMonthly()Is calendar type monthly?  | 
 boolean | 
isSinceNumDays()Is calender type since num days?  | 
 boolean | 
isYearly()Is calendar type yearly?  | 
 void | 
setAccumulative(boolean value)Set the accumulative characteristic of this refinement  | 
 void | 
setCalendarType(int value)Set calendar type  | 
| Methods inherited from class oracle.webcenter.search.refine.Refinement | 
|---|
buildName, buildName, getClauses, getCount, getName, getValue, increment, increment, refine, setCount, setName, toString | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Constructor Detail | 
|---|
public DateRefinement(java.util.List<Refinement.Clause<java.util.Calendar>> clauses,
                      int count)
clauses - the List off Refinement.Clause objects to be used in this Refinement.count - the number of results expected when this DateRefinement is applied
public DateRefinement(java.util.Calendar date,
                      int count)
date - the Calendar value based on which an EQUALS clause is builtcount - the number of results expected when this DateRefinement is applied| Method Detail | 
|---|
protected java.util.List<Refinement.Clause<java.util.Calendar>> initClauses(java.util.Calendar value,
                                                                            java.lang.String comparator)
initClauses in class Refinement<java.util.Calendar>public boolean isAccumulative()
public void setAccumulative(boolean value)
public void setCalendarType(int value)
value - Calendar field constantpublic boolean isYearly()
public boolean isMonthly()
public boolean isDaily()
public boolean isSinceNumDays()
public java.util.Calendar getYear()
protected AttributePredicate<java.util.Calendar> createPredicate(QName name,
                                                                 java.lang.String comparator,
                                                                 java.util.Calendar value)
createPredicate in class Refinement<java.util.Calendar>protected void buildName(java.util.Calendar calendar)
buildName in class Refinement<java.util.Calendar>calendar - the Calendar value to use to build the namepublic ComplexPredicate.ConjunctionOp getConjunctionOp()
getConjunctionOp in class Refinement<java.util.Calendar>
protected void addAttributePredicate(java.util.List<Predicate> children,
                                     AttributePredicate<java.util.Calendar> newPredicate)
                              throws ContradictionException
addAttributePredicate in class Refinement<java.util.Calendar>children - a List of child Predicates coming from a ComplexPredicate dedicated to a DateRefiner.newPredicate - the new Predicate to be added to the list of child Predicates.ContradictionExceptionpublic final boolean hasMatch(java.util.Calendar value)
hasMatch in class Refinement<java.util.Calendar>value - the Calendar value to be matched.
public static final boolean hasMatch(java.util.Calendar value,
                                     java.lang.String comparator,
                                     java.util.Calendar clauseValue)
value - the value to comparecomparator - the comparator to useclauseValue - the value to compare againstpublic static final java.util.Calendar getNumDaysAsCalendar(int num)
num - number of dayspublic static final java.util.Calendar getCalendarSinceNumDays(java.util.Calendar cal)
cal - representing the operand of SinceNumDays comparatorpublic static final int getNumDays(java.util.Date date)
date - Date object of operand of SinceNumDays comparatorint - value of NumDays
  | 
Oracle Fusion Middleware Java API Reference for Oracle WebCenter 11g Release 1 (11.1.1.3.0) E15995-02  | 
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||