if ( leftIdx < 0 )
leftIdx = -(leftIdx + 1);
if ( rightIdx < 0 )
rightIdx = -(rightIdx + 1);
for ( int i = 0; i < ptrs.length; i++ ) {
Value testValue = getIndexValue(values[i]);
if ( i >= leftIdx && i <= rightIdx && query.testValue(testValue) ) {
Value extraValue = getExtraValue(values[i]);
callback.indexInfo(testValue, extraValue);
}
}
break;
case IndexQuery.NEQ:
if ( !compoundVals ) {
for ( int i = 0; i < ptrs.length; i++ )
if ( i != leftIdx )
callback.indexInfo(values[i], null);
break;
}
// The fall through is intentional
case IndexQuery.NBWX:
case IndexQuery.NBW:
case IndexQuery.NSW:
if ( leftIdx < 0 )
leftIdx = -(leftIdx + 1);
if ( rightIdx < 0 )
rightIdx = -(rightIdx + 1);
for ( int i = 0; i < ptrs.length; i++ ) {
Value testValue = getIndexValue(values[i]);
if ( (i <= leftIdx || i >= rightIdx) && query.testValue(testValue) ) {
Value extraValue = getExtraValue(values[i]);
callback.indexInfo(testValue, extraValue);
}
}
break;
case IndexQuery.LT:
case IndexQuery.LTE:
if ( leftIdx < 0 )
leftIdx = -(leftIdx + 1);
for ( int i = 0; i < ptrs.length; i++ ) {
Value testValue = getIndexValue(values[i]);
if ( i <= leftIdx && query.testValue(testValue) ) {
Value extraValue = getExtraValue(values[i]);
callback.indexInfo(testValue, extraValue);
}
}
break;
case IndexQuery.GT:
case IndexQuery.GTE:
if ( rightIdx < 0 )
rightIdx = -(rightIdx + 1);
for ( int i = 0; i < ptrs.length; i++ ) {
Value testValue = getIndexValue(values[i]);
if ( i >= rightIdx && query.testValue(testValue) ) {
Value extraValue = getExtraValue(values[i]);
callback.indexInfo(testValue, extraValue);
}
}
break;
case IndexQuery.NIN:
default:
for ( int i = 0; i < ptrs.length; i++ ) {
Value testValue = getIndexValue(values[i]);
if ( query.testValue(testValue) ) {
Value extraValue = getExtraValue(values[i]);
callback.indexInfo(testValue, extraValue);
}
}
break;
}
break;
default:
throw new BTreeCorruptException("Invalid Page Type In query");
}
}
else {
// No Query - Just Walk The Tree
switch ( ph.getStatus() ) {
case BRANCH:
for ( int i = 0; i < ptrs.length; i++ )
getChildNode(tx, i).query(tx, query, callback);
break;
case LEAF:
for ( int i = 0; i < values.length; i++ ) {
Value testValue = getIndexValue(values[i]);
Value extraValue = getExtraValue(values[i]);
callback.indexInfo(testValue, extraValue);
}
break;
default: