SRJRCFrames
v0.1.296

de.schwarzrot.data.access.support
Class AbstractFunctionCondtion

java.lang.Object
  extended by de.schwarzrot.data.access.support.AbstractConditionElement
      extended by de.schwarzrot.data.access.support.AbstractFunctionCondtion
All Implemented Interfaces:
ConditionElement
Direct Known Subclasses:
MaxConditionElement, MinConditionElement

public abstract class AbstractFunctionCondtion
extends AbstractConditionElement

create the condition string for queries, that want to refer to a function result i.e. max. value of given attribute. Such queries look like: select * from XXX where name = ( select (name) from XXX )

Author:
Reinhard Mantey

Field Summary
protected static String CLOSE_OPERATOR
           
protected static String OPEN_OPERATOR
           
 
Fields inherited from class de.schwarzrot.data.access.support.AbstractConditionElement
cnvFactory, EMPTY_STRING
 
Constructor Summary
AbstractFunctionCondtion()
           
AbstractFunctionCondtion(String name, Object value)
           
 
Method Summary
 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.
protected abstract  String getFunction()
           
 String getOpenOperator()
          returns the operator, that opens this condition.
 
Methods inherited from class de.schwarzrot.data.access.support.AbstractConditionElement
format, getName, getSeparator, getValue, setName, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OPEN_OPERATOR

protected static final String OPEN_OPERATOR
See Also:
Constant Field Values

CLOSE_OPERATOR

protected static final String CLOSE_OPERATOR
See Also:
Constant Field Values
Constructor Detail

AbstractFunctionCondtion

public AbstractFunctionCondtion()

AbstractFunctionCondtion

public AbstractFunctionCondtion(String name,
                                Object value)
Method Detail

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
Overrides:
format in class AbstractConditionElement
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
Overrides:
getCloseOperator in class AbstractConditionElement
Returns:
an operator
See Also:
ConditionElement.getOpenOperator()

getOpenOperator

public String getOpenOperator()
Description copied from interface: ConditionElement
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:
ConditionElement.getCloseOperator()

getFunction

protected abstract String getFunction()

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.