Exemplo n.º 1
0
 public Object copyTo(ObjectLocator locator, Object target, CopyStrategy strategy) {
   final Object draftCopy = ((target == null) ? createNewInstance() : target);
   super.copyTo(locator, draftCopy, strategy);
   if (draftCopy instanceof TopoVolumeType) {
     final TopoVolumeType copy = ((TopoVolumeType) draftCopy);
     if (this.isSetDirectedTopoSolid()) {
       List<DirectedTopoSolidPropertyType> sourceDirectedTopoSolid;
       sourceDirectedTopoSolid = this.getDirectedTopoSolid();
       @SuppressWarnings("unchecked")
       List<DirectedTopoSolidPropertyType> copyDirectedTopoSolid =
           ((List<DirectedTopoSolidPropertyType>)
               strategy.copy(
                   LocatorUtils.property(locator, "directedTopoSolid", sourceDirectedTopoSolid),
                   sourceDirectedTopoSolid));
       copy.unsetDirectedTopoSolid();
       List<DirectedTopoSolidPropertyType> uniqueDirectedTopoSolidl = copy.getDirectedTopoSolid();
       uniqueDirectedTopoSolidl.addAll(copyDirectedTopoSolid);
     } else {
       copy.unsetDirectedTopoSolid();
     }
     if (this.isSetAggregationType()) {
       AggregationType sourceAggregationType;
       sourceAggregationType = this.getAggregationType();
       AggregationType copyAggregationType =
           ((AggregationType)
               strategy.copy(
                   LocatorUtils.property(locator, "aggregationType", sourceAggregationType),
                   sourceAggregationType));
       copy.setAggregationType(copyAggregationType);
     } else {
       copy.aggregationType = null;
     }
   }
   return draftCopy;
 }
Exemplo n.º 2
0
 public void mergeFrom(
     ObjectLocator leftLocator,
     ObjectLocator rightLocator,
     Object left,
     Object right,
     MergeStrategy strategy) {
   super.mergeFrom(leftLocator, rightLocator, left, right, strategy);
   if (right instanceof TopoVolumeType) {
     final TopoVolumeType target = this;
     final TopoVolumeType leftObject = ((TopoVolumeType) left);
     final TopoVolumeType rightObject = ((TopoVolumeType) right);
     {
       List<DirectedTopoSolidPropertyType> lhsDirectedTopoSolid;
       lhsDirectedTopoSolid = leftObject.getDirectedTopoSolid();
       List<DirectedTopoSolidPropertyType> rhsDirectedTopoSolid;
       rhsDirectedTopoSolid = rightObject.getDirectedTopoSolid();
       target.unsetDirectedTopoSolid();
       List<DirectedTopoSolidPropertyType> uniqueDirectedTopoSolidl =
           target.getDirectedTopoSolid();
       uniqueDirectedTopoSolidl.addAll(
           ((List<DirectedTopoSolidPropertyType>)
               strategy.merge(
                   LocatorUtils.property(leftLocator, "directedTopoSolid", lhsDirectedTopoSolid),
                   LocatorUtils.property(rightLocator, "directedTopoSolid", rhsDirectedTopoSolid),
                   lhsDirectedTopoSolid,
                   rhsDirectedTopoSolid)));
     }
     {
       AggregationType lhsAggregationType;
       lhsAggregationType = leftObject.getAggregationType();
       AggregationType rhsAggregationType;
       rhsAggregationType = rightObject.getAggregationType();
       target.setAggregationType(
           ((AggregationType)
               strategy.merge(
                   LocatorUtils.property(leftLocator, "aggregationType", lhsAggregationType),
                   LocatorUtils.property(rightLocator, "aggregationType", rhsAggregationType),
                   lhsAggregationType,
                   rhsAggregationType)));
     }
   }
 }