@Override public Key convertKey(Key key) throws JasDBStorageException { if(key instanceof StringKey) { return key; } else if(key instanceof LongKey) { return new StringKey(key.getValue().toString()); } else { //unsupported conversion return key; } }
@Override public Key convertKey(Key key) throws JasDBStorageException { if(key instanceof UUIDKey) { return key; } else if(key instanceof StringKey) { return new UUIDKey(UUID.fromString((String) key.getValue())); } else { //unsupported conversion return key; } }