|
|||||||||
| 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.lang.Integer>
com.bigllc.retsiq.simpleclient.util.IntegerFieldSearchStrategy
public class IntegerFieldSearchStrategy
Search strategy for full download using an integer based field such as list price. 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 | |
|---|---|
IntegerFieldSearchStrategy(int recordCountLimit,
java.lang.String fieldName,
int startValue,
int endValue)
Create a strategy that is based around an integer field. |
|
| Method Summary | |
|---|---|
protected java.lang.Integer |
getMidPoint(java.lang.Integer start,
java.lang.Integer end)
Get the mid point of the two supplied value, rounding down however that applies to the type. |
protected java.lang.String |
getSearchValue(java.lang.Integer value)
Return the value as a string that is valid for a DMQL2 query for that data type. |
protected java.lang.Integer |
incrementValue(java.lang.Integer value)
Increment the value by one unit whatever that means for the type. |
protected boolean |
valuesEqual(java.lang.Integer start,
java.lang.Integer end)
Compare the two values for equality. |
| 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 IntegerFieldSearchStrategy(int recordCountLimit,
java.lang.String fieldName,
int startValue,
int endValue)
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 would be 0endValue - 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.lang.Integer getMidPoint(java.lang.Integer start,
java.lang.Integer end)
DivideAndConquerStrategy
getMidPoint in class DivideAndConquerStrategy<java.lang.Integer>start - the lower bounded valueend - the upper bounded value
protected java.lang.String getSearchValue(java.lang.Integer value)
DivideAndConquerStrategy
getSearchValue in class DivideAndConquerStrategy<java.lang.Integer>value - the value
protected java.lang.Integer incrementValue(java.lang.Integer value)
DivideAndConquerStrategy
incrementValue in class DivideAndConquerStrategy<java.lang.Integer>value - the value to increment
protected boolean valuesEqual(java.lang.Integer start,
java.lang.Integer end)
DivideAndConquerStrategy
valuesEqual in class DivideAndConquerStrategy<java.lang.Integer>start - the value to compare againstend - the value to compare to
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||