Exemplo n.º 1
0
  public Object copyTo(Object target, CopyBuilder copyBuilder) {
    ThoroughfareNumberRange copy =
        (target == null) ? new ThoroughfareNumberRange() : (ThoroughfareNumberRange) target;

    if (isSetAddressLine()) {
      for (AddressLine part : addressLine) {
        AddressLine copyPart = (AddressLine) copyBuilder.copy(part);
        copy.addAddressLine(copyPart);

        if (part != null && copyPart == part) part.setParent(this);
      }
    }

    if (isSetThoroughfareNumberFrom()) {
      copy.setThoroughfareNumberFrom(
          (ThoroughfareNumberFrom) copyBuilder.copy(thoroughfareNumberFrom));
      if (copy.getThoroughfareNumberFrom() == thoroughfareNumberFrom)
        thoroughfareNumberFrom.setParent(this);
    }

    if (isSetThoroughfareNumberTo()) {
      copy.setThoroughfareNumberTo((ThoroughfareNumberTo) copyBuilder.copy(thoroughfareNumberTo));
      if (copy.getThoroughfareNumberTo() == thoroughfareNumberTo)
        thoroughfareNumberTo.setParent(this);
    }

    if (isSetRangeType()) copy.setRangeType(copyBuilder.copy(rangeType));

    if (isSetIndicator()) copy.setIndicator(copyBuilder.copy(indicator));

    if (isSetSeparator()) copy.setSeparator(copyBuilder.copy(separator));

    if (isSetIndicatorOccurrence())
      copy.setIndicatorOccurrence(copyBuilder.copy(indicatorOccurrence));

    if (isSetNumberRangeOccurrence())
      copy.setNumberRangeOccurrence(copyBuilder.copy(numberRangeOccurrence));

    if (isSetType()) copy.setType(copyBuilder.copy(type));

    if (isSetCode()) copy.setCode(copyBuilder.copy(code));

    copy.unsetParent();

    return copy;
  }
Exemplo n.º 2
0
  public void unsetThoroughfareNumberFrom() {
    if (isSetThoroughfareNumberFrom()) thoroughfareNumberFrom.unsetParent();

    thoroughfareNumberFrom = null;
  }
Exemplo n.º 3
0
  public void setThoroughfareNumberFrom(ThoroughfareNumberFrom thoroughfareNumberFrom) {
    if (thoroughfareNumberFrom != null) thoroughfareNumberFrom.setParent(this);

    this.thoroughfareNumberFrom = thoroughfareNumberFrom;
  }