@Test public void testGetAllModelFamiliesByCrisis() { try { List<ModelFamilyDTO> modelFamilyDTOs = modelFamilyResourceFacadeImp.getAllModelFamiliesByCrisis(crisisDTO.getCrisisID()); assertNotNull(modelFamilyDTOs); } catch (PropertyNotSetException e) { logger.error("PropertyNotSetException while executing testGetAllModelFamiliesByCrisis "+e.getMessage()); } }
@Override public List<ModelFamilyDTO> getAllModelFamiliesByCrisis(Long crisisID) throws PropertyNotSetException { List<ModelFamilyDTO> modelFamilyDTOList = new ArrayList<ModelFamilyDTO>(); Criteria criteria = getCurrentSession().createCriteria(ModelFamily.class); criteria.add(Restrictions.eq("collection.id", crisisID)); List<ModelFamily> modelFamilyList = criteria.list(); if (modelFamilyList != null && !modelFamilyList.isEmpty()) { for (ModelFamily modelFamily : modelFamilyList) { modelFamilyDTOList.add(new ModelFamilyDTO(modelFamily)); } } return modelFamilyDTOList; }
ModelFamilyResourceFacadeImp extends CoreDBServiceFacadeImp<ModelFamily, Long> implements ModelFamilyResourceFacade { @Override public List<ModelFamilyDTO> getAllModelFamiliesByCrisis(Long crisisID) throws PropertyNotSetException { List<ModelFamilyDTO> modelFamilyDTOList = new ArrayList<ModelFamilyDTO>(); Criteria criteria = getCurrentSession().createCriteria(ModelFamily.class); criteria.add(Restrictions.eq("collection.id", crisisID)); List<ModelFamily> modelFamilyList = criteria.list(); if (modelFamilyList != null && !modelFamilyList.isEmpty()) { for (ModelFamily modelFamily : modelFamilyList) { modelFamilyDTOList.add(new ModelFamilyDTO(modelFamily)); } } return modelFamilyDTOList; } }
ModelFamilyResourceFacadeImp extends CoreDBServiceFacadeImp<ModelFamily, Long> implements ModelFamilyResourceFacade { @Override public List<ModelFamilyDTO> getAllModelFamiliesByCrisis(Long crisisID) throws PropertyNotSetException { List<ModelFamilyDTO> modelFamilyDTOList = new ArrayList<ModelFamilyDTO>(); Criteria criteria = getCurrentSession().createCriteria(ModelFamily.class); criteria.add(Restrictions.eq("collection.id", crisisID)); List<ModelFamily> modelFamilyList = criteria.list(); if (modelFamilyList != null && !modelFamilyList.isEmpty()) { for (ModelFamily modelFamily : modelFamilyList) { modelFamilyDTOList.add(new ModelFamilyDTO(modelFamily)); } } return modelFamilyDTOList; } ModelFamilyResourceFacadeImp(); }
ModelFamilyResourceFacadeImp extends CoreDBServiceFacadeImp<ModelFamily, Long> implements ModelFamilyResourceFacade { @Override public List<ModelFamilyDTO> getAllModelFamiliesByCrisis(Long crisisID) throws PropertyNotSetException { List<ModelFamilyDTO> modelFamilyDTOList = new ArrayList<ModelFamilyDTO>(); Criteria criteria = getCurrentSession().createCriteria(ModelFamily.class); criteria.add(Restrictions.eq("collection.id", crisisID)); List<ModelFamily> modelFamilyList = criteria.list(); if (modelFamilyList != null && !modelFamilyList.isEmpty()) { for (ModelFamily modelFamily : modelFamilyList) { modelFamilyDTOList.add(new ModelFamilyDTO(modelFamily)); } } return modelFamilyDTOList; } ModelFamilyResourceFacadeImp(); @Override List<ModelFamilyDTO> getAllModelFamilies(); @Override List<ModelFamilyDTO> getAllModelFamiliesByCrisis(Long crisisID); @Override ModelFamilyDTO getModelFamilyByID(Long id); @Override boolean addCrisisAttribute(ModelFamilyDTO modelFamily); @Override boolean deleteModelFamily(Long modelFamilyID); @Override List<TaggersForCodes> getTaggersByCodes(final List<String> codes); @Override List<ModelWrapper> getModelFamilyAggregateDataForCollection(Long collectionId); }
ModelFamilyResourceFacadeImp extends CoreDBServiceFacadeImp<ModelFamily, Long> implements ModelFamilyResourceFacade { @Override public List<ModelFamilyDTO> getAllModelFamiliesByCrisis(Long crisisID) throws PropertyNotSetException { List<ModelFamilyDTO> modelFamilyDTOList = new ArrayList<ModelFamilyDTO>(); Criteria criteria = getCurrentSession().createCriteria(ModelFamily.class); criteria.add(Restrictions.eq("collection.id", crisisID)); List<ModelFamily> modelFamilyList = criteria.list(); if (modelFamilyList != null && !modelFamilyList.isEmpty()) { for (ModelFamily modelFamily : modelFamilyList) { modelFamilyDTOList.add(new ModelFamilyDTO(modelFamily)); } } return modelFamilyDTOList; } ModelFamilyResourceFacadeImp(); @Override List<ModelFamilyDTO> getAllModelFamilies(); @Override List<ModelFamilyDTO> getAllModelFamiliesByCrisis(Long crisisID); @Override ModelFamilyDTO getModelFamilyByID(Long id); @Override boolean addCrisisAttribute(ModelFamilyDTO modelFamily); @Override boolean deleteModelFamily(Long modelFamilyID); @Override List<TaggersForCodes> getTaggersByCodes(final List<String> codes); @Override List<ModelWrapper> getModelFamilyAggregateDataForCollection(Long collectionId);  }