Package org.hibernate.engine

Examples of org.hibernate.engine.Status


  private boolean scheduleUpdate(final FlushEntityEvent event) {
   
    final EntityEntry entry = event.getEntityEntry();
    final EventSource session = event.getSession();
    final Object entity = event.getEntity();
    final Status status = entry.getStatus();
    final EntityMode entityMode = session.getEntityMode();
    final EntityPersister persister = entry.getPersister();
    final Object[] values = event.getPropertyValues();
   
    if ( log.isTraceEnabled() ) {
View Full Code Here


   * Note: this method is quite slow, avoid calling if possible!
   */
  protected final boolean isUpdateNecessary(FlushEntityEvent event) throws HibernateException {

    EntityPersister persister = event.getEntityEntry().getPersister();
    Status status = event.getEntityEntry().getStatus();
   
    if ( !event.isDirtyCheckPossible() ) {
      return true;
    }
    else {
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 ) {
        FlushEntityEvent entityEvent = new FlushEntityEvent( source, me.getKey(), entry );
        FlushEntityEventListener[] listeners = source.getListeners().getFlushEntityEventListeners();
        for ( int j = 0; j < listeners.length; j++ ) {
View Full Code Here

    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

        }
       
    }
    @Override
    protected BaseTagStatus createTagStatus() {
        Status status = new Status();
        return status;
    }
View Full Code Here

   
    // defines the portletcontext to set after the action was called
    private String portletcontext;
   
    public void tmlStartTag() throws TMLException {
        Status status = (Status) getStatus();
        status.plainLink = stringToBoolean(getPlainlink());
        status.formID = getForm();
       
        // check if we are a child of an portlet include
        Include.Status includeTag = (Include.Status) getStatus().getAncestorIncludeTag("portlet");
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

TOP

Related Classes of org.hibernate.engine.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.