@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof TransitionHistory)) { return false; } TransitionHistory transitionHistory = (TransitionHistory) obj; long primaryKey = transitionHistory.getPrimaryKey(); if (getPrimaryKey() == primaryKey) { return true; } else { return false; } }
@Override public int compareTo(TransitionHistory transitionHistory) { long primaryKey = transitionHistory.getPrimaryKey(); if (getPrimaryKey() < primaryKey) { return -1; } else if (getPrimaryKey() > primaryKey) { return 1; } else { return 0; } }
/** * 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 TransitionHistory toModel(TransitionHistorySoap soapModel) { if (soapModel == null) { return null; } TransitionHistory model = new TransitionHistoryImpl(); model.setTransitionHistoryId(soapModel.getTransitionHistoryId()); model.setUserId(soapModel.getUserId()); model.setGroupId(soapModel.getGroupId()); model.setCompanyId(soapModel.getCompanyId()); model.setCreateDate(soapModel.getCreateDate()); model.setDossierId(soapModel.getDossierId()); model.setProcessOrderId(soapModel.getProcessOrderId()); model.setDaysDoing(soapModel.getDaysDoing()); model.setDaysDelay(soapModel.getDaysDelay()); model.setStartDate(soapModel.getStartDate()); model.setStepTransitionId(soapModel.getStepTransitionId()); model.setPreDossierStepId(soapModel.getPreDossierStepId()); model.setPostDossierStepId(soapModel.getPostDossierStepId()); model.setTransitionName(soapModel.getTransitionName()); model.setNote(soapModel.getNote()); return model; }