OpCallbacks call) {
// check for illegal nulls
if (objval == null) {
if (fmd.getNullValue() == FieldMetaData.NULL_EXCEPTION
|| fmd.getDeclaredTypeCode() == JavaTypes.OID)
throw new InvalidStateException(_loc.get("null-value",
fmd.getName(), _sm.getManagedInstance())).
setFatal(true);
return false;
}
// nothing else to do for non-persistent
if (fmd.getManagement() != FieldMetaData.MANAGE_PERSISTENT)
return false;
// don't allow managed objectid field value
if (fmd.getDeclaredTypeCode() == JavaTypes.OID) {
_sm.assertNotManagedObjectId(objval);
if (_sm.getObjectId() != null
&& !objval.equals(((ObjectId) _sm.getObjectId()).getId()))
throw new InvalidStateException(_loc.get("changed-oid",
_sm.getObjectId(), objval,
Exceptions.toString(_sm.getManagedInstance()))).
setFatal(true);
}