net.sf.csutils.core.query.tree
Class NodeFactory

java.lang.Object
  extended by net.sf.csutils.core.query.tree.NodeFactory

public abstract class NodeFactory
extends java.lang.Object


Constructor Summary
NodeFactory()
           
 
Method Summary
 AdditiveExpression addExpression(java.lang.Object pItem1, java.lang.Object pItem2)
           
 Identifier allTypes()
           
 And and(java.lang.Object pItem1, java.lang.Object pItem2)
           
 Concatenation concatenate(java.lang.Object pItem1, java.lang.Object pItem2)
          Creates the concatenation of the given items
 MultiplicativeExpression divideExpression(java.lang.Object pItem1, java.lang.Object pItem2)
           
 java.lang.Double doubleConstant(java.lang.String pNumber)
           
 Eq eq(java.lang.Object pItem1, java.lang.Object pItem2)
          Creates a check for equality.
abstract  antlr.RecognitionException error(java.lang.String pMessage)
           
 java.lang.Boolean falseConstant()
           
 java.lang.Float floatConstant(java.lang.String pNumber)
           
 Ge ge(java.lang.Object pItem1, java.lang.Object pItem2)
          Creates a check for "greater than, or equal to".
 Gt gt(java.lang.Object pItem1, java.lang.Object pItem2)
          Creates a check for "greater than".
 Identifier identifier(Identifier pId1, Identifier pId2)
          Concatenates the two identifiers.
 Identifier identifier(java.lang.String pPath)
          Creates a new identifier.
 In in(java.lang.Object pLhs, java.util.List<?> pRhs, boolean pNot)
           
 java.lang.Integer integerConstant(java.lang.String pNumber)
           
 IsEmpty isEmpty(java.lang.Object pObject)
           
 IsNull isNull(java.lang.Object pObject)
           
 Le le(java.lang.Object pItem1, java.lang.Object pItem2)
          Creates a check for "lower than, or equal to".
 Like like(java.lang.Object pItem1, java.lang.Object pItem2)
          Creates a check for LIKE.
 java.lang.Long longConstant(java.lang.String pNumber)
           
 Lt lt(java.lang.Object pItem1, java.lang.Object pItem2)
          Creates a check for "lower than".
 java.lang.Object methodCall(Identifier pId, java.util.List<java.lang.Object> pArgs)
           
 AdditiveExpression minusExpression(java.lang.Object pItem1, java.lang.Object pItem2)
           
 MultiplicativeExpression multiplyExpression(java.lang.Object pItem1, java.lang.Object pItem2)
           
 Parameter namedParameter(java.lang.String pName)
           
 NamespaceDeclarationSet namespaceDeclaration(NamespaceDeclarationSet pSet, java.lang.String pPrefix, java.lang.String pUri)
          Returns a set of namespace declarations, which include a mapping for the given prefix and URI.
 Ne ne(java.lang.Object pItem1, java.lang.Object pItem2)
          Creates a check for non-equality.
 java.lang.Object negate(java.lang.Object pItem)
           
 Negation notLike(java.lang.Object pItem1, java.lang.Object pItem2)
          Creates a check for NOT LIKE.
 Parameter numberedParameter(java.lang.String pNumber)
           
 void objectType(SelectStatement pStatement, ObjectType pObjectType)
          Adds the given object type (aka, a JOIN clause) to the select statements list of object types.
 ObjectType objectType(java.lang.String pName, java.lang.String pAlias)
          Creates a new ObjectType.
 Or or(java.lang.Object pItem1, java.lang.Object pItem2)
           
 Parameter parameter()
           
 SelectStatement selectStatement(NamespaceDeclarationSet pNamespaceDeclarations)
          Creates a SelectStatement with the given set of namespace declarations.
 java.lang.String stringConstant(java.lang.String pValue)
           
 java.lang.Boolean trueConstant()
           
 java.lang.Object unaryMinus(java.lang.Object pItem)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeFactory

public NodeFactory()
Method Detail

error

public abstract antlr.RecognitionException error(java.lang.String pMessage)

parameter

public Parameter parameter()

namedParameter

public Parameter namedParameter(java.lang.String pName)

numberedParameter

public Parameter numberedParameter(java.lang.String pNumber)
                            throws antlr.RecognitionException
Throws:
antlr.RecognitionException

identifier

public Identifier identifier(java.lang.String pPath)
Creates a new identifier.

Parameters:
pPath - The identifiers path.
Returns:
The new identifier.

identifier

public Identifier identifier(Identifier pId1,
                             Identifier pId2)
Concatenates the two identifiers.

Parameters:
pId1 - The prefix part of the identifiers path.
pId2 - The suffix part of the identifiers path.
Returns:
The new identifier.

objectType

public ObjectType objectType(java.lang.String pName,
                             java.lang.String pAlias)
Creates a new ObjectType.

Parameters:
pName - The object types name.
pAlias - The object types alias.
Returns:
The created object type.

or

public Or or(java.lang.Object pItem1,
             java.lang.Object pItem2)

and

public And and(java.lang.Object pItem1,
               java.lang.Object pItem2)

negate

public java.lang.Object negate(java.lang.Object pItem)

unaryMinus

public java.lang.Object unaryMinus(java.lang.Object pItem)

eq

public Eq eq(java.lang.Object pItem1,
             java.lang.Object pItem2)
Creates a check for equality.

