public List<Specification> getSpecifications(SystemUnderTest sut, Repository repository)
    {
        final Criteria crit = sessionService.getSession().createCriteria(Specification.class);
        crit.createAlias("repository", "repo");
        crit.add(Restrictions.eq("repo.uid", repository.getUid()));
                
        crit.createAlias("targetedSystemUnderTests", "suts");
        crit.add(Restrictions.eq("suts.name", sut.getName()));
        crit.createAlias("suts.project", "sp");
        crit.add(Restrictions.eq("sp.name", sut.getProject().getName()));
        crit.addOrder(Order.asc("name"));

        @SuppressWarnings("unchecked")
        List<Specification> specifications = crit.list();
        HibernateLazyInitializer.initCollection(specifications);
        return specifications;
    }
public List < Specification > getSpecifications ( SystemUnderTest sut , Repository repository ) { final Criteria crit = sessionService . getSession ( ) . createCriteria ( Specification . class ) ; crit . createAlias ( "repository" , "repo" ) ; crit . add ( Restrictions . eq ( "repo.uid" , repository . getUid ( ) ) ) ; crit . createAlias ( "targetedSystemUnderTests" , "suts" ) ; crit . add ( Restrictions . eq ( "suts.name" , sut . getName ( ) ) ) ; crit . createAlias ( "suts.project" , "sp" ) ; crit . add ( Restrictions . eq ( "sp.name" , sut . getProject ( ) . getName ( ) ) ) ; crit . addOrder ( Order . asc ( "name" ) ) ; @ SuppressWarnings ( "unchecked" ) List < Specification > specifications = crit . list ( ) ; HibernateLazyInitializer . initCollection ( specifications ) ; return specifications ; }
{@inheritDoc}