@ Override public List findByRange ( byte [ ] minVal , byte [ ] maxVal , EntityMetadata m , boolean isWrapReq , List < String > relations , List < String > columns , List < IndexExpression > conditions , int maxResults ) throws Exception { Selector selector = clientFactory . getSelector ( pool ) ; SlicePredicate slicePredicate = Selector . newColumnsPredicateAll ( false , Integer . MAX_VALUE ) ; if ( columns != null && ! columns . isEmpty ( ) ) { slicePredicate = Selector . newColumnsPredicate ( columns . toArray ( new String [ ] { } ) ) ; } KeyRange keyRange = selector . newKeyRange ( minVal != null ? Bytes . fromByteArray ( minVal ) : Bytes . fromUTF8 ( "" ) , maxVal != null ? Bytes . fromByteArray ( maxVal ) : Bytes . fromUTF8 ( "" ) , maxResults ) ; if ( conditions != null ) { keyRange . setRow_filter ( conditions ) ; keyRange . setRow_filterIsSet ( true ) ; } List < KeySlice > keys = selector . getKeySlices ( new ColumnParent ( m . getTableName ( ) ) , keyRange , slicePredicate , getConsistencyLevel ( ) ) ; List results = null ; if ( keys != null ) { results = populateEntitiesFromKeySlices ( m , isWrapReq , relations , keys , dataHandler ) ; } if ( log . isInfoEnabled ( ) ) { log . info ( "Returning entities for find by range for" , results != null ? results . size ( ) : null ) ; } return results ; }
Find by range .