//IMPLEMENTATION OF THE StorageManager INTERFACE //
//-----------------------------------------------//
public Object export(ConnectionHolder context, Object obj) throws PersistenceException {
PBinding pb = (PBinding) obj;
try {
boolean flushed = false;
if (pb.getStatus() == PBinding.LIFECYCLE_DELTOWRITE) {
pb.write(context, (PAccessor)
context.getWorkingSet().lookup(pb.getPName()));
flushed = true;
}
Object oid = pb.export(context);
if (!flushed) {
State s = context.getWorkingSet().lookup(oid);
if (s != null) {
PBinding oldObj = (PBinding) s.getCacheEntry().getCeObject();
if (oldObj != obj) {
oldObj.write(context, (PAccessor) s);
}
}
}
return oid;
} catch (PException e) {