/** * Converts the soap model instance into a normal model instance. * * @param soapModel the soap model instance to convert * @return the normal model instance */ public static ServicePackageEntry toModel(ServicePackageEntrySoap soapModel) { ServicePackageEntry model = new ServicePackageEntryImpl(); model.setServicePackageId(soapModel.getServicePackageId()); model.setServicePackageName(soapModel.getServicePackageName()); model.setServicePackageCode(soapModel.getServicePackageCode()); model.setDescription(soapModel.getDescription()); model.setTotalFile(soapModel.getTotalFile()); model.setCreateDate(soapModel.getCreateDate()); model.setModifiedDate(soapModel.getModifiedDate()); model.setServiceId(soapModel.getServiceId()); model.setStatus(soapModel.getStatus()); return model; }
public int compareTo(ServicePackageEntry servicePackageEntry) { int value = 0; value = getServicePackageName().compareTo(servicePackageEntry.getServicePackageName()); if (value != 0) { return value; } return 0; }
@Override public boolean equals(Object obj) { if (obj == null) { return false; } ServicePackageEntry servicePackageEntry = null; try { servicePackageEntry = (ServicePackageEntry) obj; } catch (ClassCastException cce) { return false; } long primaryKey = servicePackageEntry.getPrimaryKey(); if (getPrimaryKey() == primaryKey) { return true; } else { return false; } }