I am not sure why with Oracle NoSQL there is a List of String major and minor components like this code:
List<String> majorComponents = new ArrayList<String>();
List<String> minorLength = new ArrayList<String>();
List<String> minorYear = new ArrayList<String>();
majorComponents.add(“Katana”);
minorLength .add(“length”);
minorYear.add(“year”);
Key key1 = Key.createKey(majorComponents, minorLength);
Key key2 = Key.createKey(majorComponents, minorYear);
String valString = "sword";
store.putIfAbsent(key1, Value.createValue(valString.getBytes()));
store.putIfAbsent(key2, Value.createValue(valString.getBytes()));
And I am also not sure what is the difference of components to path?
Can someone explain how this major and minor paths are in a List and how does it really work.
Can I assume that for key1, when I get the full path here’s what I get:
Katana:length
For key2
Katana:year
If I put:
majorComponents.add(“Saber”);
and then do:
Key key1 = Key.createKey(majorComponents, minorLength);
What will happen? What will be the full path? I’m quite confused as to how this really works…
You can see the canonical path by doing a toString() on the Key after you create it. It will show you each of the components of the major and minor portions. Take a look at the oracle.kv.Key javadoc for details.
Charles Lamb