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

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


                         JDBCQueryMetaData q)
      throws DeploymentException
   {
      super(manager, q);

      JDBCQlQueryMetaData metadata = (JDBCQlQueryMetaData) q;
      if(getLog().isDebugEnabled())
      {
         getLog().debug("EJB-QL: " + metadata.getEjbQl());
      }

      QLCompiler compiler = JDBCQueryManager.getInstance(metadata.getQLCompilerClass(), manager.getCatalog());

      try
      {
         compiler.compileEJBQL(
            metadata.getEjbQl(),
            metadata.getMethod().getReturnType(),
            metadata.getMethod().getParameterTypes(),
            metadata);
      }
      catch(Throwable t)
      {
         log.error(t.getMessage(), t);
         throw new DeploymentException("Error compiling EJB-QL statement for EJB '" +
            manager.getContainer().getBeanMetaData().getEjbName() + "': " + metadata.getEjbQl(), t);
      }

      setSQL(compiler.getSQL());

      // set select object
      if(compiler.isSelectEntity())
      {
         JDBCEntityBridge selectEntity = (JDBCEntityBridge) compiler.getSelectEntity();

         // set the select entity
         setSelectEntity(selectEntity);

         // set the preload fields
         JDBCReadAheadMetaData readahead = metadata.getReadAhead();
         if(readahead.isOnFind())
         {
            setEagerLoadGroup(readahead.getEagerLoadGroup());
            setOnFindCMRList(compiler.getLeftJoinCMRList());
View Full Code Here


/*     */   public JDBCEJBQLQuery(JDBCStoreManager manager, JDBCQueryMetaData q)
/*     */     throws DeploymentException
/*     */   {
/*  46 */     super(manager, q);
/*     */
/*  48 */     JDBCQlQueryMetaData metadata = (JDBCQlQueryMetaData)q;
/*  49 */     if (getLog().isDebugEnabled())
/*     */     {
/*  51 */       getLog().debug("EJB-QL: " + metadata.getEjbQl());
/*     */     }
/*     */
/*  54 */     QLCompiler compiler = JDBCQueryManager.getInstance(metadata.getQLCompilerClass(), manager.getCatalog());
/*     */     try
/*     */     {
/*  58 */       compiler.compileEJBQL(metadata.getEjbQl(), metadata.getMethod().getReturnType(), metadata.getMethod().getParameterTypes(), metadata);
/*     */     }
/*     */     catch (Throwable t)
/*     */     {
/*  66 */       this.log.error(t.getMessage(), t);
/*  67 */       throw new DeploymentException("Error compiling EJB-QL statement for EJB '" + manager.getContainer().getBeanMetaData().getEjbName() + "': " + metadata.getEjbQl(), t);
/*     */     }
/*     */
/*  71 */     setSQL(compiler.getSQL());
/*     */
/*  74 */     if (compiler.isSelectEntity())
/*     */     {
/*  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());
/*     */
View Full Code Here

TOP

Related Classes of org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCQlQueryMetaData

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.