@Test public void save_shouldSaveObject() { ParentObjectHashcode expected = ParentObjectHashcodeMother.createInstance(OBJECT_ID); ParentObjectHashcode actual = parentObjectHashcodeService.save(parentObjectHashcode); Assert.assertEquals(expected, actual); }
@Override public ParentObjectHashcode save(ParentObjectHashcode newParentObjectHashcode) { ParentObjectHashcode parentObjectHashcode = getByObjectUuid(newParentObjectHashcode.getObjectUuid()); if (parentObjectHashcode != null) { parentObjectHashcode.setHashcode(newParentObjectHashcode.getHashcode()); } else { parentObjectHashcode = newParentObjectHashcode; } return parentObjectHashcodeDao.save(parentObjectHashcode); }
ParentObjectHashcodeServiceImpl extends BaseOpenmrsService implements ParentObjectHashcodeService { @Override public ParentObjectHashcode save(ParentObjectHashcode newParentObjectHashcode) { ParentObjectHashcode parentObjectHashcode = getByObjectUuid(newParentObjectHashcode.getObjectUuid()); if (parentObjectHashcode != null) { parentObjectHashcode.setHashcode(newParentObjectHashcode.getHashcode()); } else { parentObjectHashcode = newParentObjectHashcode; } return parentObjectHashcodeDao.save(parentObjectHashcode); } }
ParentObjectHashcodeServiceImpl extends BaseOpenmrsService implements ParentObjectHashcodeService { @Override public ParentObjectHashcode save(ParentObjectHashcode newParentObjectHashcode) { ParentObjectHashcode parentObjectHashcode = getByObjectUuid(newParentObjectHashcode.getObjectUuid()); if (parentObjectHashcode != null) { parentObjectHashcode.setHashcode(newParentObjectHashcode.getHashcode()); } else { parentObjectHashcode = newParentObjectHashcode; } return parentObjectHashcodeDao.save(parentObjectHashcode); }  }
ParentObjectHashcodeServiceImpl extends BaseOpenmrsService implements ParentObjectHashcodeService { @Override public ParentObjectHashcode save(ParentObjectHashcode newParentObjectHashcode) { ParentObjectHashcode parentObjectHashcode = getByObjectUuid(newParentObjectHashcode.getObjectUuid()); if (parentObjectHashcode != null) { parentObjectHashcode.setHashcode(newParentObjectHashcode.getHashcode()); } else { parentObjectHashcode = newParentObjectHashcode; } return parentObjectHashcodeDao.save(parentObjectHashcode); }  @Override ParentObjectHashcode getById(Integer id); @Override ParentObjectHashcode getByUuid(String uuid); @Override ParentObjectHashcode getByObjectUuid(String objectUuid); @Override ParentObjectHashcode save(ParentObjectHashcode newParentObjectHashcode); @Override ParentObjectHashcode save(String uuid, String hashCode); @Override void delete(ParentObjectHashcode parentObjectHashcode, String reason); }
ParentObjectHashcodeServiceImpl extends BaseOpenmrsService implements ParentObjectHashcodeService { @Override public ParentObjectHashcode save(ParentObjectHashcode newParentObjectHashcode) { ParentObjectHashcode parentObjectHashcode = getByObjectUuid(newParentObjectHashcode.getObjectUuid()); if (parentObjectHashcode != null) { parentObjectHashcode.setHashcode(newParentObjectHashcode.getHashcode()); } else { parentObjectHashcode = newParentObjectHashcode; } return parentObjectHashcodeDao.save(parentObjectHashcode); }  @Override ParentObjectHashcode getById(Integer id); @Override ParentObjectHashcode getByUuid(String uuid); @Override ParentObjectHashcode getByObjectUuid(String objectUuid); @Override ParentObjectHashcode save(ParentObjectHashcode newParentObjectHashcode); @Override ParentObjectHashcode save(String uuid, String hashCode); @Override void delete(ParentObjectHashcode parentObjectHashcode, String reason);  }