Package org.apache.cayenne.ejbql.parser

Examples of org.apache.cayenne.ejbql.parser.EJBQLNamedInputParameter


            // We rewrite expression "parameter = :x" where x=null
            // as "parameter IS NULL"
            // BUT in such as ":x = parameter" (where x=null) we don't do anything
            // as a result it can be unsupported in some DB
            if (expression.getChild(1) instanceof EJBQLNamedInputParameter) {
                EJBQLNamedInputParameter par = (EJBQLNamedInputParameter) expression
                        .getChild(1);
                if (context.namedParameters.containsKey(par.getText())
                        && context.namedParameters.get(par.getText()) == null) {
                    context.append(toAppend);
                    return true;
                }
            }
            else if (expression.getChild(1) instanceof EJBQLPositionalInputParameter) {
                EJBQLPositionalInputParameter par = (EJBQLPositionalInputParameter) expression
                        .getChild(1);
                if (context.positionalParameters.containsKey(par.getPosition())
                        && context.positionalParameters.get(par.getPosition()) == null) {
                    context.append(toAppend);
                    return true;
                }
            }
        }
View Full Code Here


            // We rewrite expression "parameter = :x" where x=null
            // as "parameter IS NULL"
            // BUT in such as ":x = parameter" (where x=null) we don't do anything
            // as a result it can be unsupported in some DB
            if (expression.getChild(1) instanceof EJBQLNamedInputParameter) {
                EJBQLNamedInputParameter par = (EJBQLNamedInputParameter) expression
                        .getChild(1);
                if (context.namedParameters.containsKey(par.getText())
                        && context.namedParameters.get(par.getText()) == null) {
                    context.append(toAppend);
                    return true;
                }
            }
            else if (expression.getChild(1) instanceof EJBQLPositionalInputParameter) {
                EJBQLPositionalInputParameter par = (EJBQLPositionalInputParameter) expression
                        .getChild(1);
                if (context.positionalParameters.containsKey(par.getPosition())
                        && context.positionalParameters.get(par.getPosition()) == null) {
                    context.append(toAppend);
                    return true;
                }
            }
        }
View Full Code Here

                    // We rewrite expression "parameter = :x" where x=null
                    // as "parameter IS NULL"
                    // BUT in such as ":x = parameter" (where x=null) we don't do anything
                    // as a result it can be unsupported in some DB
                    if (expression.getChild(1) instanceof EJBQLNamedInputParameter) {
                        EJBQLNamedInputParameter par = (EJBQLNamedInputParameter) expression
                                .getChild(1);
                        if (context.namedParameters.containsKey(par.getText())
                                && context.namedParameters.get(par.getText()) == null) {
                            context.append(" IS NULL");
                            return false;
                        }
                    }
                }
View Full Code Here

            // We rewrite expression "parameter = :x" where x=null
            // as "parameter IS NULL"
            // BUT in such as ":x = parameter" (where x=null) we don't do anything
            // as a result it can be unsupported in some DB
            if (expression.getChild(1) instanceof EJBQLNamedInputParameter) {
                EJBQLNamedInputParameter par = (EJBQLNamedInputParameter) expression
                        .getChild(1);
                if (context.namedParameters.containsKey(par.getText())
                        && context.namedParameters.get(par.getText()) == null) {
                    context.append(toAppend);
                    return true;
                }
            }
            else if (expression.getChild(1) instanceof EJBQLPositionalInputParameter) {
                EJBQLPositionalInputParameter par = (EJBQLPositionalInputParameter) expression
                        .getChild(1);
                if (context.positionalParameters.containsKey(par.getPosition())
                        && context.positionalParameters.get(par.getPosition()) == null) {
                    context.append(toAppend);
                    return true;
                }
            }
        }
View Full Code Here

            // as "parameter IS NULL"
            // BUT in such as ":x = parameter" (where x=null) we don't do
            // anything
            // as a result it can be unsupported in some DB
            if (expression.getChild(1) instanceof EJBQLNamedInputParameter) {
                EJBQLNamedInputParameter par = (EJBQLNamedInputParameter) expression.getChild(1);
                if (context.namedParameters.containsKey(par.getText())
                        && context.namedParameters.get(par.getText()) == null) {
                    context.append(toAppend);
                    return true;
                }
            } else if (expression.getChild(1) instanceof EJBQLPositionalInputParameter) {
                EJBQLPositionalInputParameter par = (EJBQLPositionalInputParameter) expression.getChild(1);
                if (context.positionalParameters.containsKey(par.getPosition())
                        && context.positionalParameters.get(par.getPosition()) == null) {
                    context.append(toAppend);
                    return true;
                }
            }
        }
View Full Code Here

            // We rewrite expression "parameter = :x" where x=null
            // as "parameter IS NULL"
            // BUT in such as ":x = parameter" (where x=null) we don't do anything
            // as a result it can be unsupported in some DB
            if (expression.getChild(1) instanceof EJBQLNamedInputParameter) {
                EJBQLNamedInputParameter par = (EJBQLNamedInputParameter) expression
                        .getChild(1);
                if (context.namedParameters.containsKey(par.getText())
                        && context.namedParameters.get(par.getText()) == null) {
                    context.append(toAppend);
                    return true;
                }
            }
            else if (expression.getChild(1) instanceof EJBQLPositionalInputParameter) {
                EJBQLPositionalInputParameter par = (EJBQLPositionalInputParameter) expression
                        .getChild(1);
                if (context.positionalParameters.containsKey(par.getPosition())
                        && context.positionalParameters.get(par.getPosition()) == null) {
                    context.append(toAppend);
                    return true;
                }
            }
        }
View Full Code Here

            // We rewrite expression "parameter = :x" where x=null
            // as "parameter IS NULL"
            // BUT in such as ":x = parameter" (where x=null) we don't do anything
            // as a result it can be unsupported in some DB
            if (expression.getChild(1) instanceof EJBQLNamedInputParameter) {
                EJBQLNamedInputParameter par = (EJBQLNamedInputParameter) expression
                        .getChild(1);
                if (context.namedParameters.containsKey(par.getText())
                        && context.namedParameters.get(par.getText()) == null) {
                    context.append(toAppend);
                    return true;
                }
            }
            else if (expression.getChild(1) instanceof EJBQLPositionalInputParameter) {
                EJBQLPositionalInputParameter par = (EJBQLPositionalInputParameter) expression
                        .getChild(1);
                if (context.positionalParameters.containsKey(par.getPosition())
                        && context.positionalParameters.get(par.getPosition()) == null) {
                    context.append(toAppend);
                    return true;
                }
            }
        }
View Full Code Here

TOP

Related Classes of org.apache.cayenne.ejbql.parser.EJBQLNamedInputParameter

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.