*/
public static int populateEmbeddedElementFieldsInStatement(ObjectProvider sm, Object element, Object ps,
int jdbcPosition, AbstractMemberMetaData ownerFieldMetaData, JavaTypeMapping elementMapping,
AbstractClassMetaData emd, BaseContainerStore bcs)
{
EmbeddedElementPCMapping embeddedMapping = (EmbeddedElementPCMapping) elementMapping;
StatementClassMapping mappingDefinition = new StatementClassMapping();
int[] elementFieldNumbers = new int[embeddedMapping.getNumberOfJavaTypeMappings()];
for (int i = 0; i < embeddedMapping.getNumberOfJavaTypeMappings(); i++)
{
JavaTypeMapping fieldMapping = embeddedMapping.getJavaTypeMapping(i);
int absFieldNum = emd.getAbsolutePositionOfMember(fieldMapping.getMemberMetaData().getName());
elementFieldNumbers[i] = absFieldNum;
StatementMappingIndex stmtMapping = new StatementMappingIndex(fieldMapping);
int[] jdbcParamPositions = new int[fieldMapping.getNumberOfDatastoreMappings()];
for (int j = 0; j < fieldMapping.getNumberOfDatastoreMappings(); j++)