|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.csutils.core.query.impl.AbstractQueryGenerator
public abstract class AbstractQueryGenerator
Abstract base class for implementing query generators.
Nested Class Summary | |
---|---|
static class |
AbstractQueryGenerator.NamedParameter
|
static class |
AbstractQueryGenerator.NumberedParameter
|
protected static class |
AbstractQueryGenerator.ObjectTypeInfo
|
static class |
AbstractQueryGenerator.Parameter
|
Field Summary | |
---|---|
protected int |
autoParameterNumber
|
static java.lang.String |
NS_QUERY
The "query" namespace. |
protected java.util.List<AbstractQueryGenerator.Parameter> |
parameters
|
static QName |
QNAME_ALLTYPES
The "allTypes" QName. |
protected java.lang.StringBuilder |
sb
|
Constructor Summary | |
---|---|
AbstractQueryGenerator()
|
Method Summary | |
---|---|
protected AbstractQueryGenerator.ObjectTypeInfo |
createJoin(ObjectType pQueryType)
|
protected ROType |
findMatchingObjectType(Statement pStatement,
ObjectType pQueryType)
|
protected java.util.List<AbstractQueryGenerator.ObjectTypeInfo> |
findObjectTypes(SelectStatement pQuery)
|
protected AbstractQueryGenerator.ObjectTypeInfo |
getAlias(java.lang.String pPath,
java.lang.String pAlias)
|
protected ROMetaModel |
getModel()
|
protected AbstractQueryGenerator.ObjectTypeInfo |
getObjectType(java.lang.String pAlias)
|
protected java.util.List<AbstractQueryGenerator.Parameter> |
getParameters()
|
protected AbstractQueryGenerator.ObjectTypeInfo |
newObjectTypeInfo(java.lang.String pAlias,
ROType pType,
AbstractQueryGenerator.ObjectTypeInfo pSourceType,
RORelation pAttribute)
Creates a new instance of AbstractQueryGenerator.ObjectTypeInfo . |
protected void |
parse(AdditiveExpression pExpr)
|
protected void |
parse(And pAnd)
|
protected abstract void |
parse(java.lang.Boolean pBoolean)
|
protected abstract void |
parse(java.util.Calendar pCalendar)
|
protected void |
parse(Concatenation pConcatenation)
|
protected void |
parse(Eq pEq)
|
protected abstract void |
parse(FunctionCall pFunctionCall)
|
protected void |
parse(Ge pGe)
|
protected void |
parse(Gt pGt)
|
protected abstract void |
parse(Identifier pIdentifier)
|
protected abstract void |
parse(In pIn)
|
protected void |
parse(IsEmpty pEmpty)
Checks, whether a string is empty. |
protected abstract void |
parse(IsNull pIsNull)
|
protected void |
parse(Le pLe)
|
protected abstract void |
parse(Like pLike)
|
protected void |
parse(Lt pLt)
|
protected abstract void |
parse(MethodCall pMethodCall)
|
protected void |
parse(MultiplicativeExpression pExpr)
|
protected void |
parse(Ne pNe)
|
protected abstract void |
parse(Negation pNegation)
|
protected void |
parse(java.lang.Number pValue)
Adds the given number. |
protected void |
parse(Or pOr)
|
protected void |
parse(Parameter pParameter)
Adds the given parameter to the query. |
protected void |
parse(RelationalExpression pExpr,
java.lang.String pOp)
|
CsqlStatement |
parse(ROMetaModel pModel,
Statement pQuery)
|
protected abstract CsqlStatement |
parse(SelectStatement pQuery)
|
protected abstract void |
parse(java.lang.String pString)
|
protected void |
parse(UnaryMinus pObject)
|
protected void |
parseExpression(java.lang.Object pObject)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String NS_QUERY
public static final QName QNAME_ALLTYPES
protected java.lang.StringBuilder sb
protected int autoParameterNumber
protected final java.util.List<AbstractQueryGenerator.Parameter> parameters
Constructor Detail |
---|
public AbstractQueryGenerator()
Method Detail |
---|
protected ROMetaModel getModel()
protected java.util.List<AbstractQueryGenerator.Parameter> getParameters()
protected void parse(And pAnd) throws javax.xml.registry.JAXRException
javax.xml.registry.JAXRException
protected void parse(Or pOr) throws javax.xml.registry.JAXRException
javax.xml.registry.JAXRException
protected void parse(RelationalExpression pExpr, java.lang.String pOp) throws javax.xml.registry.JAXRException
javax.xml.registry.JAXRException
protected abstract void parse(In pIn) throws javax.xml.registry.JAXRException
javax.xml.registry.JAXRException
protected void parse(Eq pEq) throws javax.xml.registry.JAXRException
javax.xml.registry.JAXRException
protected void parse(Ne pNe) throws javax.xml.registry.JAXRException
javax.xml.registry.JAXRException
protected void parse(Ge pGe) throws javax.xml.registry.JAXRException
javax.xml.registry.JAXRException
protected void parse(Gt pGt) throws javax.xml.registry.JAXRException
javax.xml.registry.JAXRException
protected void parse(Le pLe) throws javax.xml.registry.JAXRException
javax.xml.registry.JAXRException
protected void parse(Lt pLt) throws javax.xml.registry.JAXRException
javax.xml.registry.JAXRException
protected abstract void parse(Identifier pIdentifier) throws javax.xml.registry.JAXRException
javax.xml.registry.JAXRException
protected abstract void parse(MethodCall pMethodCall) throws javax.xml.registry.JAXRException
javax.xml.registry.JAXRException
protected abstract void parse(FunctionCall pFunctionCall) throws javax.xml.registry.JAXRException
javax.xml.registry.JAXRException
protected abstract void parse(Like pLike) throws javax.xml.registry.JAXRException
javax.xml.registry.JAXRException
protected abstract void parse(IsNull pIsNull) throws javax.xml.registry.JAXRException
javax.xml.registry.JAXRException
protected abstract void parse(Negation pNegation) throws javax.xml.registry.JAXRException
javax.xml.registry.JAXRException
protected abstract void parse(java.lang.String pString) throws javax.xml.registry.JAXRException
javax.xml.registry.JAXRException
protected abstract void parse(java.util.Calendar pCalendar) throws javax.xml.registry.JAXRException
javax.xml.registry.JAXRException
protected abstract void parse(java.lang.Boolean pBoolean) throws javax.xml.registry.JAXRException
javax.xml.registry.JAXRException
protected void parse(Concatenation pConcatenation) throws javax.xml.registry.JAXRException
javax.xml.registry.JAXRException
protected void parse(AdditiveExpression pExpr) throws javax.xml.registry.JAXRException
javax.xml.registry.JAXRException
protected void parse(MultiplicativeExpression pExpr) throws javax.xml.registry.JAXRException
javax.xml.registry.JAXRException
protected void parse(UnaryMinus pObject) throws javax.xml.registry.JAXRException
javax.xml.registry.JAXRException
protected void parse(IsEmpty pEmpty) throws javax.xml.registry.JAXRException
pEmpty
- The empty value
javax.xml.registry.JAXRException
- Could not add the check for emptiness.protected void parse(java.lang.Number pValue) throws javax.xml.registry.JAXRException
pValue
- The number to add to the query.
javax.xml.registry.JAXRException
- The number could not be added.protected void parseExpression(java.lang.Object pObject) throws javax.xml.registry.JAXRException
javax.xml.registry.JAXRException
protected void parse(Parameter pParameter) throws javax.xml.registry.JAXRException
pParameter
- The parameter to add to the query.
javax.xml.registry.JAXRException
- Failed to add the parameter.protected AbstractQueryGenerator.ObjectTypeInfo getAlias(java.lang.String pPath, java.lang.String pAlias) throws javax.xml.registry.JAXRException
javax.xml.registry.JAXRException
protected AbstractQueryGenerator.ObjectTypeInfo createJoin(ObjectType pQueryType) throws javax.xml.registry.JAXRException
javax.xml.registry.JAXRException
protected AbstractQueryGenerator.ObjectTypeInfo newObjectTypeInfo(java.lang.String pAlias, ROType pType, AbstractQueryGenerator.ObjectTypeInfo pSourceType, RORelation pAttribute) throws javax.xml.registry.JAXRException
AbstractQueryGenerator.ObjectTypeInfo
. This is invoked for the
main registry object type in the query as well as for any JOIN clause.
pAlias
- The alias to use for the registry object type.pType
- The registry object type.pSourceType
- Contains the left hand side of the join clause
(the source type of a relationship attribute), if the method is
invoked to implement such a clause, otherwise null.pAttribute
- Contains the relationship attribute of the
join clause, if the method is invoked to implement such a clause,
otherwise null.
javax.xml.registry.JAXRException
- Creating the ObjectTypeInfo failed.protected ROType findMatchingObjectType(Statement pStatement, ObjectType pQueryType) throws javax.xml.registry.JAXRException
javax.xml.registry.JAXRException
protected AbstractQueryGenerator.ObjectTypeInfo getObjectType(java.lang.String pAlias)
protected java.util.List<AbstractQueryGenerator.ObjectTypeInfo> findObjectTypes(SelectStatement pQuery) throws javax.xml.registry.JAXRException
javax.xml.registry.JAXRException
protected abstract CsqlStatement parse(SelectStatement pQuery) throws javax.xml.registry.JAXRException
javax.xml.registry.JAXRException
public CsqlStatement parse(ROMetaModel pModel, Statement pQuery) throws javax.xml.registry.JAXRException
javax.xml.registry.JAXRException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |