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

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


   }

   public Object visit(ASTMod node, Object data)
   {
      StringBuffer buf = (StringBuffer) data;
      JDBCFunctionMappingMetaData function = typeMapping.getFunctionMapping(JDBCTypeMappingMetaData.MOD);
      Object[] args = childrenToStringArr(2, node);
      function.getFunctionSql(args, buf);
      return data;
   }
View Full Code Here


                    " " + getColumnTimerInterval() + " " + longType + "," +
                    " " + getColumnInstancePK() + " " + objectType + "," +
                    " " + getColumnInfo() + " " + objectType + ", ");

            // Add the primary key constraint using the pk-constraint-template
            JDBCFunctionMappingMetaData pkConstraint = typeMapping.getPkConstraintTemplate();
            String name = SQLUtil.unquote(getTableName(), ds) + "_PK";
            name = SQLUtil.fixConstraintName(name, ds);
            String[] templateParams = new String[] {
                  name,
                  getColumnTimerID() + ", " + getColumnTargetID()
                  };
            pkConstraint.getFunctionSql(templateParams, createTableDDL);
           
            // Complete the statement
            createTableDDL.append(" )");

            log.debug("Executing DDL: " + createTableDDL);
View Full Code Here

      }

      StringBuffer buf = (StringBuffer) data;
      if(selectManager.getMetaData().hasRowLocking())
      {
         JDBCFunctionMappingMetaData rowLockingTemplate = typeMapping.getRowLockingTemplate();
         Object args[] = new Object[]{
            select,
            from,
            where.length() == 0 ? null : where,
            orderBy.length() == 0 ? null : orderBy
         };
         rowLockingTemplate.getFunctionSql(args, buf);
      }
      else
      {
         buf.append(SQLUtil.SELECT)
            .append(select)
View Full Code Here

    * Type-mapping function translation
    */
   public Object visit(ASTConcat node, Object data)
   {
      StringBuffer buf = (StringBuffer) data;
      JDBCFunctionMappingMetaData function = typeMapping.getFunctionMapping(JDBCTypeMappingMetaData.CONCAT);
      Object[] args = new Object[]{
         new NodeStringWrapper(node.jjtGetChild(0)),
         new NodeStringWrapper(node.jjtGetChild(1)),
      };
      function.getFunctionSql(args, buf);
      return buf;
   }
View Full Code Here

    * Type-mapping function translation
    */
   public Object visit(ASTSubstring node, Object data)
   {
      StringBuffer buf = (StringBuffer) data;
      JDBCFunctionMappingMetaData function = typeMapping.getFunctionMapping(JDBCTypeMappingMetaData.SUBSTRING);
      Object[] args = new Object[]{
         new NodeStringWrapper(node.jjtGetChild(0)),
         new NodeStringWrapper(node.jjtGetChild(1)),
         new NodeStringWrapper(node.jjtGetChild(2)),
      };
      function.getFunctionSql(args, buf);
      return buf;
   }
View Full Code Here

    * Type-mapping function translation
    */
   public Object visit(ASTLCase node, Object data)
   {
      StringBuffer buf = (StringBuffer) data;
      JDBCFunctionMappingMetaData function = typeMapping.getFunctionMapping(JDBCTypeMappingMetaData.LCASE);
      Object[] args = new Object[]{
         new NodeStringWrapper(node.jjtGetChild(0)),
      };
      function.getFunctionSql(args, buf);
      return buf;
   }
View Full Code Here

    * Type-mapping function translation
    */
   public Object visit(ASTUCase node, Object data)
   {
      StringBuffer buf = (StringBuffer) data;
      JDBCFunctionMappingMetaData function = typeMapping.getFunctionMapping(JDBCTypeMappingMetaData.UCASE);
      Object[] args = new Object[]{
         new NodeStringWrapper(node.jjtGetChild(0)),
      };
      function.getFunctionSql(args, buf);
      return buf;
   }
View Full Code Here

    * Type-mapping function translation
    */
   public Object visit(ASTLength node, Object data)
   {
      StringBuffer buf = (StringBuffer) data;
      JDBCFunctionMappingMetaData function = typeMapping.getFunctionMapping(JDBCTypeMappingMetaData.LENGTH);
      Object[] args = new Object[]{
         new NodeStringWrapper(node.jjtGetChild(0)),
      };
      function.getFunctionSql(args, buf);
      return buf;
   }
View Full Code Here

    */
   public Object visit(ASTLocate node, Object data)
   {
      StringBuffer buf = (StringBuffer) data;

      JDBCFunctionMappingMetaData function = typeMapping.getFunctionMapping(JDBCTypeMappingMetaData.LOCATE);
      Object[] args = new Object[3];
      args[0] = new NodeStringWrapper(node.jjtGetChild(0));
      args[1] = new NodeStringWrapper(node.jjtGetChild(1));
      if(node.jjtGetNumChildren() == 3)
      {
         args[2] = new NodeStringWrapper(node.jjtGetChild(2));
      }
      else
      {
         args[2] = "1";
      }

      // add the sql to the current buffer
      function.getFunctionSql(args, buf);
      return buf;
   }
View Full Code Here

    * Type-mapping function translation
    */
   public Object visit(ASTAbs node, Object data)
   {
      StringBuffer buf = (StringBuffer) data;
      JDBCFunctionMappingMetaData function = typeMapping.getFunctionMapping(JDBCTypeMappingMetaData.ABS);
      Object[] args = new Object[]{
         new NodeStringWrapper(node.jjtGetChild(0)),
      };
      function.getFunctionSql(args, buf);
      return buf;
   }
View Full Code Here

TOP

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

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.