return branchOffice1.compareTo(branchOffice2);
}
+ /**
+ * Copies all fields from source to target branch office instance
+ * <p>
+ * @param sourceBranchOffice Source BranchOffice instance
+ * @param targetBranchOffice Target BranchOffice instance
+ */
+ public static void copyBranchOfficeData (final BranchOffice sourceBranchOffice, final BranchOffice targetBranchOffice) {
+ // Check that both parameters are not null
+ if (null == sourceBranchOffice) {
+ // Throw NPE
+ throw new NullPointerException("sourceBranchOffice is null"); //NOI18N
+ } else if (null == targetBranchOffice) {
+ // Throw NPE
+ throw new NullPointerException("targetBranchOffice is null"); //NOI18N
+ }
+
+ // Copy all fields
+ targetBranchOffice.setBranchCity(sourceBranchOffice.getBranchCity());
+ targetBranchOffice.setBranchCompany(sourceBranchOffice.getBranchCompany());
+ targetBranchOffice.setBranchContactEmployee(sourceBranchOffice.getBranchContactEmployee());
+ targetBranchOffice.setBranchCountry(sourceBranchOffice.getBranchCountry());
+ targetBranchOffice.setBranchEmailAddress(sourceBranchOffice.getBranchEmailAddress());
+ targetBranchOffice.setBranchEntryCreated(sourceBranchOffice.getBranchEntryCreated());
+ targetBranchOffice.setBranchEntryUpdated(sourceBranchOffice.getBranchEntryUpdated());
+ targetBranchOffice.setBranchFaxNumber(sourceBranchOffice.getBranchFaxNumber());
+ targetBranchOffice.setBranchHouseNumber(sourceBranchOffice.getBranchHouseNumber());
+ targetBranchOffice.setBranchHouseNumberExtension(sourceBranchOffice.getBranchHouseNumberExtension());
+ targetBranchOffice.setBranchId(sourceBranchOffice.getBranchId());
+ targetBranchOffice.setBranchLandLineNumber(sourceBranchOffice.getBranchLandLineNumber());
+ targetBranchOffice.setBranchLastHouseNumber(sourceBranchOffice.getBranchLastHouseNumber());
+ targetBranchOffice.setBranchNumber(sourceBranchOffice.getBranchNumber());
+ targetBranchOffice.setBranchOpeningTimes(sourceBranchOffice.getBranchOpeningTimes());
+ targetBranchOffice.setBranchOwnerEmployee(sourceBranchOffice.getBranchOwnerEmployee());
+ targetBranchOffice.setBranchStore(sourceBranchOffice.getBranchStore());
+ targetBranchOffice.setBranchStreet(sourceBranchOffice.getBranchStreet());
+ targetBranchOffice.setBranchSuiteNumber(sourceBranchOffice.getBranchSuiteNumber());
+ targetBranchOffice.setBranchUserOwner(sourceBranchOffice.getBranchUserOwner());
+ targetBranchOffice.setBranchZipCode(sourceBranchOffice.getBranchZipCode());
+ }
+
/**
* Checks if both branch offices have same address. This method will throw
* an {@code NullPointerException} if one of the instances is null.