Package org.hibernate.engine.spi

Examples of org.hibernate.engine.spi.Status


    if ( existing != null ) {
      // return existing object or initialized proxy (unless deleted)
      LOG.trace( "Entity found in session cache" );
      if ( options.isCheckDeleted() ) {
        EntityEntry entry = persistenceContext.getEntry( existing );
        Status status = entry.getStatus();
        if ( status == Status.DELETED || status == Status.GONE ) {
          return null;
        }
      }
      return existing;
View Full Code Here


    if ( old != null ) {
      // this object was already loaded
      EntityEntry oldEntry = session.getPersistenceContext().getEntry( old );
      if ( options.isCheckDeleted() ) {
        Status status = oldEntry.getStatus();
        if ( status == Status.DELETED || status == Status.GONE ) {
          return REMOVED_ENTITY_MARKER;
        }
      }
      if ( options.isAllowNulls() ) {
View Full Code Here

    final int size = list.length;
    final Object anything = getAnything();
    for ( int i=0; i<size; i++ ) {
      Map.Entry me = list[i];
      EntityEntry entry = (EntityEntry) me.getValue();
      Status status = entry.getStatus();
      if ( status == Status.MANAGED || status == Status.SAVING || status == Status.READ_ONLY ) {
        cascadeOnFlush( session, entry.getPersister(), me.getKey(), anything );
      }
    }
  }
View Full Code Here

      // Update the status of the object and if necessary, schedule an update

      Map.Entry me = list[i];
      EntityEntry entry = (EntityEntry) me.getValue();
      Status status = entry.getStatus();

      if ( status != Status.LOADING && status != Status.GONE ) {
        final FlushEntityEvent entityEvent = new FlushEntityEvent( source, me.getKey(), entry );
        final EventListenerGroup<FlushEntityEventListener> listenerGroup = source
            .getFactory()
View Full Code Here

    final Object anything = getAnything();
    //safe from concurrent modification because of how concurrentEntries() is implemented on IdentityMap
    for ( Map.Entry<Object,EntityEntry> me : persistenceContext.reentrantSafeEntityEntries() ) {
//    for ( Map.Entry me : IdentityMap.concurrentEntries( persistenceContext.getEntityEntries() ) ) {
      EntityEntry entry = (EntityEntry) me.getValue();
      Status status = entry.getStatus();
      if ( status == Status.MANAGED || status == Status.SAVING || status == Status.READ_ONLY ) {
        cascadeOnFlush( session, entry.getPersister(), me.getKey(), anything );
      }
    }
  }
View Full Code Here

//    for ( Map.Entry me : IdentityMap.concurrentEntries( persistenceContext.getEntityEntries() ) ) {

      // Update the status of the object and if necessary, schedule an update

      EntityEntry entry = (EntityEntry) me.getValue();
      Status status = entry.getStatus();

      if ( status != Status.LOADING && status != Status.GONE ) {
        final FlushEntityEvent entityEvent = new FlushEntityEvent( source, me.getKey(), entry );
        for ( FlushEntityEventListener listener : flushListeners ) {
          listener.onFlushEntity( entityEvent );
View Full Code Here

    final Object anything = getAnything();
    //safe from concurrent modification because of how concurrentEntries() is implemented on IdentityMap
    for ( Map.Entry<Object,EntityEntry> me : persistenceContext.reentrantSafeEntityEntries() ) {
//    for ( Map.Entry me : IdentityMap.concurrentEntries( persistenceContext.getEntityEntries() ) ) {
      EntityEntry entry = (EntityEntry) me.getValue();
      Status status = entry.getStatus();
      if ( status == Status.MANAGED || status == Status.SAVING || status == Status.READ_ONLY ) {
        cascadeOnFlush( session, entry.getPersister(), me.getKey(), anything );
      }
    }
  }
View Full Code Here

//    for ( Map.Entry me : IdentityMap.concurrentEntries( persistenceContext.getEntityEntries() ) ) {

      // Update the status of the object and if necessary, schedule an update

      EntityEntry entry = (EntityEntry) me.getValue();
      Status status = entry.getStatus();

      if ( status != Status.LOADING && status != Status.GONE ) {
        final FlushEntityEvent entityEvent = new FlushEntityEvent( source, me.getKey(), entry );
        for ( FlushEntityEventListener listener : flushListeners ) {
          listener.onFlushEntity( entityEvent );
View Full Code Here

    final Object anything = getAnything();
    //safe from concurrent modification because of how concurrentEntries() is implemented on IdentityMap
    for ( Map.Entry<Object,EntityEntry> me : persistenceContext.reentrantSafeEntityEntries() ) {
//    for ( Map.Entry me : IdentityMap.concurrentEntries( persistenceContext.getEntityEntries() ) ) {
      EntityEntry entry = (EntityEntry) me.getValue();
      Status status = entry.getStatus();
      if ( status == Status.MANAGED || status == Status.SAVING || status == Status.READ_ONLY ) {
        cascadeOnFlush( session, entry.getPersister(), me.getKey(), anything );
      }
    }
  }
View Full Code Here

//    for ( Map.Entry me : IdentityMap.concurrentEntries( persistenceContext.getEntityEntries() ) ) {

      // Update the status of the object and if necessary, schedule an update

      EntityEntry entry = (EntityEntry) me.getValue();
      Status status = entry.getStatus();

      if ( status != Status.LOADING && status != Status.GONE ) {
        final FlushEntityEvent entityEvent = new FlushEntityEvent( source, me.getKey(), entry );
        for ( FlushEntityEventListener listener : flushListeners ) {
          listener.onFlushEntity( entityEvent );
View Full Code Here

TOP

Related Classes of org.hibernate.engine.spi.Status

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.