Hibernate ORM StatelessSession - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Hibernate ORM StatelessSession class.

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;
        } 
 
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
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(
3
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
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);
    } 
 
} 
3
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
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");
    } 
} 
3
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
See Code Examples for Hibernate ORM StatelessSession Methods: