}
}
public void storeObjectField(int fieldNumber, Object value)
{
StatementMappingIndex mapIdx = stmtMappings.getMappingForMemberPosition(fieldNumber);
if (checkNonNullable && value == null &&
mapIdx.getMapping().getMemberMetaData().getNullValue() == NullValue.EXCEPTION)
{
throw new NucleusUserException(LOCALISER.msg("052400",
mapIdx.getMapping().getMemberMetaData().getFullFieldName()));
}
try
{
JavaTypeMapping mapping = mapIdx.getMapping();
boolean provideOwner = false;
if (mapping instanceof EmbeddedPCMapping ||
mapping instanceof SerialisedPCMapping ||
mapping instanceof SerialisedReferenceMapping ||
mapping instanceof PersistableMapping ||
mapping instanceof InterfaceMapping)
{
// Pass in the owner StateManager/field for any mappings that have relations
provideOwner = true;
}
if (mapIdx.getNumberOfParameterOccurrences() > 0)
{
for (int i=0;i<mapIdx.getNumberOfParameterOccurrences();i++)
{
// Set this value for all occurrences of this parameter
if (provideOwner)
{
mapping.setObject(ec, statement, mapIdx.getParameterPositionsForOccurrence(i), value, sm, fieldNumber);
}
else
{
mapping.setObject(ec, statement, mapIdx.getParameterPositionsForOccurrence(i), value);
}
}
}
else
{