/** * INTERNAL: * Clone the aggregate to source field names. AggregateCollectionMapping * needs each nested embedded mapping to have its own list of aggregate * to source field names so that it can apply nested override names to * shared aggregate object mappings. */ public Object clone() { AggregateObjectMapping mappingObject = (AggregateObjectMapping) super.clone(); Map<String, String> aggregateToSourceFieldNames = new HashMap<String, String>(); aggregateToSourceFieldNames.putAll(getAggregateToSourceFieldNames()); mappingObject.setAggregateToSourceFieldNames(aggregateToSourceFieldNames); return mappingObject; }
/** * INTERNAL: * Clone the aggregate to source field names. AggregateCollectionMapping * needs each nested embedded mapping to have its own list of aggregate * to source field names so that it can apply nested override names to * shared aggregate object mappings. */ @Override public Object clone() { AggregateObjectMapping mappingObject = (AggregateObjectMapping) super.clone(); Map<String, DatabaseField> aggregateToSourceFields = new HashMap<String, DatabaseField>(); aggregateToSourceFields.putAll(getAggregateToSourceFields()); mappingObject.setAggregateToSourceFields(aggregateToSourceFields); return mappingObject; }
/** * INTERNAL: * Clone the aggregate to source field names. AggregateCollectionMapping * needs each nested embedded mapping to have its own list of aggregate * to source field names so that it can apply nested override names to * shared aggregate object mappings. */ @Override public Object clone() { AggregateObjectMapping mappingObject = (AggregateObjectMapping) super.clone(); Map<String, DatabaseField> aggregateToSourceFields = new HashMap<String, DatabaseField>(); aggregateToSourceFields.putAll(getAggregateToSourceFields()); mappingObject.setAggregateToSourceFields(aggregateToSourceFields); Map<String, Object[]> nestedTranslations = new HashMap<String, Object[]>(); nestedTranslations.putAll(getNestedFieldTranslations()); mappingObject.setNestedFieldTranslations(nestedTranslations); return mappingObject; }