org.openxava.calculators
Class DescriptionsCalculator

java.lang.Object
  extended by org.openxava.calculators.DescriptionsCalculator
All Implemented Interfaces:
java.io.Serializable, ICalculator

public class DescriptionsCalculator
extends java.lang.Object
implements ICalculator

It obtain a description collection.

Use tab infrastructure for it, so you can make that this execute within a EJB server or nor configuring tab in xava.properties.

Author:
Javier Paniza
See Also:
Serialized Form

Constructor Summary
DescriptionsCalculator()
           
 
Method Summary
 java.lang.Object calculate()
          Pure execution, without cache...
 java.lang.String getCondition()
           
 java.lang.String getDescriptionProperties()
           
 java.lang.String getDescriptionProperty()
           
 java.util.Collection getDescriptions()
          It uses cach� depend on current parameter values.
 java.lang.String getKeyProperties()
          It's used when there are more than one property that it's key, or with only one It's preferred use a wrapper class as primary key.
 java.lang.String getKeyProperty()
          It's used when there is only a key property.
 java.lang.String getModel()
           
 java.lang.String getOrder()
           
 java.util.Collection getParameters()
           
 boolean hasParameters()
           
 boolean isOrderByKey()
           
 boolean isUseCache()
           
 boolean isUseConvertersInKeys()
           
 void setCondition(java.lang.String condition)
           
 void setDescriptionProperties(java.lang.String string)
           
 void setDescriptionProperty(java.lang.String descriptionProperty)
           
 void setKeyProperties(java.lang.String keyProperties)
           
 void setKeyProperty(java.lang.String keyProperty)
           
 void setModel(java.lang.String model)
           
 void setOrder(java.lang.String order)
           
 void setOrderByKey(boolean b)
           
 void setOrderByKey(java.lang.String b)
           
 void setParameters(java.util.Collection parameters)
           
 void setParameters(java.util.Collection parameters, IFilter filter)
           
 void setUseCache(boolean b)
           
 void setUseConvertersInKeys(boolean b)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DescriptionsCalculator

public DescriptionsCalculator()
Method Detail

calculate

public java.lang.Object calculate()
                           throws java.lang.Exception
Pure execution, without cache...

Better call to getDescriptions() if you wish to use directly.

Specified by:
calculate in interface ICalculator
Throws:
java.lang.Exception

getDescriptions

public java.util.Collection getDescriptions()
                                     throws java.lang.Exception
It uses cach� depend on current parameter values.

Returns:
Collection of KeyAndDescription. Not null.
Throws:
java.lang.Exception

getKeyProperty

public java.lang.String getKeyProperty()
It's used when there is only a key property. It's exclusive with keyProperties.


getDescriptionProperty

public java.lang.String getDescriptionProperty()

setKeyProperty

public void setKeyProperty(java.lang.String keyProperty)

setDescriptionProperty

public void setDescriptionProperty(java.lang.String descriptionProperty)

getModel

public java.lang.String getModel()

setModel

public void setModel(java.lang.String model)

getCondition

public java.lang.String getCondition()

setCondition

public void setCondition(java.lang.String condition)

hasParameters

public boolean hasParameters()

getParameters

public java.util.Collection getParameters()

setParameters

public void setParameters(java.util.Collection parameters)

setParameters

public void setParameters(java.util.Collection parameters,
                          IFilter filter)
                   throws FilterException
Throws:
FilterException

getKeyProperties

public java.lang.String getKeyProperties()
It's used when there are more than one property that it's key, or with only one It's preferred use a wrapper class as primary key.

It's exclusive with keyProperties.


setKeyProperties

public void setKeyProperties(java.lang.String keyProperties)

isOrderByKey

public boolean isOrderByKey()

setOrderByKey

public void setOrderByKey(boolean b)

setOrderByKey

public void setOrderByKey(java.lang.String b)

isUseCache

public boolean isUseCache()

setUseCache

public void setUseCache(boolean b)

getDescriptionProperties

public java.lang.String getDescriptionProperties()

setDescriptionProperties

public void setDescriptionProperties(java.lang.String string)

isUseConvertersInKeys

public boolean isUseConvertersInKeys()

setUseConvertersInKeys

public void setUseConvertersInKeys(boolean b)

getOrder

public java.lang.String getOrder()

setOrder

public void setOrder(java.lang.String order)