Package org.jboss.as.cmp.jdbc.metadata

Examples of org.jboss.as.cmp.jdbc.metadata.JDBCFunctionMappingMetaData


    /**
     * 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

     * Type-mapping function translation
     */
    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

    /**
     * Type-mapping function translation
     */
    public Object visit(ASTMod node, Object data) {
        StringBuffer buf = (StringBuffer) data;
        JDBCFunctionMappingMetaData function = typeMapping.getFunctionMapping(JDBCTypeMappingMetaData.MOD);
        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(ASTSqrt node, Object data) {
        StringBuffer buf = (StringBuffer) data;
        JDBCFunctionMappingMetaData function = typeMapping.getFunctionMapping(JDBCTypeMappingMetaData.SQRT);
        Object[] args = new Object[]{
                new NodeStringWrapper(node.jjtGetChild(0))
        };
        function.getFunctionSql(args, buf);
        return buf;
    }
View Full Code Here

            select.insert(0, SQLUtil.DISTINCT);
        }

        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)
                    .append(SQLUtil.FROM)
                    .append(from);
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

TOP

Related Classes of org.jboss.as.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.