org.apache.ws.jaxme.sqls.impl
Class PartsImpl

java.lang.Object
  extended by org.apache.ws.jaxme.sqls.impl.PartsImpl
All Implemented Interfaces:
Parts
Direct Known Subclasses:
BooleanConstraintImpl, ExpressionImpl, FunctionImpl

public abstract class PartsImpl
extends java.lang.Object
implements Parts

Author:
Jochen Wiedmann

Constructor Summary
protected PartsImpl(Statement pStatement)
           
 
Method Summary
protected  void add(java.lang.Object o)
           
 void addPart()
          Inserts a NULL value.
 void addPart(boolean pBoolean)
          Inserts a boolean value, which will be inserted as the word TRUE, or FALSE, respectively.
 void addPart(byte pByte)
          Inserts a byte value, which will be inserted without quotes.
 void addPart(Case pCase)
          Inserts a "case foo when x then a when y then b else c end" clause.
 void addPart(ColumnReference pColumn)
          Inserts a column reference.
 void addPart(ColumnReference[] pColumns)
          Inserts a set of column references.
 void addPart(double pDouble)
          Inserts a double value, which will be inserted without quotes.
 void addPart(Expression pExpression)
          Inserts an arithmetic expression.
 void addPart(float pFloat)
          Inserts a float value, which will be inserted without quotes.
 void addPart(Function pFunction)
          Inserts a function.
 void addPart(int pInt)
          Inserts an int value, which will be inserted without quotes.
 void addPart(long pLong)
          Inserts a long value, which will be inserted without quotes.
 void addPart(SelectStatement pStatement)
          Inserts a subselect.
 void addPart(short pShort)
          Inserts a short value, which will be inserted without quotes.
 void addPart(java.lang.String pString)
          Inserts a String.
 void addPart(Value pValue)
          Inserts a constant value.
 void addPlaceholder()
          Inserts a placeholder.
 void addRawSQLPart(java.lang.String pRawSQL)
          Inserts raw SQL code.
 Expression createDIFFERENCE()
          Creates an arithmetic difference.
 Expression createPRODUCT()
          Creates an arithmetic product.
 Expression createQUOTIENT()
          Creates an arithmetic quotient.
 Expression createSUM()
          Creates an arithmetic sum.
 int getNumParts()
          Returns the number of parts.
 java.util.Iterator getParts()
          Returns an Iterator to the parts that have been added.
 Statement getStatement()
          Returns the statement, to which the part belongs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.ws.jaxme.sqls.Parts
getMaximumParts, getMinimumParts
 

Constructor Detail

PartsImpl

protected PartsImpl(Statement pStatement)
Method Detail

add

protected void add(java.lang.Object o)

getStatement

public Statement getStatement()
Returns the statement, to which the part belongs.


addPart

public void addPart(Value pValue)
Description copied from interface: Parts

Inserts a constant value.

Specified by:
addPart in interface Parts

addPart

public void addPart(ColumnReference pColumn)
Description copied from interface: Parts

Inserts a column reference.

Specified by:
addPart in interface Parts

addPart

public void addPart(ColumnReference[] pColumns)
Description copied from interface: Parts

Inserts a set of column references.

Specified by:
addPart in interface Parts

addPart

public void addPart(SelectStatement pStatement)
Description copied from interface: Parts

Inserts a subselect.

Specified by:
addPart in interface Parts

addPart

public void addPart(java.lang.String pString)
Description copied from interface: Parts

Inserts a String. The String will be properly escaped.

Specified by:
addPart in interface Parts

addPart

public void addPart()
Description copied from interface: Parts

Inserts a NULL value.

Specified by:
addPart in interface Parts

addPart

public void addPart(byte pByte)
Description copied from interface: Parts

Inserts a byte value, which will be inserted without quotes.

Specified by:
addPart in interface Parts

addPart

public void addPart(int pInt)
Description copied from interface: Parts

Inserts an int value, which will be inserted without quotes.

Specified by:
addPart in interface Parts

addPart

public void addPart(long pLong)
Description copied from interface: Parts

Inserts a long value, which will be inserted without quotes.

Specified by:
addPart in interface Parts

addPart

public void addPart(short pShort)
Description copied from interface: Parts

Inserts a short value, which will be inserted without quotes.

Specified by:
addPart in interface Parts

addPart

public void addPart(float pFloat)
Description copied from interface: Parts

Inserts a float value, which will be inserted without quotes.

Specified by:
addPart in interface Parts

addPart

public void addPart(double pDouble)
Description copied from interface: Parts

Inserts a double value, which will be inserted without quotes.

Specified by:
addPart in interface Parts

addPart

public void addPart(boolean pBoolean)
Description copied from interface: Parts

Inserts a boolean value, which will be inserted as the word TRUE, or FALSE, respectively.

Specified by:
addPart in interface Parts

addPart

public void addPart(Function pFunction)
Description copied from interface: Parts

Inserts a function.

Specified by:
addPart in interface Parts

addPart

public void addPart(Expression pExpression)
Description copied from interface: Parts
Inserts an arithmetic expression.

Specified by:
addPart in interface Parts

addPlaceholder

public void addPlaceholder()
Description copied from interface: Parts

Inserts a placeholder.

Specified by:
addPlaceholder in interface Parts

addRawSQLPart

public void addRawSQLPart(java.lang.String pRawSQL)

Inserts raw SQL code.

Specified by:
addRawSQLPart in interface Parts

getNumParts

public int getNumParts()
Description copied from interface: Parts

Returns the number of parts.

Specified by:
getNumParts in interface Parts

getParts

public java.util.Iterator getParts()
Description copied from interface: Parts

Returns an Iterator to the parts that have been added.

Specified by:
getParts in interface Parts

addPart

public void addPart(Case pCase)
Description copied from interface: Parts
Inserts a "case foo when x then a when y then b else c end" clause.

Specified by:
addPart in interface Parts

createSUM

public Expression createSUM()
Description copied from interface: Parts
Creates an arithmetic sum.

Specified by:
createSUM in interface Parts

createPRODUCT

public Expression createPRODUCT()
Description copied from interface: Parts
Creates an arithmetic product.

Specified by:
createPRODUCT in interface Parts

createDIFFERENCE

public Expression createDIFFERENCE()
Description copied from interface: Parts
Creates an arithmetic difference.

Specified by:
createDIFFERENCE in interface Parts

createQUOTIENT

public Expression createQUOTIENT()
Description copied from interface: Parts
Creates an arithmetic quotient.

Specified by:
createQUOTIENT in interface Parts