@Override @SuppressWarnings({"unchecked", "rawtypes"}) protected void internalCopyTo(DataMapper target) { AbstractMapDbBackend to = (AbstractMapDbBackend) target; for (Map.Entry<String, Object> entry : database.getAll().entrySet()) { Object collection = entry.getValue(); if (collection instanceof Map) { Map fromMap = (Map) collection; Map toMap = to.database.hashMap(entry.getKey()).open(); toMap.putAll(fromMap); } else { throw new UnsupportedOperationException(String.format("Cannot copy MapDB backend: store type %s is not supported", collection.getClass().getSimpleName())); } } }
if (s.startsWith(COMPOSITE_KEY_HEADER)) { Map<Long, Persistable> m = db.hashMap(s).keySerializer(Serializer.LONG) .valueSerializer(new PersistableSerializer<>()).open(); String[] arr = s.split(COMPOSITE_KEY_SEPARATOR); arr[0] = arr[0].substring(COMPOSITE_KEY_HEADER.length()); //Remove header...