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

This code example shows how to use the following methods:
		return false; 
	} 
 
	public void managedClose() { 
		if ( isClosed() ) { 
			throw new SessionException( "Session was already closed!" ); 
		} 
		transactionCoordinator.close(); 
		setClosed(); 
	} 
 
	public void managedFlush() { 
		errorIfClosed(); 
		getTransactionCoordinator().getJdbcCoordinator().executeBatch(); 
	} 
 
	public boolean shouldAutoClose() { 
		return isAutoCloseSessionEnabled() && !isClosed(); 
	} 
 
3
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
		if ( session == null ) {
			throw new TransientObjectException(
					"Proxy is detached (i.e, session is null). The read-only/modifiable setting is only accessible when the proxy is associated with an open session." ); 
		} 
		if ( session.isClosed() ) {
			throw new SessionException(
					"Session is closed. The read-only/modifiable setting is only accessible when the proxy is associated with an open session." ); 
		} 
	} 
 
	@Override 
	public final boolean isReadOnly() { 
		errorIfReadOnlySettingNotAvailable(); 
		return readOnly;
	} 
 
	@Override 
	public final void setReadOnly(boolean readOnly) {
		errorIfReadOnlySettingNotAvailable(); 
		// only update if readOnly is different from current setting 
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
  public void commit( ) throws ConstraintViolationException {
    if ( this.tx != null ) {
      this.tx.commit( );
      this.tx = null;
    } else { 
      throw new SessionException( "Attempt to commit session which is already closed:  " + this.txStart );
    } 
  } 
   
  public Criteria createCriteria( final Class class1 ) {
    return this.getSession( ).createCriteria( class1 );
  } 
   
  /** package default on purpose **/ 
  EntityManager getEntityManager( ) { 
    return this.tx.getEntityManager( );
  } 
   
  /** :| should also be package default **/ 
  Session getSession( ) {
2
CodeRank
Connect your IDE to all the code out there  Get Codota for Java