Package org.hibernate

Examples of org.hibernate.CustomEntityDirtinessStrategy$DirtyCheckContext


        }
      }
    }

    // last resort
    return new CustomEntityDirtinessStrategy() {
      @Override
      public boolean canDirtyCheck(Object entity, EntityPersister persister, Session session) {
        return false;
      }
View Full Code Here


    };
  }

  @SuppressWarnings({ "unchecked" })
  private CustomEntityDirtinessStrategy determineCustomEntityDirtinessStrategy() {
    CustomEntityDirtinessStrategy defaultValue = new CustomEntityDirtinessStrategy() {
      @Override
      public boolean canDirtyCheck(Object entity, EntityPersister persister, Session session) {
        return false;
      }
View Full Code Here

    if ( getPersister().getInstrumentationMetadata().isInstrumented() ) {
      // the entity must be instrumented (otherwise we cant check dirty flag) and the dirty flag is false
      return ! getPersister().getInstrumentationMetadata().extractInterceptor( entity ).isDirty();
    }

    final CustomEntityDirtinessStrategy customEntityDirtinessStrategy =
        persistenceContext.getSession().getFactory().getCustomEntityDirtinessStrategy();
    if ( customEntityDirtinessStrategy.canDirtyCheck( entity, getPersister(), (Session) persistenceContext.getSession() ) ) {
      return ! customEntityDirtinessStrategy.isDirty( entity, getPersister(), (Session) persistenceContext.getSession() );
    }

    return false;
  }
View Full Code Here

  private boolean isUnequivocallyNonDirty(Object entity) {

    if(entity instanceof SelfDirtinessTracker)
      return ((SelfDirtinessTracker) entity).$$_hibernate_hasDirtyAttributes();

    final CustomEntityDirtinessStrategy customEntityDirtinessStrategy =
        persistenceContext.getSession().getFactory().getCustomEntityDirtinessStrategy();
    if ( customEntityDirtinessStrategy.canDirtyCheck( entity, getPersister(), (Session) persistenceContext.getSession() ) ) {
      return ! customEntityDirtinessStrategy.isDirty( entity, getPersister(), (Session) persistenceContext.getSession() );
    }

    if ( getPersister().hasMutableProperties() ) {
      return false;
    }
View Full Code Here

    };
  }

  @SuppressWarnings({ "unchecked" })
  private CustomEntityDirtinessStrategy determineCustomEntityDirtinessStrategy() {
    CustomEntityDirtinessStrategy defaultValue = new CustomEntityDirtinessStrategy() {
      @Override
      public boolean canDirtyCheck(Object entity, EntityPersister persister, Session session) {
        return false;
      }
View Full Code Here

  private boolean isUnequivocallyNonDirty(Object entity) {

        if(entity instanceof SelfDirtinessTracker)
            return ((SelfDirtinessTracker) entity).$$_hibernate_hasDirtyAttributes();

    final CustomEntityDirtinessStrategy customEntityDirtinessStrategy =
        persistenceContext.getSession().getFactory().getCustomEntityDirtinessStrategy();
    if ( customEntityDirtinessStrategy.canDirtyCheck( entity, getPersister(), (Session) persistenceContext.getSession() ) ) {
      return ! customEntityDirtinessStrategy.isDirty( entity, getPersister(), (Session) persistenceContext.getSession() );
    }
   
    if ( getPersister().hasMutableProperties() ) {
      return false;
    }
View Full Code Here

    };
  }

  @SuppressWarnings({ "unchecked" })
  private CustomEntityDirtinessStrategy determineCustomEntityDirtinessStrategy() {
    CustomEntityDirtinessStrategy defaultValue = new CustomEntityDirtinessStrategy() {
      @Override
      public boolean canDirtyCheck(Object entity, EntityPersister persister, Session session) {
        return false;
      }
View Full Code Here

    };
  }

  @SuppressWarnings({ "unchecked" })
  private CustomEntityDirtinessStrategy determineCustomEntityDirtinessStrategy() {
    CustomEntityDirtinessStrategy defaultValue = new CustomEntityDirtinessStrategy() {
      @Override
      public boolean canDirtyCheck(Object entity, EntityPersister persister, Session session) {
        return false;
      }
View Full Code Here

  private boolean isUnequivocallyNonDirty(Object entity) {

    if(entity instanceof SelfDirtinessTracker)
      return ((SelfDirtinessTracker) entity).$$_hibernate_hasDirtyAttributes();

    final CustomEntityDirtinessStrategy customEntityDirtinessStrategy =
        persistenceContext.getSession().getFactory().getCustomEntityDirtinessStrategy();
    if ( customEntityDirtinessStrategy.canDirtyCheck( entity, getPersister(), (Session) persistenceContext.getSession() ) ) {
      return ! customEntityDirtinessStrategy.isDirty( entity, getPersister(), (Session) persistenceContext.getSession() );
    }

    if ( getPersister().hasMutableProperties() ) {
      return false;
    }
View Full Code Here

        }
      }
    }

    // last resort
    return new CustomEntityDirtinessStrategy() {
      @Override
      public boolean canDirtyCheck(Object entity, EntityPersister persister, Session session) {
        return false;
      }
View Full Code Here

TOP

Related Classes of org.hibernate.CustomEntityDirtinessStrategy$DirtyCheckContext

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.