Package oracle.kv

Examples of oracle.kv.KeyRange


                {
                    List<String> majorComponents = new ArrayList<String>();
                    majorComponents.add(secIndexName);
                    majorComponents.add(columnName);

                    KeyRange range = null;
                    Iterator<KeyValueVersion> iterator = null;

                    if (condition.equals("="))
                    {
                        majorComponents.add(PropertyAccessorHelper.getString(value));
                        Key majorKeyToFind = Key.createKey(majorComponents);
                        iterator = kvStore.multiGetIterator(Direction.FORWARD, 0, majorKeyToFind, range, null);
                    }
                    else if (condition.equals(">"))
                    {
                        range = new KeyRange(value.toString(), false, null, true);
                        Key majorKeyToFind = Key.createKey(majorComponents);
                        iterator = kvStore.storeIterator(Direction.UNORDERED, 0, majorKeyToFind, range, null);
                    }
                    else if (condition.equals("<"))
                    {
                        range = new KeyRange(null, true, value.toString(), false);
                        Key majorKeyToFind = Key.createKey(majorComponents);
                        iterator = kvStore.storeIterator(Direction.UNORDERED, 0, majorKeyToFind, range, null);
                    }
                    else if (condition.equals(">="))
                    {
                        range = new KeyRange(value.toString(), true, null, true);
                        Key majorKeyToFind = Key.createKey(majorComponents);
                        iterator = kvStore.storeIterator(Direction.UNORDERED, 0, majorKeyToFind, range, null);
                    }
                    else if (condition.equals("<="))
                    {
                        range = new KeyRange(null, true, value.toString(), true);
                        Key majorKeyToFind = Key.createKey(majorComponents);
                        iterator = kvStore.storeIterator(Direction.UNORDERED, 0, majorKeyToFind, range, null);
                    }

                    while (iterator.hasNext())
View Full Code Here

TOP

Related Classes of oracle.kv.KeyRange

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.