/** * Get the read-only/modifiable setting that should be put in affect when it is * attached to a session. * <p/> * This method should only be called during serialization when read-only/modifiable setting * is not available (i.e., isReadOnlySettingAvailable() == false) * * @return null, if the default setting should be used; * true, for read-only; * false, for modifiable * * @throws IllegalStateException if isReadOnlySettingAvailable() == true */ public final Boolean isReadOnlyBeforeAttachedToSession() { if ( isReadOnlySettingAvailable() ) { throw new IllegalStateException( "Cannot call isReadOnlyBeforeAttachedToSession when isReadOnlySettingAvailable == true [" + entityName + "#" + id + "]" ); } return readOnlyBeforeAttachedToSession; }
/** * Restore settings that are not passed to the constructor, * but are still preserved during serialization. * * This method should only be called during deserialization, before associating * the proxy with a session. * * @param readOnlyBeforeAttachedToSession, the read-only/modifiable setting to use when * associated with a session; null indicates that the default should be used. * @param sessionFactoryUuid the session factory uuid, to be used if {@code allowLoadOutsideTransaction} is {@code true}. * @param allowLoadOutsideTransaction whether the proxy can load data even * if it's not attached to a session with an ongoing transaction. * * @throws IllegalStateException if isReadOnlySettingAvailable() == true */ /* package-private */ final void afterDeserialization(Boolean readOnlyBeforeAttachedToSession, String sessionFactoryUuid, boolean allowLoadOutsideTransaction) { if ( isReadOnlySettingAvailable() ) { throw new IllegalStateException( "Cannot call afterDeserialization when isReadOnlySettingAvailable == true [" + entityName + "#" + id + "]" ); } this.readOnlyBeforeAttachedToSession = readOnlyBeforeAttachedToSession; this.sessionFactoryUuid = sessionFactoryUuid; this.allowLoadOutsideTransaction = allowLoadOutsideTransaction; }
/** * Set the read-only/modifiable setting that should be put in affect when it is * attached to a session. * * This method should only be called during deserialization, before associating * the proxy with a session. * * @param readOnlyBeforeAttachedToSession, the read-only/modifiable setting to use when * associated with a session; null indicates that the default should be used. * @throws IllegalStateException if isReadOnlySettingAvailable() == true */ /* package-private */ final void setReadOnlyBeforeAttachedToSession(Boolean readOnlyBeforeAttachedToSession) { if ( isReadOnlySettingAvailable() ) { throw new IllegalStateException( "Cannot call setReadOnlyBeforeAttachedToSession when isReadOnlySettingAvailable == true" ); } this.readOnlyBeforeAttachedToSession = readOnlyBeforeAttachedToSession; }
/** * Get the read-only/modifiable setting that should be put in affect when it is * attached to a session. * * This method should only be called during serialization when read-only/modifiable setting * is not available (i.e., isReadOnlySettingAvailable() == false) * * @return null, if the default setting should be used; * true, for read-only; * false, for modifiable * @throws IllegalStateException if isReadOnlySettingAvailable() == true */ protected final Boolean isReadOnlyBeforeAttachedToSession() { if ( isReadOnlySettingAvailable() ) { throw new IllegalStateException( "Cannot call isReadOnlyBeforeAttachedToSession when isReadOnlySettingAvailable == true" ); } return readOnlyBeforeAttachedToSession; }
/** * Set the read-only/modifiable setting that should be put in affect when it is * attached to a session. * * This method should only be called during deserialization, before associating * the proxy with a session. * * @param readOnlyBeforeAttachedToSession, the read-only/modifiable setting to use when * associated with a session; null indicates that the default should be used. * @throws IllegalStateException if isReadOnlySettingAvailable() == true */ /* package-private */ final void setReadOnlyBeforeAttachedToSession(Boolean readOnlyBeforeAttachedToSession) { if ( isReadOnlySettingAvailable() ) { throw new IllegalStateException( "Cannot call setReadOnlyBeforeAttachedToSession when isReadOnlySettingAvailable == true" ); } this.readOnlyBeforeAttachedToSession = readOnlyBeforeAttachedToSession; }
/** * Get the read-only/modifiable setting that should be put in affect when it is * attached to a session. * * This method should only be called during serialization when read-only/modifiable setting * is not available (i.e., isReadOnlySettingAvailable() == false) * * @return null, if the default setting should be used; * true, for read-only; * false, for modifiable * @throws IllegalStateException if isReadOnlySettingAvailable() == true */ protected final Boolean isReadOnlyBeforeAttachedToSession() { if ( isReadOnlySettingAvailable() ) { throw new IllegalStateException( "Cannot call isReadOnlyBeforeAttachedToSession when isReadOnlySettingAvailable == true" ); } return readOnlyBeforeAttachedToSession; }
/** * Get the read-only/modifiable setting that should be put in affect when it is * attached to a session. * <p/> * This method should only be called during serialization when read-only/modifiable setting * is not available (i.e., isReadOnlySettingAvailable() == false) * * @return null, if the default setting should be used; * true, for read-only; * false, for modifiable * * @throws IllegalStateException if isReadOnlySettingAvailable() == true */ public final Boolean isReadOnlyBeforeAttachedToSession() { if ( isReadOnlySettingAvailable() ) { throw new IllegalStateException( "Cannot call isReadOnlyBeforeAttachedToSession when isReadOnlySettingAvailable == true [" + entityName + "#" + id + "]" ); } return readOnlyBeforeAttachedToSession; }
/** * Restore settings that are not passed to the constructor, * but are still preserved during serialization. * * This method should only be called during deserialization, before associating * the proxy with a session. * * @param readOnlyBeforeAttachedToSession, the read-only/modifiable setting to use when * associated with a session; null indicates that the default should be used. * @param sessionFactoryUuid the session factory uuid, to be used if {@code allowLoadOutsideTransaction} is {@code true}. * @param allowLoadOutsideTransaction whether the proxy can load data even * if it's not attached to a session with an ongoing transaction. * * @throws IllegalStateException if isReadOnlySettingAvailable() == true */ /* package-private */ final void afterDeserialization(Boolean readOnlyBeforeAttachedToSession, String sessionFactoryUuid, boolean allowLoadOutsideTransaction) { if ( isReadOnlySettingAvailable() ) { throw new IllegalStateException( "Cannot call afterDeserialization when isReadOnlySettingAvailable == true [" + entityName + "#" + id + "]" ); } this.readOnlyBeforeAttachedToSession = readOnlyBeforeAttachedToSession; this.sessionFactoryUuid = sessionFactoryUuid; this.allowLoadOutsideTransaction = allowLoadOutsideTransaction; }