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

This code example shows how to use the following methods:
	public Session currentSession() throws HibernateException {
		try { 
			return (org.hibernate.classic.Session) SessionFactoryUtils.doGetSession(this.sessionFactory, false);
		} 
		catch (IllegalStateException ex) {
			throw new HibernateException(ex.getMessage());
		} 
	} 
 
} 
Full Snippet Info
10
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: getMessage
	 * Create a new HibernateSystemException, 
	 * wrapping an arbitrary HibernateException. 
	 * @param cause the HibernateException thrown 
	 */ 
	public HibernateSystemException(HibernateException cause) {
		super(cause != null ? cause.getMessage() : null, cause);
	} 
 
} 
Full Snippet Info
8
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: getCause, getMessage
import org.hibernate.StaleObjectStateException;
import org.hibernate.StaleStateException;
import org.hibernate.TransientObjectException;
import org.hibernate.UnresolvableObjectException;
import org.hibernate.WrongClassException;
import org.hibernate.dialect.lock.OptimisticEntityLockException;
import org.hibernate.dialect.lock.PessimisticEntityLockException;
import org.hibernate.engine.spi.SessionFactoryImplementor;
import org.hibernate.exception.ConstraintViolationException;
import org.hibernate.exception.DataException;
import org.hibernate.exception.JDBCConnectionException;
import org.hibernate.exception.LockAcquisitionException;
import org.hibernate.exception.SQLGrammarException;
import org.hibernate.service.spi.Wrapped;
 
import org.springframework.dao.CannotAcquireLockException; 
import org.springframework.dao.DataAccessException; 
import org.springframework.dao.DataAccessResourceFailureException; 
import org.springframework.dao.DataIntegrityViolationException; 
import org.springframework.dao.DuplicateKeyException; 

8
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods:
This code example shows how to use the following methods:
    public static final char NOT_NULL_PREFIX = '_';
 
    @Override 
    public String fromNonNullValue(String s) {
        if (s.charAt(0) != NOT_NULL_PREFIX) {
            throw new HibernateException("Persistent storage of " + this.getClass().getName() + " corrupted, database contained string [" + s + "] which should be prefixed by: " + NOT_NULL_PREFIX);
        } 
 
        return s.substring(1);
    } 
 
    @Override 
    public String toNonNullValue(String value) {
        return NOT_NULL_PREFIX + value;
    } 
} 
Full Snippet Info
8
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE