|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.bigllc.retsiq.simpleclient.util.DivideAndConquerStrategy<java.util.Date>
com.bigllc.retsiq.simpleclient.util.DateTimeFieldSearchStrategy
public class DateTimeFieldSearchStrategy
Search strategy for full download using an date and time sensitive field such as modified date. The granularity is down to the second. This checks a record count for a range of the field supplied. If the count falls within the record limit then the query is added to the stack. If it exceed the limit then the range is halved. When search queries have been created to allow a full listing download the queries are all executed sequentially.
| Constructor Summary | |
|---|---|
DateTimeFieldSearchStrategy(int recordCountLimit,
java.lang.String fieldName,
java.util.Date startValue,
java.util.Date endValue,
java.util.TimeZone zone)
Create a strategy that is based around an date and time sensitive field. |
|
| Method Summary | |
|---|---|
protected java.util.Date |
getMidPoint(java.util.Date startDate,
java.util.Date endDate)
Get the mid point of the two supplied value, rounding down however that applies to the type. |
protected java.lang.String |
getSearchValue(java.util.Date value)
Return the value as a string that is valid for a DMQL2 query for that data type. |
protected java.util.Date |
incrementValue(java.util.Date value)
Increment by a second. |
protected boolean |
valuesEqual(java.util.Date startDate,
java.util.Date endDate)
Equal to the second |
| Methods inherited from class com.bigllc.retsiq.simpleclient.util.DivideAndConquerStrategy |
|---|
getQueryBatches, search |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DateTimeFieldSearchStrategy(int recordCountLimit,
java.lang.String fieldName,
java.util.Date startValue,
java.util.Date endValue,
java.util.TimeZone zone)
recordCountLimit - the limit for each search, this should be less
than any limit imposed by the serverfieldName - the name of the field to be used for dividing and
conquering searches. For example the list pricestartValue - The inclusive start value of the range to query,
typically this could be the epoch dateendValue - The inclusive end value of the range to query. A further
query is executed for anything above this value to catch outliers.| Method Detail |
|---|
protected java.util.Date getMidPoint(java.util.Date startDate,
java.util.Date endDate)
DivideAndConquerStrategy
getMidPoint in class DivideAndConquerStrategy<java.util.Date>startDate - the lower bounded valueendDate - the upper bounded value
protected java.lang.String getSearchValue(java.util.Date value)
DivideAndConquerStrategy
getSearchValue in class DivideAndConquerStrategy<java.util.Date>value - the value
protected java.util.Date incrementValue(java.util.Date value)
incrementValue in class DivideAndConquerStrategy<java.util.Date>value - the value to increment
protected boolean valuesEqual(java.util.Date startDate,
java.util.Date endDate)
valuesEqual in class DivideAndConquerStrategy<java.util.Date>startDate - the value to compare againstendDate - the value to compare to
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||