Package org.jboss.ejb.plugins.cmp.jdbc

Examples of org.jboss.ejb.plugins.cmp.jdbc.JDBCContext


   public void resetPersistenceContext(EntityEnterpriseContext ctx)
   {
      if(isReadTimedOut(ctx))
      {
         JDBCContext jdbcCtx = (JDBCContext)ctx.getPersistenceContext();
         FieldState fieldState = (FieldState)jdbcCtx.getFieldState(jdbcContextIndex);
         if(fieldState != null)
            fieldState.reset();
      }
   }
View Full Code Here


      cmrChainLink.setNextLink(nextCMRChainLink);
   }

   private FieldState getFieldState(EntityEnterpriseContext ctx)
   {
      JDBCContext jdbcCtx = (JDBCContext)ctx.getPersistenceContext();
      FieldState fieldState = (FieldState)jdbcCtx.getFieldState(jdbcContextIndex);
      if(fieldState == null)
      {
         fieldState = new FieldState(jdbcCtx);
         jdbcCtx.setFieldState(jdbcContextIndex, fieldState);
      }
      return fieldState;
   }
View Full Code Here

      {
         InvocationHandler handler = ((Proxies.ProxyTarget)instance).getInvocationHandler();
         if(handler instanceof EntityBridgeInvocationHandler)
            ((EntityBridgeInvocationHandler)handler).setContext(ctx);
      }
      ctx.setPersistenceContext(new JDBCContext(jdbcContextSize, new EntityState()));
   }
View Full Code Here

      return getEntityState(ctx).isScheduledForBatchCascadeDelete();
   }

   private static EntityState getEntityState(EntityEnterpriseContext ctx)
   {
      JDBCContext jdbcCtx = (JDBCContext)ctx.getPersistenceContext();
      EntityState entityState = jdbcCtx.getEntityState();
      if(entityState == null)
         throw new IllegalStateException("Entity state is null.");
      return entityState;
   }
View Full Code Here

   public void resetPersistenceContext(EntityEnterpriseContext ctx)
   {
      if(isReadTimedOut(ctx))
      {
         JDBCContext jdbcCtx = (JDBCContext)ctx.getPersistenceContext();
         FieldState fieldState = (FieldState)jdbcCtx.getFieldState(jdbcContextIndex);
         if(fieldState != null)
            fieldState.reset();
      }
   }
View Full Code Here

      getFieldState(ctx).setCheckDirty();
   }

   private FieldState getFieldState(EntityEnterpriseContext ctx)
   {
      JDBCContext jdbcCtx = (JDBCContext)ctx.getPersistenceContext();
      FieldState fieldState = (FieldState)jdbcCtx.getFieldState(jdbcContextIndex);
      if(fieldState == null)
      {
         fieldState = new FieldState(jdbcCtx);
         jdbcCtx.setFieldState(jdbcContextIndex, fieldState);
      }
      return fieldState;
   }
View Full Code Here

      {
         return;
      }

      // clear the field state
      JDBCContext jdbcCtx = (JDBCContext) ctx.getPersistenceContext();
      // invalidate current field state
      /*
      FieldState currentFieldState = (FieldState) jdbcCtx.getFieldState(jdbcContextIndex);
      if(currentFieldState != null)
         currentFieldState.invalidate();
         */
      jdbcCtx.setFieldState(jdbcContextIndex, null);

      if(foreignKeyFields == null)
      {
         return;
      }
View Full Code Here

      return foreignKeyFields == null ? relationManager.isDirty() : false;
   }

   public boolean invalidateCache(EntityEnterpriseContext ctx)
   {
      JDBCContext jdbcCtx = (JDBCContext) ctx.getPersistenceContext();
      FieldState fieldState = (FieldState) jdbcCtx.getFieldState(jdbcContextIndex);
      return fieldState == null ? false : fieldState.isChanged();
   }
View Full Code Here

   /**
    * Gets the field state object from the persistence context.
    */
   private FieldState getFieldState(EntityEnterpriseContext ctx)
   {
      JDBCContext jdbcCtx = (JDBCContext) ctx.getPersistenceContext();
      FieldState fieldState = (FieldState) jdbcCtx.getFieldState(jdbcContextIndex);
      if(fieldState == null)
      {
         fieldState = new FieldState(ctx);
         jdbcCtx.setFieldState(jdbcContextIndex, fieldState);
      }
      return fieldState;
   }
View Full Code Here

/* 1502 */     if (!isReadTimedOut(ctx))
/*      */     {
/* 1504 */       return;
/*      */     }
/*      */
/* 1508 */     JDBCContext jdbcCtx = (JDBCContext)ctx.getPersistenceContext();
/*      */
/* 1515 */     jdbcCtx.setFieldState(this.jdbcContextIndex, null);
/*      */
/* 1517 */     if (this.foreignKeyFields == null)
/*      */     {
/* 1519 */       return;
/*      */     }
View Full Code Here

TOP

Related Classes of org.jboss.ejb.plugins.cmp.jdbc.JDBCContext

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.