Package org.jboss.ejb.plugins.cmp.jdbc2

Examples of org.jboss.ejb.plugins.cmp.jdbc2.DeclaredSQLQueryCommand


      return fieldName;
   }

   public Object getValue(EntityEnterpriseContext ctx)
   {
      PersistentContext pctx = (PersistentContext) ctx.getPersistenceContext();
      return pctx.getFieldValue(rowIndex);
   }
View Full Code Here


      }
   }

   private FieldState getFieldState(EntityEnterpriseContext ctx)
   {
      PersistentContext pctx = (PersistentContext)ctx.getPersistenceContext();
      FieldState state = pctx.getCMRState(cmrIndex);
      if(state == null)
      {
         if(isSingleValued())
         {
            state = new SingleValuedFieldState();
         }
         else
         {
            state = new CollectionValuedFieldState();
         }
         pctx.setCMRState(cmrIndex, state);
      }
      return state;
   }
View Full Code Here

         return value == null ? NULL_VALUE : value;
      }

      public void cacheValue(EntityEnterpriseContext ctx)
      {
         PersistentContext pctx = (PersistentContext)ctx.getPersistenceContext();
         pctx.cacheRelations(cmrIndex, this);
      }
View Full Code Here

      private Object getLoadedValue(EntityEnterpriseContext ctx)
      {
         if(!loaded)
         {
            PersistentContext pctx = (PersistentContext)ctx.getPersistenceContext();
            pctx.loadCachedRelations(cmrIndex, this);
            if(!loaded)
            {
               loader.load(ctx, this);
               loaded = true;
               cacheValue(ctx);
View Full Code Here

         return value;
      }

      public void cacheValue(EntityEnterpriseContext ctx)
      {
         PersistentContext pctx = (PersistentContext)ctx.getPersistenceContext();
         pctx.cacheRelations(cmrIndex, this);
      }
View Full Code Here

         return value;
      }

      private void loadOnlyFromCache(EntityEnterpriseContext ctx)
      {
         PersistentContext pctx = (PersistentContext)ctx.getPersistenceContext();
         if(pctx == null)
         {
            throw new EJBException("Persistence context is not available! Make sure the CMR collection is accessed in the transaction it was obtained.");
         }
         pctx.loadCachedRelations(cmrIndex, this);
      }
View Full Code Here

            foreignKeyFields[i].setValueInternal(ctx, null, fkConstraint == null);
         }

         if(fkConstraint != null)
         {
            PersistentContext pctx = (PersistentContext)ctx.getPersistenceContext();
            pctx.nullForeignKey(fkConstraint);
         }
      }
View Full Code Here

            foreignKeyFields[i].setValueInternal(ctx, fieldValue, markDirty);
         }

         if(fkConstraint != null)
         {
            PersistentContext pctx = (PersistentContext)ctx.getPersistenceContext();
            if(relatedId == null)
            {
               pctx.nullForeignKey(fkConstraint);
            }
            else
            {
               pctx.nonNullForeignKey(fkConstraint);
            }
         }
      }
View Full Code Here

/*     */     }
/*     */   }
/*     */
/*     */   public void initInstance(EntityEnterpriseContext ctx)
/*     */   {
/* 234 */     ctx.setPersistenceContext(new PersistentContext(this, this.table.getRow(ctx.getId())));
/* 235 */     for (int i = 0; i < this.tableFields.length; i++)
/*     */     {
/* 237 */       this.tableFields[i].initInstance(ctx);
/*     */     }
/*     */
View Full Code Here

/* 267 */     return fields;
/*     */   }
/*     */
/*     */   public boolean isStoreRequired(EntityEnterpriseContext instance)
/*     */   {
/* 272 */     PersistentContext pctx = (PersistentContext)instance.getPersistenceContext();
/* 273 */     return pctx.isDirty();
/*     */   }
View Full Code Here

TOP

Related Classes of org.jboss.ejb.plugins.cmp.jdbc2.DeclaredSQLQueryCommand

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.