}
}
catch (NotYetFlushedException e)
{
setObjectAsNull(om, ps, param);
throw new NotYetFlushedException(value);
}
}
if (sm != null)
{
sm.setStoringPC();
}
// If the field doesnt map to any datastore fields, omit the set process
if (getNumberOfDatastoreFields() > 0)
{
if (id instanceof OID)
{
super.setObject(om, ps, param, id);
}
else
{
// TODO Factor out this PersistenceCapable reference
((PersistenceCapable)value).jdoCopyKeyFieldsFromObjectId(new AppIDObjectIdFieldConsumer(param, om, ps,
javaTypeMappings), id);
}
}
}
else
{
if (sm != null)
{
sm.setStoringPC();
}
if (getNumberOfDatastoreFields() > 0)
{
// Object is in the process of being inserted so we cant use its id currently and we need to store
// a foreign key to it (which we cant yet do). Just put "null" in and throw "NotYetFlushedException",
// to be caught by ParameterSetter and will signal to the PC object being inserted that it needs
// to inform this object when it is inserted.
setObjectAsNull(om, ps, param);
throw new NotYetFlushedException(value);
}
}
}
finally
{