Examples of JDBCReadAheadMetaData


Examples of org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCReadAheadMetaData

/*     */     {
/*  76 */       JDBCEntityBridge selectEntity = (JDBCEntityBridge)compiler.getSelectEntity();
/*     */
/*  79 */       setSelectEntity(selectEntity);
/*     */
/*  82 */       JDBCReadAheadMetaData readahead = metadata.getReadAhead();
/*  83 */       if (readahead.isOnFind())
/*     */       {
/*  85 */         setEagerLoadGroup(readahead.getEagerLoadGroup());
/*  86 */         setOnFindCMRList(compiler.getLeftJoinCMRList());
/*     */
/*  89 */         if (compiler.isSelectDistinct())
/*     */         {
/*  91 */           boolean[] mask = getEagerLoadMask();
View Full Code Here

Examples of org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCReadAheadMetaData

/*     */     else
/*     */     {
/* 135 */       selectFunction = compiler.getSelectFunction();
/*     */     }
/*     */
/* 140 */     JDBCReadAheadMetaData readahead = this.metadata.getReadAhead();
/*     */     boolean[] mask;
/*     */     List leftJoinCMRList;
/* 141 */     if ((selectEntity != null) && (readahead.isOnFind()))
/*     */     {
/* 143 */       boolean[] mask = selectEntity.getLoadGroupMask(readahead.getEagerLoadGroup());
/* 144 */       boolean modifiedMask = false;
/* 145 */       List leftJoinCMRList = compiler.getLeftJoinCMRList();
/*     */
/* 148 */       if (compiler.isSelectDistinct())
/*     */       {
View Full Code Here

Examples of org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCReadAheadMetaData

/*     */
/*     */         }
/*     */
/*     */       }
/*     */
/* 203 */       JDBCReadAheadMetaData readAhead = relatedCMRField.getReadAhead();
/* 204 */       for (iter = resultsMap.keySet().iterator(); iter.hasNext(); )
/*     */       {
/* 206 */         Object key = iter.next();
/*     */
/* 209 */         List results = (List)resultsMap.get(key);
View Full Code Here

Examples of org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCReadAheadMetaData

/* 284 */       if (!entry.readahead.isNone())
/*     */       {
/* 286 */         this.listCache.promote(entry.results);
/*     */       }
/*     */
/* 290 */       JDBCReadAheadMetaData readahead = entry.readahead;
/* 291 */       if (readahead == null)
/*     */       {
/* 293 */         readahead = this.manager.getMetaData().getReadAhead();
/*     */       }
/*     */
/* 296 */       int from = entry.index;
/* 297 */       int to = Math.min(entry.results.size(), entry.index + readahead.getPageSize());
/* 298 */       List loadKeys = entry.results.subList(from, to);
/*     */
/* 300 */       return new EntityReadAheadInfo(loadKeys, readahead, null);
/*     */     }
/*     */
View Full Code Here

Examples of org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCReadAheadMetaData

/*     */       try
/*     */       {
/* 157 */         Method method = homeClass.getMethod("findByPrimaryKey", new Class[] { entity.getPrimaryKeyClass() });
/*     */
/* 159 */         JDBCQueryMetaData findByPKMD = this.manager.getMetaData().getQueryMetaDataForMethod(method);
/* 160 */         JDBCReadAheadMetaData readAhead = findByPKMD == null ? entity.getMetaData().getReadAhead() : findByPKMD.getReadAhead();
/*     */
/* 164 */         JDBCQueryMetaData q = new JDBCAutomaticQueryMetaData(method, readAhead, entity.getMetaData().getQLCompiler(), false);
/*     */
/* 170 */         this.knownQueries.put(method, factory.createFindByPrimaryKeyQuery(q));
/*     */
/* 172 */         if (log.isDebugEnabled())
/* 173 */           log.debug("Added findByPrimaryKey query command for home interface");
/*     */       }
/*     */       catch (NoSuchMethodException e) {
/* 176 */         throw new DeploymentException("Home interface does not have a findByPrimaryKey method");
/*     */       }
/*     */     }
/*     */
/* 180 */     if (localHomeClass != null)
/*     */     {
/*     */       Method method;
/*     */       try
/*     */       {
/* 187 */         method = localHomeClass.getMethod("findByPrimaryKey", new Class[] { entity.getPrimaryKeyClass() });
/*     */       }
/*     */       catch (NoSuchMethodException e) {
/* 190 */         throw new DeploymentException("Local home interface does not have the method findByPrimaryKey(" + entity.getPrimaryKeyClass().getName() + ")");
/*     */       }
/*     */
/* 196 */       JDBCQueryMetaData findByPKMD = this.manager.getMetaData().getQueryMetaDataForMethod(method);
/* 197 */       JDBCReadAheadMetaData readAhead = findByPKMD == null ? entity.getMetaData().getReadAhead() : findByPKMD.getReadAhead();
/*     */
/* 199 */       JDBCQueryMetaData q = new JDBCAutomaticQueryMetaData(method, readAhead, entity.getMetaData().getQLCompiler(), false);
/* 200 */       this.knownQueries.put(method, factory.createFindByPrimaryKeyQuery(q));
/*     */
/* 202 */       if (log.isDebugEnabled()) {
View Full Code Here

Examples of org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCReadAheadMetaData

/*  76 */     SQLUtil.getColumnNamesClause(entity.getPrimaryKeyFields(), alias, select);
/*     */
/*  78 */     StringBuffer from = new StringBuffer();
/*  79 */     from.append(entity.getQualifiedTableName()).append(' ').append(alias);
/*     */
/*  84 */     JDBCReadAheadMetaData readAhead = q.getReadAhead();
/*  85 */     if (readAhead.isOnFind())
/*     */     {
/*  87 */       setEagerLoadGroup(readAhead.getEagerLoadGroup());
/*  88 */       if (getEagerLoadMask() != null)
/*     */       {
/*  90 */         SQLUtil.appendColumnNamesClause(entity.getTableFields(), getEagerLoadMask(), alias, select);
/*     */
/*  92 */         List onFindCMRList = JDBCAbstractQueryCommand.getLeftJoinCMRNodes(entity, entity.getQualifiedTableName(), readAhead.getLeftJoins(), null);
/*     */
/*  95 */         if (!onFindCMRList.isEmpty())
/*     */         {
/*  97 */           setOnFindCMRList(onFindCMRList);
/*  98 */           JDBCAbstractQueryCommand.leftJoinCMRNodes(alias, onFindCMRList, aliasManager, from);
/*  99 */           JDBCAbstractQueryCommand.appendLeftJoinCMRColumnNames(onFindCMRList, aliasManager, select);
/*     */         }
/*     */       }
/*     */     }
/*     */
/* 104 */     StringBuffer where = new StringBuffer();
/* 105 */     SQLUtil.getWhereClause(entity.getPrimaryKeyFields(), alias, where);
/*     */
/* 108 */     StringBuffer sql = new StringBuffer(300);
/* 109 */     if ((this.rowLocking) && (readAhead.isOnFind()) && (getEagerLoadMask() != null))
/*     */     {
/* 111 */       JDBCFunctionMappingMetaData rowLockingTemplate = typeMapping.getRowLockingTemplate();
/* 112 */       rowLockingTemplate.getFunctionSql(new Object[] { select, from, where.length() == 0 ? null : where, null }, sql);
/*     */     }
/*     */     else
View Full Code Here

Examples of org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCReadAheadMetaData

/*    */   {
/* 45 */     super(manager, q);
/*    */
/* 47 */     JDBCEntityBridge entity = (JDBCEntityBridge)manager.getEntityBridge();
/*    */
/* 50 */     JDBCReadAheadMetaData readAhead = q.getReadAhead();
/* 51 */     if (readAhead.isOnFind())
/*    */     {
/* 53 */       setEagerLoadGroup(readAhead.getEagerLoadGroup());
/*    */     }
/*    */
/* 57 */     StringBuffer sql = new StringBuffer(300);
/* 58 */     sql.append("SELECT ");
/*    */
View Full Code Here

Examples of org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCReadAheadMetaData

/*     */     {
/*  79 */       JDBCEntityBridge selectEntity = (JDBCEntityBridge)compiler.getSelectEntity();
/*     */
/*  82 */       setSelectEntity(selectEntity);
/*     */
/*  85 */       JDBCReadAheadMetaData readahead = metadata.getReadAhead();
/*  86 */       if (readahead.isOnFind())
/*     */       {
/*  88 */         setEagerLoadGroup(readahead.getEagerLoadGroup());
/*  89 */         setOnFindCMRList(compiler.getLeftJoinCMRList());
/*     */
/*  92 */         if (compiler.isSelectDistinct())
/*     */         {
/*  94 */           boolean[] mask = getEagerLoadMask();
View Full Code Here

Examples of org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCReadAheadMetaData

/*     */
/*  61 */     this.metadata = ((JDBCDeclaredQueryMetaData)q);
/*     */
/*  64 */     initSelectObject(manager);
/*     */
/*  67 */     JDBCReadAheadMetaData readAhead = this.metadata.getReadAhead();
/*  68 */     JDBCEntityBridge selectEntity = getSelectEntity();
/*  69 */     if ((selectEntity != null) && (readAhead.isOnFind()))
/*     */     {
/*  71 */       setEagerLoadGroup(readAhead.getEagerLoadGroup());
/*     */     }
/*     */
/*  75 */     String sql = buildSQL();
/*  76 */     setSQL(parseParameters(sql));
/*     */   }
View Full Code Here

Examples of org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCReadAheadMetaData

/* 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 ");
/*    */
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.