1 21 package com.db4o.inside.query; 22 23 import com.db4o.*; 24 import com.db4o.foundation.*; 25 26 29 public class IdTreeQueryResult extends AbstractQueryResult{ 30 31 private Tree _ids; 32 33 public IdTreeQueryResult(Transaction transaction, IntIterator4 ids) { 34 super(transaction); 35 _ids = TreeInt.addAll(null, ids); 36 } 37 38 public IntIterator4 iterateIDs() { 39 return new IntIterator4Adaptor(new TreeKeyIterator(_ids)); 40 } 41 42 public int size() { 43 if(_ids == null){ 44 return 0; 45 } 46 return _ids.size(); 47 } 48 49 public AbstractQueryResult supportSort(){ 50 return toIdList(); 51 } 52 53 public AbstractQueryResult supportElementAccess(){ 54 return toIdList(); 55 } 56 57 } 58 | Popular Tags |