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

Examples of org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCEntityBridge$EntityState$MaskFieldIterator


/*  92 */       return;
/*     */     }
/*     */
/*  95 */     Catalog catalog = manager.getCatalog();
/*     */
/*  97 */     JDBCEntityBridge entity = (JDBCEntityBridge)catalog.getEntityByEJBName(entityName);
/*  98 */     if (entity == null)
/*     */     {
/* 100 */       throw new DeploymentException("Unknown entity: " + entityName);
/*     */     }
/*     */
/* 103 */     String fieldName = this.metadata.getFieldName();
/* 104 */     if (fieldName == null)
/*     */     {
/* 106 */       setSelectEntity(entity);
/*     */     }
/*     */     else
/*     */     {
/* 110 */       JDBCCMPFieldBridge field = entity.getCMPFieldByName(fieldName);
/* 111 */       if (field == null)
/*     */       {
/* 113 */         throw new DeploymentException("Unknown cmp field: " + fieldName);
/*     */       }
/* 115 */       setSelectField(field);
View Full Code Here


/*    */   public JDBCFindByQuery(JDBCStoreManager manager, JDBCQueryMetaData q)
/*    */     throws DeploymentException
/*    */   {
/* 52 */     super(manager, q);
/*    */
/* 54 */     JDBCEntityBridge entity = (JDBCEntityBridge)manager.getEntityBridge();
/*    */
/* 56 */     String finderName = q.getMethod().getName();
/*    */
/* 60 */     String cmpFieldName = Character.toLowerCase(finderName.charAt(6)) + finderName.substring(7);
/*    */
/* 63 */     this.cmpField = entity.getCMPFieldByName(cmpFieldName);
/* 64 */     if (this.cmpField == null)
/*    */     {
/* 66 */       throw new IllegalArgumentException("No finder for this method: " + finderName);
/*    */     }
/*    */
/* 71 */     JDBCReadAheadMetaData readAhead = q.getReadAhead();
/* 72 */     if (readAhead.isOnFind())
/*    */     {
/* 74 */       setEagerLoadGroup(readAhead.getEagerLoadGroup());
/*    */     }
/*    */
/* 78 */     StringBuffer sql = new StringBuffer(300);
/* 79 */     sql.append("SELECT ");
/*    */
/* 81 */     SQLUtil.getColumnNamesClause(entity.getPrimaryKeyFields(), sql);
/* 82 */     if (getEagerLoadGroup() != null)
/*    */     {
/* 84 */       SQLUtil.appendColumnNamesClause(entity, getEagerLoadGroup(), sql);
/*    */     }
/* 86 */     sql.append(" FROM ").append(entity.getQualifiedTableName()).append(" WHERE ");
/*    */
/* 89 */     SQLUtil.getWhereClause(this.cmpField, sql);
/*    */
/* 91 */     setSQL(sql.toString());
/* 92 */     setParameterList(QueryParameter.createParameters(0, this.cmpField));
View Full Code Here

TOP

Related Classes of org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCEntityBridge$EntityState$MaskFieldIterator

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.