Package org.hibernate.persister.entity

Examples of org.hibernate.persister.entity.EntityPersister.findDirty()


      int[] dirtyProperties;
      if ( event.hasDatabaseSnapshot() ) {
        dirtyProperties = persister.findModified( event.getDatabaseSnapshot(), values, entity, session );
      }
      else {
        dirtyProperties = persister.findDirty( values, entry.getLoadedState(), entity, session );
      }
      event.setDirtyProperties(dirtyProperties);
    }
   
    return intercepted;
View Full Code Here


      interceptorHandledDirtyCheck = false;
     
      cannotDirtyCheck = loadedState==null; // object loaded by update()
      if ( !cannotDirtyCheck ) {
        // dirty check against the usual snapshot of the entity
        dirtyProperties = persister.findDirty( values, loadedState, entity, session );
       
      }
      else {
        // dirty check against the database snapshot, if possible/necessary
        final Object[] databaseSnapshot = getDatabaseSnapshot(session, persister, id);
View Full Code Here

      int[] dirtyProperties;
      if ( event.hasDatabaseSnapshot() ) {
        dirtyProperties = persister.findModified( event.getDatabaseSnapshot(), values, entity, session );
      }
      else {
        dirtyProperties = persister.findDirty( values, entry.getLoadedState(), entity, session );
      }
      event.setDirtyProperties(dirtyProperties);
    }

    return intercepted;
View Full Code Here

      interceptorHandledDirtyCheck = false;

      cannotDirtyCheck = loadedState==null; // object loaded by update()
      if ( !cannotDirtyCheck ) {
        // dirty check against the usual snapshot of the entity
        dirtyProperties = persister.findDirty( values, loadedState, entity, session );
      }
      else if ( entry.getStatus() == Status.DELETED && ! event.getEntityEntry().isModifiableEntity() ) {
        // A non-modifiable (e.g., read-only or immutable) entity needs to be have
        // references to transient entities set to null before being deleted. No other
        // fields should be updated.
View Full Code Here

        // - entry.getDeletedState() contains the entity's current property values with
        //   references to transient entities set to null.
        // - dirtyProperties will only contain properties that refer to transient entities
        final Object[] currentState =
            persister.getPropertyValues( event.getEntity(), event.getSession().getEntityMode() );
        dirtyProperties = persister.findDirty( entry.getDeletedState(), currentState, entity, session );
        cannotDirtyCheck = false;
      }
      else {
        // dirty check against the database snapshot, if possible/necessary
        final Object[] databaseSnapshot = getDatabaseSnapshot(session, persister, id);
View Full Code Here

      int[] dirtyProperties;
      if ( event.hasDatabaseSnapshot() ) {
        dirtyProperties = persister.findModified( event.getDatabaseSnapshot(), values, entity, session );
      }
      else {
        dirtyProperties = persister.findDirty( values, entry.getLoadedState(), entity, session );
      }
      event.setDirtyProperties(dirtyProperties);
    }

    return intercepted;
View Full Code Here

      interceptorHandledDirtyCheck = false;

      cannotDirtyCheck = loadedState==null; // object loaded by update()
      if ( !cannotDirtyCheck ) {
        // dirty check against the usual snapshot of the entity
        dirtyProperties = persister.findDirty( values, loadedState, entity, session );
      }
      else if ( entry.getStatus() == Status.DELETED && ! event.getEntityEntry().isModifiableEntity() ) {
        // A non-modifiable (e.g., read-only or immutable) entity needs to be have
        // references to transient entities set to null before being deleted. No other
        // fields should be updated.
View Full Code Here

        // - currentState contains the entity's current property values.
        // - entry.getDeletedState() contains the entity's current property values with
        //   references to transient entities set to null.
        // - dirtyProperties will only contain properties that refer to transient entities
        final Object[] currentState = persister.getPropertyValues( event.getEntity() );
        dirtyProperties = persister.findDirty( entry.getDeletedState(), currentState, entity, session );
        cannotDirtyCheck = false;
      }
      else {
        // dirty check against the database snapshot, if possible/necessary
        final Object[] databaseSnapshot = getDatabaseSnapshot(session, persister, id);
View Full Code Here

      int[] dirtyProperties;
      if ( event.hasDatabaseSnapshot() ) {
        dirtyProperties = persister.findModified( event.getDatabaseSnapshot(), values, entity, session );
      }
      else {
        dirtyProperties = persister.findDirty( values, entry.getLoadedState(), entity, session );
      }
      event.setDirtyProperties(dirtyProperties);
    }
   
    return intercepted;
View Full Code Here

      interceptorHandledDirtyCheck = false;
     
      cannotDirtyCheck = loadedState==null; // object loaded by update()
      if ( !cannotDirtyCheck ) {
        // dirty check against the usual snapshot of the entity
        dirtyProperties = persister.findDirty( values, loadedState, entity, session );
       
      }
      else {
        // dirty check against the database snapshot, if possible/necessary
        final Object[] databaseSnapshot = getDatabaseSnapshot(session, persister, id);
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.