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

Examples of org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCFieldBridge


/* 1238 */     if (!node.isCMPField())
/*      */     {
/* 1240 */       throw new IllegalStateException("Can only visit cmp valued path node. Should have been handled at a higher level.");
/*      */     }
/*      */
/* 1244 */     JDBCFieldBridge cmpField = node.getCMPField();
/*      */
/* 1247 */     switch (node.type)
/*      */     {
/*      */     case 5:
/*      */     case 6:
/* 1251 */       if ((cmpField.getJDBCType().hasMapper()) || (cmpField.getJDBCType().getParameterSetter() != null))
/*      */       {
/*      */         break;
/*      */       }
/*      */
/*      */     case -1:
View Full Code Here


/*     */   {
/*  73 */     List parameters = new ArrayList();
/*  74 */     JDBCFieldBridge[] pkFields = entity.getPrimaryKeyFields();
/*  75 */     for (int i = 0; i < pkFields.length; i++)
/*     */     {
/*  77 */       JDBCFieldBridge pkField = pkFields[i];
/*     */
/*  79 */       JDBCType type = pkField.getJDBCType();
/*  80 */       if ((type instanceof JDBCTypeComplex))
/*     */       {
/*  82 */         JDBCTypeComplexProperty[] props = ((JDBCTypeComplex)type).getProperties();
/*     */
/*  84 */         for (int j = 0; j < props.length; j++)
View Full Code Here

/*     */   {
/* 112 */     List parameters = new ArrayList();
/* 113 */     JDBCFieldBridge[] pkFields = entity.getPrimaryKeyFields();
/* 114 */     for (int i = 0; i < pkFields.length; i++)
/*     */     {
/* 116 */       JDBCFieldBridge pkField = pkFields[i];
/*     */
/* 118 */       JDBCType type = pkField.getJDBCType();
/* 119 */       if ((type instanceof JDBCTypeComplex))
/*     */       {
/* 121 */         JDBCTypeComplexProperty[] props = ((JDBCTypeComplex)type).getProperties();
/* 122 */         for (int j = 0; j < props.length; j++)
/*     */         {
View Full Code Here

/* 357 */     if (entityBridge == null)
/*     */     {
/* 359 */       throw new IllegalArgumentException("Entity not found in application catalog with interface=" + intf.getName());
/*     */     }
/*     */
/* 363 */     JDBCFieldBridge cmpField = (JDBCFieldBridge)entityBridge.getFieldByName(fieldName);
/* 364 */     if (cmpField == null)
/*     */     {
/* 366 */       throw new IllegalArgumentException("cmpField not found: cmpFieldName=" + fieldName + " entityName=" + entityBridge.getEntityName());
/*     */     }
/*     */
View Full Code Here

/* 1107 */           return buf;
/*      */         }
/*      */       }
/*      */
/* 1111 */       String alias = this.aliasManager.getAlias(path.getPath(path.size() - 2));
/* 1112 */       JDBCFieldBridge field = (JDBCFieldBridge)path.getField();
/*      */
/* 1118 */       if (field.getJDBCType() == null)
/*      */       {
/* 1120 */         existsClause(path, buf, !node.not);
/* 1121 */         return buf;
/*      */       }
/*      */
View Full Code Here

/* 185 */             JDBCFieldBridge[] relatedFields = cmrField.getRelatedJDBCEntity().getTableFields();
/* 186 */             for (int i = 0; i < relatedFields.length; i++)
/*     */             {
/* 188 */               if (preloadMask[i] == 0)
/*     */                 continue;
/* 190 */               JDBCFieldBridge field = relatedFields[i];
/* 191 */               ref[0] = null;
/*     */
/* 194 */               index = field.loadArgumentResults(rs, index, ref);
/* 195 */               relatedReadAheadCache.addPreloadData(loadedFk, field, ref[0]);
/*     */             }
/*     */           }
/*     */
/*     */         }
View Full Code Here

/*      */     {
/*  788 */       JDBCFieldBridge[] parentFkFields = cmrField.getForeignKeyFields();
/*  789 */       int i = 0;
/*  790 */       while (i < parentFkFields.length)
/*      */       {
/*  792 */         JDBCFieldBridge parentField = parentFkFields[(i++)];
/*  793 */         JDBCFieldBridge childField = (JDBCFieldBridge)childEntity.getFieldByName(parentField.getFieldName());
/*  794 */         getJoinClause(parentField, parentAlias, childField, childAlias, buf);
/*  795 */         if (i < parentFkFields.length) {
/*  796 */           buf.append(" AND ");
/*      */         }
/*      */       }
/*      */     }
/*      */     else
/*      */     {
/*  802 */       JDBCFieldBridge[] childFkFields = cmrField.getRelatedCMRField().getForeignKeyFields();
/*  803 */       int i = 0;
/*  804 */       while (i < childFkFields.length)
/*      */       {
/*  806 */         JDBCFieldBridge childField = childFkFields[(i++)];
/*  807 */         JDBCFieldBridge parentField = (JDBCFieldBridge)parentEntity.getFieldByName(childField.getFieldName());
/*      */
/*  810 */         getJoinClause(parentField, parentAlias, childField, childAlias, buf);
/*  811 */         if (i >= childFkFields.length)
/*      */           continue;
/*  813 */         buf.append(" AND ");
View Full Code Here

/*      */
/*  830 */     JDBCFieldBridge[] parentFields = cmrField.getTableKeyFields();
/*  831 */     int i = 0;
/*  832 */     while (i < parentFields.length)
/*      */     {
/*  834 */       JDBCFieldBridge relationField = parentFields[(i++)];
/*  835 */       JDBCFieldBridge parentField = (JDBCFieldBridge)parentEntity.getFieldByName(relationField.getFieldName());
/*  836 */       getJoinClause(parentField, parentAlias, relationField, relationTableAlias, buf);
/*  837 */       if (i < parentFields.length)
/*  838 */         buf.append(" AND ");
/*      */     }
/*  840 */     return buf;
View Full Code Here

/*  612 */         JDBCFieldBridge[] tableFields = relatedEntity.getTableFields();
/*  613 */         for (int fieldInd = 0; fieldInd < tableFields.length; fieldInd++)
/*      */         {
/*  615 */           if (node.eagerLoadMask[fieldInd] == 0)
/*      */             continue;
/*  617 */           JDBCFieldBridge field = tableFields[fieldInd];
/*  618 */           ref[0] = null;
/*  619 */           index = field.loadArgumentResults(rs, index, ref);
/*      */
/*  621 */           if (!cacheRelatedData)
/*      */             continue;
/*  623 */           if (log.isTraceEnabled())
/*      */           {
/*  625 */             log.trace("Caching " + relatedEntity.getEntityName() + '[' + relatedId + "]." + field.getFieldName() + "=" + ref[0]);
/*      */           }
/*      */
/*  632 */           relatedCache.addPreloadData(relatedId, field, ref[0]);
/*      */         }
/*      */
View Full Code Here

/* 1044 */               JDBCFieldBridge[] tableFields = this.selectEntity.getTableFields();
/* 1045 */               for (int i = 0; i < this.eagerLoadMask.length; i++)
/*      */               {
/* 1047 */                 if (this.eagerLoadMask[i] == 0)
/*      */                   continue;
/* 1049 */                 JDBCFieldBridge field = tableFields[i];
/* 1050 */                 this.ref[0] = null;
/*      */
/* 1053 */                 index = field.loadArgumentResults(this.rs, index, this.ref);
/*      */
/* 1055 */                 if (!addPk)
/*      */                   continue;
/* 1057 */                 selectReadAheadCache.addPreloadData(this.curPk, field, this.ref[0]);
/*      */               }
View Full Code Here

TOP

Related Classes of org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCFieldBridge

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.