Examples of NaturalIdHelper


Examples of org.hibernate.engine.spi.PersistenceContext.NaturalIdHelper

      // we assume there were no changes to natural id during detachment for now, that is validated later
      // during flush.
      return;
    }

    final NaturalIdHelper naturalIdHelper = session.getPersistenceContext().getNaturalIdHelper();
    final Serializable id = getIdentifier( entity, session );

    // for reattachment of mutable natural-ids, we absolutely positively have to grab the snapshot from the
    // database, because we have no other way to know if the state changed while detached.
    final Object[] naturalIdSnapshot;
    final Object[] entitySnapshot = session.getPersistenceContext().getDatabaseSnapshot( id, this );
    if ( entitySnapshot == StatefulPersistenceContext.NO_ROW ) {
      naturalIdSnapshot = null;
    }
    else {
      naturalIdSnapshot = naturalIdHelper.extractNaturalIdValues( entitySnapshot, this );
    }

    naturalIdHelper.removeSharedNaturalIdCrossReference( this, id, naturalIdSnapshot );
    naturalIdHelper.manageLocalNaturalIdCrossReference(
        this,
        id,
        naturalIdHelper.extractNaturalIdValues( entity, this ),
        naturalIdSnapshot,
        CachedNaturalIdValueSource.UPDATE
    );
  }
View Full Code Here

Examples of org.hibernate.engine.spi.PersistenceContext.NaturalIdHelper

      // we assume there were no changes to natural id during detachment for now, that is validated later
      // during flush.
      return;
    }

    final NaturalIdHelper naturalIdHelper = session.getPersistenceContext().getNaturalIdHelper();
    final Serializable id = getIdentifier( entity, session );

    // for reattachment of mutable natural-ids, we absolutely positively have to grab the snapshot from the
    // database, because we have no other way to know if the state changed while detached.
    final Object[] naturalIdSnapshot;
    final Object[] entitySnapshot = session.getPersistenceContext().getDatabaseSnapshot( id, this );
    if ( entitySnapshot == StatefulPersistenceContext.NO_ROW ) {
      naturalIdSnapshot = null;
    }
    else {
      naturalIdSnapshot = naturalIdHelper.extractNaturalIdValues( entitySnapshot, this );
    }

    naturalIdHelper.removeSharedNaturalIdCrossReference( this, id, naturalIdSnapshot );
    naturalIdHelper.manageLocalNaturalIdCrossReference(
        this,
        id,
        naturalIdHelper.extractNaturalIdValues( entity, this ),
        naturalIdSnapshot,
        CachedNaturalIdValueSource.UPDATE
    );
  }
View Full Code Here

Examples of org.hibernate.engine.spi.PersistenceContext.NaturalIdHelper

      // we assume there were no changes to natural id during detachment for now, that is validated later
      // during flush.
      return;
    }

    final NaturalIdHelper naturalIdHelper = session.getPersistenceContext().getNaturalIdHelper();
    final Serializable id = getIdentifier( entity, session );

    // for reattachment of mutable natural-ids, we absolutely positively have to grab the snapshot from the
    // database, because we have no other way to know if the state changed while detached.
    final Object[] naturalIdSnapshot;
    final Object[] entitySnapshot = session.getPersistenceContext().getDatabaseSnapshot( id, this );
    if ( entitySnapshot == StatefulPersistenceContext.NO_ROW ) {
      naturalIdSnapshot = null;
    }
    else {
      naturalIdSnapshot = naturalIdHelper.extractNaturalIdValues( entitySnapshot, this );
    }

    naturalIdHelper.removeSharedNaturalIdCrossReference( this, id, naturalIdSnapshot );
    naturalIdHelper.manageLocalNaturalIdCrossReference(
        this,
        id,
        naturalIdHelper.extractNaturalIdValues( entity, this ),
        naturalIdSnapshot,
        CachedNaturalIdValueSource.UPDATE
    );
  }
View Full Code Here

