@Override
public void copyAll (final DialableFaxNumber sourceNumber) {
+ // Validate instance
+ if (null == sourceNumber) {
+ // Throw NPE
+ throw new NullPointerException("sourceNumber is null"); //NOI18N
+ }
+
// Copy all
this.setPhoneAreaCode(sourceNumber.getPhoneAreaCode());
- this.setPhoneCountry(sourceNumber.getPhoneCountry());
+ this.getPhoneCountry().copyAll(sourceNumber.getPhoneCountry());
this.setPhoneEntryCreated(sourceNumber.getPhoneEntryCreated());
this.setPhoneId(sourceNumber.getPhoneId());
this.setPhoneNumber(sourceNumber.getPhoneNumber());
@Override
public void copyAll (final DialableLandLineNumber sourceNumber) {
+ // Validate instance
+ if (null == sourceNumber) {
+ // Throw NPE
+ throw new NullPointerException("sourceNumber is null"); //NOI18N
+ }
+
// Copy all
this.setPhoneAreaCode(sourceNumber.getPhoneAreaCode());
- this.setPhoneCountry(sourceNumber.getPhoneCountry());
+ this.getPhoneCountry().copyAll(sourceNumber.getPhoneCountry());
this.setPhoneEntryCreated(sourceNumber.getPhoneEntryCreated());
this.setPhoneId(sourceNumber.getPhoneId());
this.setPhoneNumber(sourceNumber.getPhoneNumber());
@Override
public void copyAll (final DialableMobileNumber sourceNumber) {
+ // Validate instance
+ if (null == sourceNumber) {
+ // Throw NPE
+ throw new NullPointerException("sourceNumber is null"); //NOI18N
+ }
+
// Copy all
- this.setMobileProvider(sourceNumber.getMobileProvider());
+ this.getMobileProvider().copyAll(sourceNumber.getMobileProvider());
this.setPhoneEntryCreated(sourceNumber.getPhoneEntryCreated());
this.setPhoneId(sourceNumber.getPhoneId());
this.setPhoneNumber(sourceNumber.getPhoneNumber());
this.providerMailPattern = providerMailPattern;
}
+ @Override
+ public void copyAll (final MobileProvider sourceMobileProvider) {
+ // Parameter should not be null
+ if (null == sourceMobileProvider) {
+ // Throw NPE
+ throw new NullPointerException("sourceMobileProvider is null"); //NOI18N
+ }
+
+ // Copy all values
+ this.getProviderCountry().copyAll(sourceMobileProvider.getProviderCountry());
+ this.setProviderDialPrefix(sourceMobileProvider.getProviderDialPrefix());
+ this.setProviderEntryCreated(sourceMobileProvider.getProviderEntryCreated());
+ this.setProviderId(sourceMobileProvider.getProviderId());
+ this.setProviderMailPattern(sourceMobileProvider.getProviderMailPattern());
+ this.setProviderName(sourceMobileProvider.getProviderName());
+ }
+
@Override
public boolean equals (final Object object) {
if (null == object) {
*/
public interface MobileProvider extends Serializable {
+ /**
+ * Copies all values from source mobile provider to this
+ * <p>
+ * @param sourceMobileProvider Source mobile provider
+ */
+ void copyAll (final MobileProvider sourceMobileProvider);
+
/**
* Getter for id number
* <p>