SRJRCFrames
v0.1.296

de.schwarzrot.data.access.support
Interface ConditionElement

All Known Implementing Classes:
AbstractConditionElement, AbstractFunctionCondtion, AlternatingSequence, EqualConditionElement, InListConditionElement, LowerBoundConditionElement, MaxConditionElement, MinConditionElement, NotEqualConditionElement, SearchConditionElement, UpperBoundConditionElement

public interface ConditionElement

interface to allow generic assembling of a condition. Those conditions are most commonly used to build conditions for SQL data query

Author:
Reinhard Mantey

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 getOpenOperator()
          returns the operator, that opens this 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
 

Method Detail

format

String format(EntityDescriptor ed,
              DbUtil du)
format the condition text with given parameters

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

format

String format(EntityDescriptor ed,
              PropertyInfo pi,
              DbUtil du,
              Object physValue)
format the condition text with the given parameters

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

String getCloseOperator()
returns the operator, that closes a condition. For simple conditions this call will return an empty string only.

Returns:
an operator
See Also:
getOpenOperator()

getName

String getName()
returns the property name used in the condition

Returns:
a property name

getOpenOperator

String getOpenOperator()
returns the operator, that opens this condition. Simple conditions like 'Equal' only have a single operator, so it is returned as opening operator.

Returns:
an operator
See Also:
getCloseOperator()

getSeparator

String getSeparator()
returns the separator used to assemble sofisticated conditions. For simple conditions, this call will return an empty string only.

Returns:
a separator

getValue

Object getValue()
returns the value of this condition

Returns:
a value

setName

void setName(String name)
sets the property name of this condition

Parameters:
name - a property name

setValue

void setValue(Object value)
sets the value used by this condition

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.