Examples of org.hibernate.engine.spi.PersistenceContext.NaturalIdHelper

      // we assume there were no changes to natural id during detachment for now, that is validated later
      // during flush.
      return;
    }

    final NaturalIdHelper naturalIdHelper = session.getPersistenceContext().getNaturalIdHelper();
    final Serializable id = getIdentifier( entity, session );

    // for reattachment of mutable natural-ids, we absolutely positively have to grab the snapshot from the
    // database, because we have no other way to know if the state changed while detached.
    final Object[] naturalIdSnapshot;
    final Object[] entitySnapshot = session.getPersistenceContext().getDatabaseSnapshot( id, this );
    if ( entitySnapshot == StatefulPersistenceContext.NO_ROW ) {
      naturalIdSnapshot = null;
    }
    else {
      naturalIdSnapshot = naturalIdHelper.extractNaturalIdValues( entitySnapshot, this );
    }

    naturalIdHelper.removeSharedNaturalIdCrossReference( this, id, naturalIdSnapshot );
    naturalIdHelper.manageLocalNaturalIdCrossReference(
        this,
        id,
        naturalIdHelper.extractNaturalIdValues( entity, this ),
        naturalIdSnapshot,
        CachedNaturalIdValueSource.UPDATE
    );
  }
View Full Code Here

Examples of org.hibernate.engine.spi.PersistenceContext.NaturalIdHelper

      // we assume there were no changes to natural id during detachment for now, that is validated later
      // during flush.
      return;
    }

    final NaturalIdHelper naturalIdHelper = session.getPersistenceContext().getNaturalIdHelper();
    final Serializable id = getIdentifier( entity, session );

    // for reattachment of mutable natural-ids, we absolutely positively have to grab the snapshot from the
    // database, because we have no other way to know if the state changed while detached.
    final Object[] naturalIdSnapshot;
    final Object[] entitySnapshot = session.getPersistenceContext().getDatabaseSnapshot( id, this );
    if ( entitySnapshot == StatefulPersistenceContext.NO_ROW ) {
      naturalIdSnapshot = null;
    }
    else {
      naturalIdSnapshot = naturalIdHelper.extractNaturalIdValues( entitySnapshot, this );
    }

    naturalIdHelper.removeSharedNaturalIdCrossReference( this, id, naturalIdSnapshot );
    naturalIdHelper.manageLocalNaturalIdCrossReference(
        this,
        id,
        naturalIdHelper.extractNaturalIdValues( entity, this ),
        naturalIdSnapshot,
        CachedNaturalIdValueSource.UPDATE
    );
  }
View Full Code Here

Examples of org.hibernate.engine.spi.PersistenceContext.NaturalIdHelper

      // we assume there were no changes to natural id during detachment for now, that is validated later
      // during flush.
      return;
    }

    final NaturalIdHelper naturalIdHelper = session.getPersistenceContext().getNaturalIdHelper();
    final Serializable id = getIdentifier( entity, session );

    // for reattachment of mutable natural-ids, we absolutely positively have to grab the snapshot from the
    // database, because we have no other way to know if the state changed while detached.
    final Object[] naturalIdSnapshot;
    final Object[] entitySnapshot = session.getPersistenceContext().getDatabaseSnapshot( id, this );
    if ( entitySnapshot == StatefulPersistenceContext.NO_ROW ) {
      naturalIdSnapshot = null;
    }
    else {
      naturalIdSnapshot = naturalIdHelper.extractNaturalIdValues( entitySnapshot, this );
    }

    naturalIdHelper.removeSharedNaturalIdCrossReference( this, id, naturalIdSnapshot );
    naturalIdHelper.manageLocalNaturalIdCrossReference(
        this,
        id,
        naturalIdHelper.extractNaturalIdValues( entity, this ),
        naturalIdSnapshot,
        CachedNaturalIdValueSource.UPDATE
    );
  }
View Full Code Here

Examples of org.hibernate.engine.spi.PersistenceContext.NaturalIdHelper

      // we assume there were no changes to natural id during detachment for now, that is validated later
      // during flush.
      return;
    }

    final NaturalIdHelper naturalIdHelper = session.getPersistenceContext().getNaturalIdHelper();
    final Serializable id = getIdentifier( entity, session );

    // for reattachment of mutable natural-ids, we absolutely positively have to grab the snapshot from the
    // database, because we have no other way to know if the state changed while detached.
    final Object[] naturalIdSnapshot;
    final Object[] entitySnapshot = session.getPersistenceContext().getDatabaseSnapshot( id, this );
    if ( entitySnapshot == StatefulPersistenceContext.NO_ROW ) {
      naturalIdSnapshot = null;
    }
    else {
      naturalIdSnapshot = naturalIdHelper.extractNaturalIdValues( entitySnapshot, this );
    }

    naturalIdHelper.removeSharedNaturalIdCrossReference( this, id, naturalIdSnapshot );
    naturalIdHelper.manageLocalNaturalIdCrossReference(
        this,
        id,
        naturalIdHelper.extractNaturalIdValues( entity, this ),
        naturalIdSnapshot,
        CachedNaturalIdValueSource.UPDATE
    );
  }
