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

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


/*  764 */     return buf;
/*      */   }
/*      */
/*      */   public static StringBuffer getJoinClause(JDBCAbstractCMRFieldBridge cmrField, String parentAlias, String childAlias, StringBuffer buf)
/*      */   {
/*  779 */     JDBCAbstractEntityBridge parentEntity = cmrField.getEntity();
/*  780 */     JDBCAbstractEntityBridge childEntity = (JDBCAbstractEntityBridge)cmrField.getRelatedEntity();
/*      */
/*  785 */     if (cmrField.hasForeignKey())
/*      */     {
/*  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 ");
/*      */         }
/*      */       }
View Full Code Here


/*  817 */     return buf;
/*      */   }
/*      */
/*      */   public static StringBuffer getRelationTableJoinClause(JDBCAbstractCMRFieldBridge cmrField, String parentAlias, String relationTableAlias, StringBuffer buf)
/*      */   {
/*  825 */     JDBCAbstractEntityBridge parentEntity = cmrField.getEntity();
/*      */
/*  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

TOP

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

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.