Hibernate ORM IdentifierGenerator - 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 IdentifierGenerator class.

This code example shows how to use the following methods:generate
    public NativeHiLoGenerator() { 
        super(); 
    } 
 
    public Serializable generate(SessionImplementor session, Object object) throws HibernateException {
        return _proxy.generate(session, object);
    } 
 
    public Object generatorKey() { 
        if (_proxy instanceof PersistentIdentifierGenerator)
            return ((PersistentIdentifierGenerator) _proxy).generatorKey();
        else 
            return this;
    } 
 
    public String[] sqlCreateStrings(Dialect dialect) throws HibernateException {
        if (_proxy instanceof PersistentIdentifierGenerator)
            return ((PersistentIdentifierGenerator) _proxy).sqlCreateStrings(dialect);
        else 
            return new String[] {};
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:generate
                                                      ((SessionFactoryImpl) sessionFactory).getDialect());
    } 
 
    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
Connect your IDE to all the code out there  Get Codota for Java
See Code Examples for Hibernate ORM IdentifierGenerator Methods: