Package org.hibernate.engine.internal

Examples of org.hibernate.engine.internal.Cascade


      Object anything) {

    // cascade-save to many-to-one BEFORE the parent is saved
    source.getPersistenceContext().incrementCascadeLevel();
    try {
      new Cascade( getCascadeAction(), CascadePoint.BEFORE_INSERT_AFTER_DELETE, source ).cascade(
          persister,
          entity,
          anything
      );
    }
View Full Code Here


      Object anything) {

    // cascade-save to collections AFTER the collection owner was saved
    source.getPersistenceContext().incrementCascadeLevel();
    try {
      new Cascade( getCascadeAction(), CascadePoint.AFTER_INSERT_BEFORE_DELETE, source ).cascade(
          persister,
          entity,
          anything
      );
    }
View Full Code Here

      EntityPersister persister,
      ReplicationMode replicationMode,
      EventSource source) {
    source.getPersistenceContext().incrementCascadeLevel();
    try {
      new Cascade( CascadingActions.REPLICATE, CascadePoint.AFTER_UPDATE, source ).cascade(
          persister,
          entity,
          replicationMode
      );
    }
View Full Code Here

      final Object entity,
      final Map copyCache
  ) {
    source.getPersistenceContext().incrementCascadeLevel();
    try {
      new Cascade( getCascadeAction(), CascadePoint.BEFORE_MERGE, source ).cascade(
          persister,
          entity,
          copyCache
      );
    }
View Full Code Here

 
  private void cascadeOnLock(LockEvent event, EntityPersister persister, Object entity) {
    EventSource source = event.getSession();
    source.getPersistenceContext().incrementCascadeLevel();
    try {
      new Cascade( CascadingActions.LOCK, CascadePoint.AFTER_LOCK, source).cascade(
          persister,
          entity,
          event.getLockOptions()
      );
    }
View Full Code Here

  private void cascadeOnFlush(EventSource session, EntityPersister persister, Object object, Object anything)
  throws HibernateException {
    session.getPersistenceContext().incrementCascadeLevel();
    try {
      new Cascade( getCascadingAction(), CascadePoint.BEFORE_FLUSH, session ).cascade( persister, object, anything );
    }
    finally {
      session.getPersistenceContext().decrementCascadeLevel();
    }
  }
View Full Code Here

      id = e.getId();
    }

    // cascade the refresh prior to refreshing this entity
    refreshedAlready.put( object, object );
    new Cascade( CascadingActions.REFRESH, CascadePoint.BEFORE_REFRESH, source ).cascade(
        persister,
        object,
        refreshedAlready
    );
View Full Code Here

    CacheMode cacheMode = session.getCacheMode();
    session.setCacheMode( CacheMode.GET );
    session.getPersistenceContext().incrementCascadeLevel();
    try {
      // cascade-delete to collections BEFORE the collection owner is deleted
      new Cascade( CascadingActions.DELETE, CascadePoint.AFTER_INSERT_BEFORE_DELETE, session ).cascade(
          persister,
          entity,
          transientEntities
      );
    }
View Full Code Here

    CacheMode cacheMode = session.getCacheMode();
    session.setCacheMode( CacheMode.GET );
    session.getPersistenceContext().incrementCascadeLevel();
    try {
      // cascade-delete to many-to-one AFTER the parent was deleted
      new Cascade( CascadingActions.DELETE, CascadePoint.BEFORE_INSERT_AFTER_DELETE, session ).cascade(
          persister,
          entity,
          transientEntities
      );
    }
View Full Code Here

    // rather because it might now be stale, and there is no longer any
    // EntityEntry to take precedence
    // This is now handled by removeEntity()
    //session.getPersistenceContext().removeDatabaseSnapshot(key);

    new Cascade( CascadingActions.EVICT, CascadePoint.AFTER_EVICT, session ).cascade( persister, object );
  }
View Full Code Here

TOP

Related Classes of org.hibernate.engine.internal.Cascade

Copyright © 2018 www.massapicom. 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.