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

java.lang.Object
  extended by org.apache.ws.jaxme.sqls.impl.CaseImpl
All Implemented Interfaces:
Case

public class CaseImpl
extends java.lang.Object
implements Case

Implementation of a Case clause.


Nested Class Summary
static class CaseImpl.WhenImpl
          Implementation of a Case.When clause.
 
Nested classes/interfaces inherited from interface org.apache.ws.jaxme.sqls.Case
Case.When
 
Constructor Summary
protected CaseImpl(Column.Type pType)
          Creates a new instance with the given type.
 
Method Summary
 void addWhen(Case.When pWhen)
          Adds a new when clause.
 void addWhen(java.lang.Object pCondition, java.lang.Object pValue)
          Adds a new clause "when pCondition then pValue".
 java.lang.Object getCheckedValue()
          Returns the value being checked.
 java.lang.Object getElseValue()
          Returns the value for the "else" clause.
 Column.Type getType()
          Returns the case clauses type.
 Case.When[] getWhens()
          Returns the array of "when" clauses.
 void setCheckedValue(java.lang.Object pValue)
          Sets the value being checked.
 void setElseValue(java.lang.Object pValue)
          Sets the value for the "else" clause.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CaseImpl

protected CaseImpl(Column.Type pType)
Creates a new instance with the given type.

Method Detail

setCheckedValue

public void setCheckedValue(java.lang.Object pValue)
Description copied from interface: Case
Sets the value being checked.

Specified by:
setCheckedValue in interface Case

getCheckedValue

public java.lang.Object getCheckedValue()
Description copied from interface: Case
Returns the value being checked.

Specified by:
getCheckedValue in interface Case

addWhen

public void addWhen(java.lang.Object pCondition,
                    java.lang.Object pValue)
Description copied from interface: Case
Adds a new clause "when pCondition then pValue".

Specified by:
addWhen in interface Case

addWhen

public void addWhen(Case.When pWhen)
Description copied from interface: Case
Adds a new when clause.

Specified by:
addWhen in interface Case

setElseValue

public void setElseValue(java.lang.Object pValue)
Description copied from interface: Case
Sets the value for the "else" clause.

Specified by:
setElseValue in interface Case

getElseValue

public java.lang.Object getElseValue()
Description copied from interface: Case
Returns the value for the "else" clause.

Specified by:
getElseValue in interface Case

getType

public Column.Type getType()
Description copied from interface: Case
Returns the case clauses type.

Specified by:
getType in interface Case

getWhens

public Case.When[] getWhens()
Description copied from interface: Case
Returns the array of "when" clauses.

Specified by:
getWhens in interface Case