Best code examples for Hibernate ORM StatelessSession class (org.hibernate.StatelessSession)

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Hibernate ORM StatelessSession class.
You can now enable Codota on your own code to easily search and navigate your Java codebase.

Hibernate ORM StatelessSession examples from Open Source projects
This code example shows how to use the following methods: close
    } 
 
    public Serializable getId() {
        StatelessSession session = sessionFactory.openStatelessSession();
        Serializable id = generator.generate((StatelessSessionImpl) session, new ID());
        session.close();
        return id;
    } 
 
    /** 
     * Target object for ID generation 
     */ 
    private static class ID { 
        private Integer id;
         
        @Id 
        public Integer getId() {
            return id;
        } 
 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: close
        session = sessionFactory.openStatelessSession();
    } 
 
    @PreDestroy 
    public void destroy() { 
        session.close();
    } 
 
    public List<InstanceLocator> calculateMatches(IDWithIssuer[] pids,
            Attributes keys, QueryParam queryParam) {
        BooleanBuilder builder = new BooleanBuilder();
        builder.and(Builder.pids(pids, false));
        builder.and(Builder.uids(QStudy.study.studyInstanceUID,
                keys.getStrings(Tag.StudyInstanceUID), false));
        builder.and(Builder.uids(QSeries.series.seriesInstanceUID,
                keys.getStrings(Tag.SeriesInstanceUID), false));
        builder.and(Builder.uids(QInstance.instance.sopInstanceUID,
                keys.getStrings(Tag.SOPInstanceUID), false));
        builder.and(QInstance.instance.replaced.isFalse());
        builder.and(QInstance.instance.availability.loe(
Full Snippet Info
3
CodeRank
This code example shows how to use the following methods: createQuery
        this.session = session;
    } 
 
    @Override 
    public Query createQuery(String queryString) {
        return session.createQuery(queryString);
    } 
 
    @Override 
    public SQLQuery createSQLQuery(String queryString) {
        return session.createSQLQuery(queryString);
    } 
 
} 
Full Snippet Info
3
CodeRank
This code example shows how to use the following methods: close
        StatelessSession s = session;
        Connection c = connection;
        connection = null;
        session = null;
        results = null;
        s.close();
        try { 
            c.close();
        } catch (SQLException e) {
            throw new EJBException(e);
        } 
    } 
 
    private void checkResults() { 
        if (results == null)
            throw new IllegalStateException("results not initalized");
    } 
} 
Full Snippet Info
3
CodeRank