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

Examples of org.jboss.ejb.plugins.cmp.jdbc2.bridge.JDBCEntityBridge2


         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

/* 273 */     return pctx.isDirty();
/*     */   }
/*     */
/*     */   public boolean isModified(EntityEnterpriseContext instance)
/*     */   {
/* 278 */     PersistentContext pctx = (PersistentContext)instance.getPersistenceContext();
/* 279 */     boolean modified = pctx.isDirty();
/*     */
/* 281 */     if ((!modified) && (this.cmrFields != null))
/*     */     {
/* 283 */       for (int i = 0; i < this.cmrFields.length; i++)
/*     */       {
/* 285 */         JDBCCMRFieldBridge2.FieldState cmrState = pctx.getCMRState(i);
/* 286 */         if ((cmrState == null) || (!cmrState.isModified()))
/*     */           continue;
/* 288 */         modified = true;
/* 289 */         break;
/*     */       }
View Full Code Here

/* 1033 */       return this.value;
/*      */     }
/*      */
/*      */     public void cacheValue(EntityEnterpriseContext ctx)
/*      */     {
/* 1038 */       PersistentContext pctx = (PersistentContext)ctx.getPersistenceContext();
/* 1039 */       pctx.cacheRelations(JDBCCMRFieldBridge2.this.cmrIndex, this);
/*      */     }
View Full Code Here

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

/*  809 */       return this.value == null ? NULL_VALUE : this.value;
/*      */     }
/*      */
/*      */     public void cacheValue(EntityEnterpriseContext ctx)
/*      */     {
/*  814 */       PersistentContext pctx = (PersistentContext)ctx.getPersistenceContext();
/*  815 */       pctx.cacheRelations(JDBCCMRFieldBridge2.this.cmrIndex, this);
/*      */     }
View Full Code Here

TOP

Related Classes of org.jboss.ejb.plugins.cmp.jdbc2.bridge.JDBCEntityBridge2

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.