SRJRCFrames
v0.1.296

de.schwarzrot.data.access.support
Class AbstractConditionElement

java.lang.Object
  extended by de.schwarzrot.data.access.support.AbstractConditionElement
All Implemented Interfaces:
ConditionElement
Direct Known Subclasses:
AbstractFunctionCondtion, AlternatingSequence, EqualConditionElement, InListConditionElement, LowerBoundConditionElement, NotEqualConditionElement, SearchConditionElement, UpperBoundConditionElement

public abstract class AbstractConditionElement
extends Object
implements ConditionElement

abstract helper class for convenience of creation of ConditionElement s.

Author:
Reinhard Mantey

Field Summary
protected static ConverterFactory cnvFactory
           
protected static String EMPTY_STRING
           
 
Constructor Summary
AbstractConditionElement()
          default constructor for automated building
AbstractConditionElement(String name, Object value)
          constructor for manual setup, so both instance variables could be set
 
Method Summary
 String format(EntityDescriptor ed, DbUtil du)
          format the condition text with given parameters
 String format(EntityDescriptor ed, PropertyInfo pi, DbUtil du, Object physValue)
          format the condition text with the given parameters
 String getCloseOperator()
          returns the operator, that closes a condition.
 String getName()
          returns the property name used in the condition
 String getSeparator()
          returns the separator used to assemble sofisticated conditions.
 Object getValue()
          returns the value of this condition
 void setName(String name)
          sets the property name of this condition
 void setValue(Object value)
          sets the value used by this condition
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.schwarzrot.data.access.support.ConditionElement
getOpenOperator
 

Field Detail

EMPTY_STRING

protected static final String EMPTY_STRING

cnvFactory

protected static ConverterFactory cnvFactory
Constructor Detail

AbstractConditionElement

public AbstractConditionElement()
default constructor for automated building


AbstractConditionElement

public AbstractConditionElement(String name,
                                Object value)
constructor for manual setup, so both instance variables could be set

Parameters:
name - the property name of this condition
value - the value for this condition
Method Detail

format

public String format(EntityDescriptor ed,
                     DbUtil du)
Description copied from interface: ConditionElement
format the condition text with given parameters

Specified by:
format in interface ConditionElement
Parameters:
ed - - type of involved entity
du - - the involved utility instance
Returns:
- the condition string ready to use in sql

format

public String format(EntityDescriptor ed,
                     PropertyInfo pi,
                     DbUtil du,
                     Object physValue)
Description copied from interface: ConditionElement
format the condition text with the given parameters

Specified by:
format in interface ConditionElement
Parameters:
ed - - the type of the involved entity
pi - - the description of the property
du - - the involved utility instance
physValue - - the physical values bound to this condition
Returns:
- the condition string ready to use in sql

getCloseOperator

public String getCloseOperator()
Description copied from interface: ConditionElement
returns the operator, that closes a condition. For simple conditions this call will return an empty string only.

Specified by:
getCloseOperator in interface ConditionElement
Returns:
an operator
See Also:
ConditionElement.getOpenOperator()

getName

public final String getName()
Description copied from interface: ConditionElement
returns the property name used in the condition

Specified by:
getName in interface ConditionElement
Returns:
a property name

getSeparator

public String getSeparator()
Description copied from interface: ConditionElement
returns the separator used to assemble sofisticated conditions. For simple conditions, this call will return an empty string only.

Specified by:
getSeparator in interface ConditionElement
Returns:
a separator

getValue

public Object getValue()
Description copied from interface: ConditionElement
returns the value of this condition

Specified by:
getValue in interface ConditionElement
Returns:
a value

setName

public final void setName(String name)
Description copied from interface: ConditionElement
sets the property name of this condition

Specified by:
setName in interface ConditionElement
Parameters:
name - a property name

setValue

public final void setValue(Object value)
Description copied from interface: ConditionElement
sets the value used by this condition

Specified by:
setValue in interface ConditionElement
Parameters:
value - - the raw value to be used by the condition

SRJRCFrames
v0.1.296

hosted at
Find SRJRCFrames at SourceForge.net. Fast, secure and free:
           Open Source Software download
Submit a bug or request a feature

SRJRCFrames is published according to the GNU General Public License
Copyright 2005-2012 Reinhard Mantey - some rights reserved.