@Test public void testGetNominalLabelWithAllFieldsByCode() { try { entityManager.getTransaction().begin(); NominalLabelDTO result = nominalLabelResourceFacadeImp.getNominalLabelWithAllFieldsByCode(nominalLabel.getNominalLabelCode()); entityManager.getTransaction().commit(); assertEquals(nominalLabel.getNominalAttributeDTO().getNominalAttributeId(), result.getNominalAttributeDTO().getNominalAttributeId()); } catch (PropertyNotSetException e) { logger.error("PropertyNotSetException while fetching nominal labels with all fields by code "+e.getMessage()); fail("testGetNominalLabelWithAllFieldsByCode failed"); } }
@Override public NominalLabelDTO getNominalLabelWithAllFieldsByCode(String code) throws PropertyNotSetException { NominalLabel nb = this.getByCriteria(Restrictions.eq("nominalLabelCode", code)); if (nb != null) { Hibernate.initialize(nb.getModelNominalLabels()); Hibernate.initialize(nb.getNominalAttribute()); Hibernate.initialize(nb.getDocumentNominalLabels()); return new NominalLabelDTO(nb); } return null; }
NominalLabelResourceFacadeImp extends CoreDBServiceFacadeImp<NominalLabel, Long> implements NominalLabelResourceFacade { @Override public NominalLabelDTO getNominalLabelWithAllFieldsByCode(String code) throws PropertyNotSetException { NominalLabel nb = this.getByCriteria(Restrictions.eq("nominalLabelCode", code)); if (nb != null) { Hibernate.initialize(nb.getModelNominalLabels()); Hibernate.initialize(nb.getNominalAttribute()); Hibernate.initialize(nb.getDocumentNominalLabels()); return new NominalLabelDTO(nb); } return null; } }
NominalLabelResourceFacadeImp extends CoreDBServiceFacadeImp<NominalLabel, Long> implements NominalLabelResourceFacade { @Override public NominalLabelDTO getNominalLabelWithAllFieldsByCode(String code) throws PropertyNotSetException { NominalLabel nb = this.getByCriteria(Restrictions.eq("nominalLabelCode", code)); if (nb != null) { Hibernate.initialize(nb.getModelNominalLabels()); Hibernate.initialize(nb.getNominalAttribute()); Hibernate.initialize(nb.getDocumentNominalLabels()); return new NominalLabelDTO(nb); } return null; } protected  NominalLabelResourceFacadeImp(); }
NominalLabelResourceFacadeImp extends CoreDBServiceFacadeImp<NominalLabel, Long> implements NominalLabelResourceFacade { @Override public NominalLabelDTO getNominalLabelWithAllFieldsByCode(String code) throws PropertyNotSetException { NominalLabel nb = this.getByCriteria(Restrictions.eq("nominalLabelCode", code)); if (nb != null) { Hibernate.initialize(nb.getModelNominalLabels()); Hibernate.initialize(nb.getNominalAttribute()); Hibernate.initialize(nb.getDocumentNominalLabels()); return new NominalLabelDTO(nb); } return null; } protected  NominalLabelResourceFacadeImp(); @Override void saveNominalLabel(NominalLabelDTO nominalLabel); @Override NominalLabelDTO addNominalLabel(NominalLabelDTO nominalLabel); @Override NominalLabelDTO editNominalLabel(NominalLabelDTO nominalLabel); @Override Integer deleteNominalLabel(NominalLabelDTO nominalLabel); @Override Integer deleteNominalLabelByID(Long nominalLabelID); @Override NominalLabelDTO getNominalLabelByID(Long nominalLabelID); @Override NominalLabelDTO getNominalLabelWithAllFieldsByID(Long nominalLabelID); @Override NominalLabelDTO getNominalLabelByCode(String code); @Override NominalLabelDTO getNominalLabelWithAllFieldsByCode(String code); @Override List<NominalLabelDTO> getAllNominalLabels(); @Override Boolean isNominalLabelExists(Long nominalLabelID); @Override Boolean isNominalLabelExists(String code); @Override List<NominalLabelDTO> getNominalLabelByAttributeID(Long attributeID); @Override List<Long> getNominalLabelIdsByAttributeID(Long attributeID); @Override Long getNominalLabelCountForCollectionID(Long collectionId); }
NominalLabelResourceFacadeImp extends CoreDBServiceFacadeImp<NominalLabel, Long> implements NominalLabelResourceFacade { @Override public NominalLabelDTO getNominalLabelWithAllFieldsByCode(String code) throws PropertyNotSetException { NominalLabel nb = this.getByCriteria(Restrictions.eq("nominalLabelCode", code)); if (nb != null) { Hibernate.initialize(nb.getModelNominalLabels()); Hibernate.initialize(nb.getNominalAttribute()); Hibernate.initialize(nb.getDocumentNominalLabels()); return new NominalLabelDTO(nb); } return null; } protected  NominalLabelResourceFacadeImp(); @Override void saveNominalLabel(NominalLabelDTO nominalLabel); @Override NominalLabelDTO addNominalLabel(NominalLabelDTO nominalLabel); @Override NominalLabelDTO editNominalLabel(NominalLabelDTO nominalLabel); @Override Integer deleteNominalLabel(NominalLabelDTO nominalLabel); @Override Integer deleteNominalLabelByID(Long nominalLabelID); @Override NominalLabelDTO getNominalLabelByID(Long nominalLabelID); @Override NominalLabelDTO getNominalLabelWithAllFieldsByID(Long nominalLabelID); @Override NominalLabelDTO getNominalLabelByCode(String code); @Override NominalLabelDTO getNominalLabelWithAllFieldsByCode(String code); @Override List<NominalLabelDTO> getAllNominalLabels(); @Override Boolean isNominalLabelExists(Long nominalLabelID); @Override Boolean isNominalLabelExists(String code); @Override List<NominalLabelDTO> getNominalLabelByAttributeID(Long attributeID); @Override List<Long> getNominalLabelIdsByAttributeID(Long attributeID); @Override Long getNominalLabelCountForCollectionID(Long collectionId);  }