View Full Code Here

Examples of org.hibernate.engine.spi.PersistenceContext.NaturalIdHelper

      // we assume there were no changes to natural id during detachment for now, that is validated later
      // during flush.
      return;
    }

    final NaturalIdHelper naturalIdHelper = session.getPersistenceContext().getNaturalIdHelper();
    final Serializable id = getIdentifier( entity, session );

    // for reattachment of mutable natural-ids, we absolutely positively have to grab the snapshot from the
    // database, because we have no other way to know if the state changed while detached.
    final Object[] naturalIdSnapshot;
    final Object[] entitySnapshot = session.getPersistenceContext().getDatabaseSnapshot( id, this );
    if ( entitySnapshot == StatefulPersistenceContext.NO_ROW ) {
      naturalIdSnapshot = null;
    }
    else {
      naturalIdSnapshot = naturalIdHelper.extractNaturalIdValues( entitySnapshot, this );
    }

    naturalIdHelper.removeSharedNaturalIdCrossReference( this, id, naturalIdSnapshot );
    naturalIdHelper.manageLocalNaturalIdCrossReference(
        this,
        id,
        naturalIdHelper.extractNaturalIdValues( entity, this ),
        naturalIdSnapshot,
        CachedNaturalIdValueSource.UPDATE
    );
  }
View Full Code Here

Examples of org.hibernate.engine.spi.PersistenceContext.NaturalIdHelper

      // we assume there were no changes to natural id during detachment for now, that is validated later
      // during flush.
      return;
    }

    final NaturalIdHelper naturalIdHelper = session.getPersistenceContext().getNaturalIdHelper();
    final Serializable id = getIdentifier( entity, session );

    // for reattachment of mutable natural-ids, we absolutely positively have to grab the snapshot from the
    // database, because we have no other way to know if the state changed while detached.
    final Object[] naturalIdSnapshot;
    final Object[] entitySnapshot = session.getPersistenceContext().getDatabaseSnapshot( id, this );
    if ( entitySnapshot == StatefulPersistenceContext.NO_ROW ) {
      naturalIdSnapshot = null;
    }
    else {
      naturalIdSnapshot = naturalIdHelper.extractNaturalIdValues( entitySnapshot, this );
    }

    naturalIdHelper.removeSharedNaturalIdCrossReference( this, id, naturalIdSnapshot );
    naturalIdHelper.manageLocalNaturalIdCrossReference(
        this,
        id,
        naturalIdHelper.extractNaturalIdValues( entity, this ),
        naturalIdSnapshot,
        CachedNaturalIdValueSource.UPDATE
    );
  }
View Full Code Here

Examples of org.hibernate.engine.spi.PersistenceContext.NaturalIdHelper

      // we assume there were no changes to natural id during detachment for now, that is validated later
      // during flush.
      return;
    }

    final NaturalIdHelper naturalIdHelper = session.getPersistenceContext().getNaturalIdHelper();
    final Serializable id = getIdentifier( entity, session );

    // for reattachment of mutable natural-ids, we absolutely positively have to grab the snapshot from the
    // database, because we have no other way to know if the state changed while detached.
    final Object[] naturalIdSnapshot;
    final Object[] entitySnapshot = session.getPersistenceContext().getDatabaseSnapshot( id, this );
    if ( entitySnapshot == StatefulPersistenceContext.NO_ROW ) {
      naturalIdSnapshot = null;
    }
    else {
      naturalIdSnapshot = naturalIdHelper.extractNaturalIdValues( entitySnapshot, this );
    }

    naturalIdHelper.removeSharedNaturalIdCrossReference( this, id, naturalIdSnapshot );
    naturalIdHelper.manageLocalNaturalIdCrossReference(
        this,
        id,
        naturalIdHelper.extractNaturalIdValues( entity, this ),
        naturalIdSnapshot,
        CachedNaturalIdValueSource.UPDATE
    );
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.