org.openxava.model.meta
Class MetaCollection

java.lang.Object
  extended by org.openxava.util.meta.MetaElement
      extended by org.openxava.model.meta.MetaMember
          extended by org.openxava.model.meta.MetaCollection
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable, IPropertyValidator

public class MetaCollection
extends MetaMember
implements IPropertyValidator

Author:
Javier Paniza
See Also:
Serialized Form

Constructor Summary
MetaCollection()
           
 
Method Summary
 void addMetaCalculatorPostRemove(MetaCalculator metaCalculator)
           
 java.lang.String getCondition()
           
 java.util.Collection getConditionArgumentsPropertyNames()
          These arguments can be used in a condition for extracting the values of the collection from the total of the elements of the type.
 java.lang.String getFinderArguments()
          Util to generate EJB code.
 java.lang.String getFinderName()
          Util to generate EJB code.
 java.lang.String getHQLCondition()
           
 java.lang.String getJPACondition()
           
 int getMaximum()
           
 MetaCalculator getMetaCalculator()
           
 java.util.Collection getMetaCalculatorsPostRemove()
           
 java.util.Collection getMetaPropertiesFinderArguments(boolean withDots)
          Util to generate EJB code.
 MetaReference getMetaReference()
           
 int getMinimum()
           
 java.lang.String getOrder()
           
 java.lang.String getSQLConditionWithoutChangePropertiesByColumns()
           
 java.lang.String getSQLOrder()
           
 boolean hasCalculator()
           
 boolean hasCondition()
           
 boolean hasPostRemoveCalculators()
           
 boolean isAggregate()
           
 boolean isOrphanRemoval()
           
 boolean orderHasQualifiedProperties()
           
 java.lang.String removeTotalPropertyPrefix(java.lang.String totalProperty)
           
 void setCondition(java.lang.String string)
           
 void setMaximum(int maximum)
           
 void setMetaCalculator(MetaCalculator metaCalculator)
           
 void setMetaModel(MetaModel newContainer)
           
 void setMetaReference(MetaReference reference)
           
 void setMinimum(int minimum)
           
 void setOrder(java.lang.String string)
           
 void setOrphanRemoval(boolean orphanRemoval)
           
 void validate(Messages errors, java.lang.Object object, java.lang.String objectName, java.lang.String propertyName)
          Validate.
 
Methods inherited from class org.openxava.model.meta.MetaMember
compareTo, getId, getLabelId, getMetaModel, getQualifiedName, isHidden, setLabelId, setQualifiedName
 
Methods inherited from class org.openxava.util.meta.MetaElement
getDescription, getDescription, getDescription, getLabel, getLabel, getLabel, getLocale, getName, has18nLabel, hasName, setDescription, setLabel, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetaCollection

public MetaCollection()
Method Detail

addMetaCalculatorPostRemove

public void addMetaCalculatorPostRemove(MetaCalculator metaCalculator)

getMetaCalculatorsPostRemove

public java.util.Collection getMetaCalculatorsPostRemove()

hasPostRemoveCalculators

public boolean hasPostRemoveCalculators()

getMinimum

public int getMinimum()

setMinimum

public void setMinimum(int minimum)

getMetaReference

public MetaReference getMetaReference()

setMetaReference

public void setMetaReference(MetaReference reference)

isAggregate

public boolean isAggregate()
                    throws XavaException
Throws:
XavaException

setMetaModel

public void setMetaModel(MetaModel newContainer)
Overrides:
setMetaModel in class MetaMember

validate

public void validate(Messages errors,
                     java.lang.Object object,
                     java.lang.String objectName,
                     java.lang.String propertyName)
              throws java.rmi.RemoteException
Description copied from interface: IPropertyValidator
Validate.

The validation errors are added to an object of type Messages.

Specified by:
validate in interface IPropertyValidator
Parameters:
errors - Object that acumulate the list of validation errors.
object - Collection to validate. Has to be of type Collection. If null empty collection is assumed.
objectName - Object that contains the collection to validate.
propertyName - Name of the collection property within objectName.
Throws:
java.rmi.RemoteException

removeTotalPropertyPrefix

public java.lang.String removeTotalPropertyPrefix(java.lang.String totalProperty)
Since:
4.3

getOrder

public java.lang.String getOrder()

setOrder

public void setOrder(java.lang.String string)

getCondition

public java.lang.String getCondition()

setCondition

public void setCondition(java.lang.String string)

getSQLConditionWithoutChangePropertiesByColumns

public java.lang.String getSQLConditionWithoutChangePropertiesByColumns()
                                                                 throws XavaException
Throws:
XavaException

getHQLCondition

public java.lang.String getHQLCondition()
                                 throws XavaException
Throws:
XavaException

getJPACondition

public java.lang.String getJPACondition()
                                 throws XavaException
Throws:
XavaException

orderHasQualifiedProperties

public boolean orderHasQualifiedProperties()

getSQLOrder

public java.lang.String getSQLOrder()
                             throws XavaException
Throws:
XavaException

hasCondition

public boolean hasCondition()

getFinderName

public java.lang.String getFinderName()
Util to generate EJB code.


getFinderArguments

public java.lang.String getFinderArguments()
                                    throws XavaException
Util to generate EJB code.

Throws:
XavaException

getConditionArgumentsPropertyNames

public java.util.Collection getConditionArgumentsPropertyNames()
                                                        throws XavaException
These arguments can be used in a condition for extracting the values of the collection from the total of the elements of the type.

That is, if is a collection of line details of an invoice, this method will return the key of the invoice inside the line detail.
Useful for creating a SQL condition for extracting the value of the collection.

Returns:
Of type String. Never null.
Throws:
XavaException

getMetaPropertiesFinderArguments

public java.util.Collection getMetaPropertiesFinderArguments(boolean withDots)
                                                      throws XavaException
Util to generate EJB code.

Throws:
XavaException

getMetaCalculator

public MetaCalculator getMetaCalculator()

setMetaCalculator

public void setMetaCalculator(MetaCalculator metaCalculator)

hasCalculator

public boolean hasCalculator()

getMaximum

public int getMaximum()

setMaximum

public void setMaximum(int maximum)

setOrphanRemoval

public void setOrphanRemoval(boolean orphanRemoval)

isOrphanRemoval

public boolean isOrphanRemoval()