Parameters:
pItem1 - The left hand side of the EQ clause.
pItem2 - The right hand side of the EQ clause.
Returns:
The created EQ clause.

like

public Like like(java.lang.Object pItem1,
                 java.lang.Object pItem2)
Creates a check for LIKE.

Parameters:
pItem1 - The left hand side of the LIKE clause.
pItem2 - The right hand side of the LIKE clause.
Returns:
The created LIKE clause.

notLike

public Negation notLike(java.lang.Object pItem1,
                        java.lang.Object pItem2)
Creates a check for NOT LIKE.

Parameters:
pItem1 - The left hand side of the NOT LIKE clause.
pItem2 - The right hand side of the NOT LIKE clause.
Returns:
The created NOT LIKE clause.

ne

public Ne ne(java.lang.Object pItem1,
             java.lang.Object pItem2)
Creates a check for non-equality.

Parameters:
pItem1 - The left hand side of the NE clause.
pItem2 - The right hand side of the NE clause.
Returns:
The created NE clause.

lt

public Lt lt(java.lang.Object pItem1,
             java.lang.Object pItem2)
Creates a check for "lower than".

Parameters:
pItem1 - The left hand side of the LT clause.
pItem2 - The right hand side of the LT clause.
Returns:
The created LT clause.

le

public Le le(java.lang.Object pItem1,
             java.lang.Object pItem2)
Creates a check for "lower than, or equal to".

Parameters:
pItem1 - The left hand side of the LE clause.
pItem2 - The right hand side of the LE clause.
Returns:
The created LE clause.

gt

public Gt gt(java.lang.Object pItem1,
             java.lang.Object pItem2)
Creates a check for "greater than".

Parameters:
pItem1 - The left hand side of the GT clause.
pItem2 - The right hand side of the GT clause.
Returns:
The created GT clause.

ge

public Ge ge(java.lang.Object pItem1,
             java.lang.Object pItem2)
Creates a check for "greater than, or equal to".

Parameters:
pItem1 - The left hand side of the GE clause.
pItem2 - The right hand side of the GE clause.
Returns:
The created GE clause.

concatenate

public Concatenation concatenate(java.lang.Object pItem1,
                                 java.lang.Object pItem2)
Creates the concatenation of the given items

Parameters:
pItem1 - The left hand side of the concatentation.
pItem2 - The right hand side of the concatenation.
Returns:
The created concatenation.

addExpression

public AdditiveExpression addExpression(java.lang.Object pItem1,
                                        java.lang.Object pItem2)

minusExpression

public AdditiveExpression minusExpression(java.lang.Object pItem1,
                                          java.lang.Object pItem2)

multiplyExpression

public MultiplicativeExpression multiplyExpression(java.lang.Object pItem1,
                                                   java.lang.Object pItem2)

divideExpression

public MultiplicativeExpression divideExpression(java.lang.Object pItem1,
                                                 java.lang.Object pItem2)

integerConstant

public java.lang.Integer integerConstant(java.lang.String pNumber)
                                  throws antlr.RecognitionException
Throws:
antlr.RecognitionException

floatConstant

public java.lang.Float floatConstant(java.lang.String pNumber)
                              throws antlr.RecognitionException
Throws:
antlr.RecognitionException

longConstant

public java.lang.Long longConstant(java.lang.String pNumber)
                            throws antlr.RecognitionException
Throws:
antlr.RecognitionException

doubleConstant

public java.lang.Double doubleConstant(java.lang.String pNumber)
                                throws antlr.RecognitionException
Throws:
antlr.RecognitionException

stringConstant

public java.lang.String stringConstant(java.lang.String pValue)
                                throws antlr.RecognitionException
Throws:
antlr.RecognitionException

trueConstant

public java.lang.Boolean trueConstant()

falseConstant

public java.lang.Boolean falseConstant()

objectType

public void objectType(SelectStatement pStatement,
                       ObjectType pObjectType)
                throws antlr.RecognitionException
Adds the given object type (aka, a JOIN clause) to the select statements list of object types.

Parameters:
pStatement - The select statement to modify
pObjectType - The JOIN clause to add.
Throws:
antlr.RecognitionException - The JOIN clauses alias isn't unique.

isNull

public IsNull isNull(java.lang.Object pObject)

isEmpty

public IsEmpty isEmpty(java.lang.Object pObject)

methodCall

public java.lang.Object methodCall(Identifier pId,
                                   java.util.List<java.lang.Object> pArgs)

selectStatement

public SelectStatement selectStatement(NamespaceDeclarationSet pNamespaceDeclarations)
Creates a SelectStatement with the given set of namespace declarations.

Parameters:
pNamespaceDeclarations - The set of namespace declarations to use.
Returns:
The created select statement.

namespaceDeclaration

public NamespaceDeclarationSet namespaceDeclaration(NamespaceDeclarationSet pSet,
                                                    java.lang.String pPrefix,
                                                    java.lang.String pUri)
Returns a set of namespace declarations, which include a mapping for the given prefix and URI.

Parameters:
pSet - The namespace declaration set to modify, if any, or null, if a new set should be created.
pPrefix - The new namespace declarations prefix.
pUri - The new namespace declarations URI.
Returns:
The created or modified set of namespace declarations.

allTypes

public Identifier allTypes()

in

public In in(java.lang.Object pLhs,
             java.util.List<?> pRhs,
             boolean pNot)


Copyright © 2009-2010. All Rights Reserved.