*/
public class CopyHelperImpl implements CopyHelper
{
public DataObject copyShallow(DataObject dataObject)
{
Copier copier = new Copier()
{
protected void copyContainment(EReference eReference, EObject eObject, EObject copyEObject)
{
}
protected void copyAttribute(EAttribute eAttribute, EObject eObject, EObject copyEObject) {
if(("ChangeSummaryType".equals(eAttribute.getEType().getName()) && "commonj.sdo".equals(eAttribute.getEType().getEPackage().getNsURI()))) {
boolean isLogging = ((ChangeSummary)eObject.eGet(eAttribute)).isLogging();
ChangeSummary destSum = (ChangeSummary)copyEObject.eGet(eAttribute);
if(isLogging) {
if(!destSum.isLogging()) destSum.beginLogging();
} else {
if(destSum.isLogging()) destSum.endLogging();
}
} else {
super.copyAttribute(eAttribute, eObject, copyEObject);
}
}
};
EObject result = copier.copy((EObject)dataObject);
copier.copyReferences();
return (DataObject)result;
}