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

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


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

      JDBCJBossQLQueryMetaData metadata = (JDBCJBossQLQueryMetaData)q;
      if(getLog().isDebugEnabled())
      {
         getLog().debug("JBossQL: " + metadata.getJBossQL());
      }

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

      try
      {
         compiler.compileJBossQL(
            metadata.getJBossQL(),
            metadata.getMethod().getReturnType(),
            metadata.getMethod().getParameterTypes(),
            metadata);
      }
      catch(Throwable t)
      {
         t.printStackTrace();
         throw new DeploymentException("Error compiling JBossQL " +
            "statement '" + metadata.getJBossQL() + "'", t);
      }

      setSQL(compiler.getSQL());
      setOffsetParam(compiler.getOffsetParam());
      setOffsetValue(compiler.getOffsetValue());
      setLimitParam(compiler.getLimitParam());
      setLimitValue(compiler.getLimitValue());

      // 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 JDBCJBossQLQuery(JDBCStoreManager manager, JDBCQueryMetaData q)
/*     */     throws DeploymentException
/*     */   {
/*  45 */     super(manager, q);
/*     */
/*  47 */     JDBCJBossQLQueryMetaData metadata = (JDBCJBossQLQueryMetaData)q;
/*  48 */     if (getLog().isDebugEnabled())
/*     */     {
/*  50 */       getLog().debug("JBossQL: " + metadata.getJBossQL());
/*     */     }
/*     */
/*  53 */     QLCompiler compiler = JDBCQueryManager.getInstance(metadata.getQLCompilerClass(), manager.getCatalog());
/*     */     try
/*     */     {
/*  57 */       compiler.compileJBossQL(metadata.getJBossQL(), metadata.getMethod().getReturnType(), metadata.getMethod().getParameterTypes(), metadata);
/*     */     }
/*     */     catch (Throwable t)
/*     */     {
/*  65 */       t.printStackTrace();
/*  66 */       throw new DeploymentException("Error compiling JBossQL statement '" + metadata.getJBossQL() + "'", t);
/*     */     }
/*     */
/*  70 */     setSQL(compiler.getSQL());
/*  71 */     setOffsetParam(compiler.getOffsetParam());
/*  72 */     setOffsetValue(compiler.getOffsetValue());
/*  73 */     setLimitParam(compiler.getLimitParam());
/*  74 */     setLimitValue(compiler.getLimitValue());
/*     */
/*  77 */     if (compiler.isSelectEntity())
/*     */     {
/*  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());
/*     */
View Full Code Here

TOP

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

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.