Examples of JDBCCMPFieldBridge2


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

/*      */
/*  285 */     this.updateSql = ("update " + this.tableName + " set ");
/*  286 */     int setFields = 0;
/*  287 */     for (int i = 0; i < tableFields.length; i++)
/*      */     {
/*  289 */       JDBCCMPFieldBridge2 field = tableFields[i];
/*  290 */       if (field.isPrimaryKeyMember())
/*      */         continue;
/*  292 */       if (setFields++ > 0)
/*      */       {
/*  294 */         this.updateSql += ", ";
/*      */       }
/*  296 */       this.updateSql = (this.updateSql + field.getColumnName() + "=?");
/*      */     }
/*      */
/*  299 */     this.updateSql += " where ";
/*  300 */     this.updateSql = (this.updateSql + pkFields[0].getColumnName() + "=?");
/*  301 */     for (int i = 1; i < pkFields.length; i++)
/*      */     {
/*  303 */       this.updateSql = (this.updateSql + " and " + pkFields[i].getColumnName() + "=?");
/*      */     }
/*      */
/*  306 */     if (this.entity.getVersionField() != null)
/*      */     {
/*  308 */       this.updateSql = (this.updateSql + " and " + this.entity.getVersionField().getColumnName() + "=?");
/*      */     }
/*  310 */     this.log.debug("update sql: " + this.updateSql);
/*      */
/*  313 */     String selectColumns = tableFields[0].getColumnName();
/*  314 */     for (int i = 1; i < tableFields.length; i++)
/*      */     {
/*  316 */       JDBCCMPFieldBridge2 field = tableFields[i];
/*  317 */       selectColumns = selectColumns + ", " + field.getColumnName();
/*      */     }
/*      */
/*  320 */     String whereColumns = pkFields[0].getColumnName() + "=?";
/*  321 */     for (int i = 1; i < pkFields.length; i++)
/*      */     {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.