pathology = new Pathology();
pathology.setName(pathologyWs.getName());
pathology.setDescription(pathologyWs.getDescription());
pathology.setInitials(pathologyWs.getInitials());
FacadeDB.getInstance().getPathologyBroker().insert(pathology);
PathologyRemote pathologyRemote = new PathologyRemote(pathology);
pathologyRemote.setRemoteId(pathologyWs.getId());
FacadeDB.getInstance().getPathologySyncBroker().savePathologyRemote(pathologyRemote);
} else {
if (FacadeDB.getInstance().getPathologySyncBroker().getPathologyRemoteByPathology(pathology) == null) {
PathologyRemote pathologyRemote = new PathologyRemote(pathology);
pathologyRemote.setRemoteId(pathologyWs.getId());
FacadeDB.getInstance().getPathologySyncBroker().savePathologyRemote(pathologyRemote);
}
}
FacadeDB.getInstance().commitTransaction();
}