Code example for SessionImplementor

Methods: getPersistenceContext

0
	 * {@inheritDoc} 
	 */ 
	public boolean isReadOnly() { 
		if ( ! isReadOnlyInitialized() && getSession() == null ) {
			throw new IllegalStateException(
					"cannot determine readOnly/modifiable setting when it is not initialized and is not initialized and getSession() == null" 
			); 
		} 
		return ( isReadOnlyInitialized() ?
				readOnly.booleanValue() :
				getSession().getPersistenceContext().isDefaultReadOnly()
		); 
	} 
 
	/** 
	 * {@inheritDoc} 
	 */ 
	public Criteria setReadOnly(boolean readOnly) {
		this.readOnly = Boolean.valueOf( readOnly );
		return this;
Contextual code suggestions in your IDE  Get Codota for Java