/**
* returns {@link RootOid#getIdentifier()} (oid must be {@link RootOid}, and must be persistent).
*/
public String getIdentifierForPersistentRoot(final Oid oid) {
if (!(oid instanceof RootOid)) {
throw new NoSqlStoreException("Oid is not a RootOid: " + oid);
}
RootOid rootOid = (RootOid) oid;
if (rootOid.isTransient()) {
throw new NoSqlStoreException("Oid is not for a persistent object: " + oid);
}
return rootOid.getIdentifier();
}