Package org.openxava.model.meta
Class MetaCollection
- java.lang.Object
-
- org.openxava.util.meta.MetaElement
-
- org.openxava.model.meta.MetaMember
-
- org.openxava.model.meta.MetaCollection
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<MetaMember>,IPropertyValidator
public class MetaCollection extends MetaMember implements IPropertyValidator
- Author:
- Javier Paniza
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MetaCollection()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddMetaCalculatorPostRemove(MetaCalculator metaCalculator)java.lang.StringgetCondition()java.util.CollectiongetConditionArgumentsPropertyNames()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.StringgetFinderArguments()Util to generate EJB code.java.lang.StringgetFinderName()Util to generate EJB code.java.lang.StringgetHQLCondition()java.lang.StringgetInverseCollection()java.lang.StringgetJPACondition()intgetMaximum()MetaCalculatorgetMetaCalculator()java.util.CollectiongetMetaCalculatorsPostRemove()java.util.CollectiongetMetaPropertiesFinderArguments(boolean withDots)Util to generate EJB code.MetaReferencegetMetaReference()intgetMinimum()java.lang.StringgetOrder()java.lang.StringgetSQLConditionWithoutChangePropertiesByColumns()java.lang.StringgetSQLOrder()booleanhasCalculator()booleanhasCondition()booleanhasInverseCollection()booleanhasPostRemoveCalculators()booleanisAggregate()booleanisElementCollection()booleanisOrphanRemoval()booleanisSortable()booleanorderHasQualifiedProperties()java.lang.StringremoveTotalPropertyPrefix(java.lang.String totalProperty)voidsetCondition(java.lang.String string)voidsetElementCollection(boolean elementCollection)voidsetInverseCollection(java.lang.String inverseCollection)voidsetMaximum(int maximum)voidsetMetaCalculator(MetaCalculator metaCalculator)voidsetMetaModel(MetaModel newContainer)voidsetMetaReference(MetaReference reference)voidsetMinimum(int minimum)voidsetOrder(java.lang.String string)voidsetOrphanRemoval(boolean orphanRemoval)voidsetSortable(boolean ordenable)voidvalidate(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, getAnnotations, getId, getLabel, getLabelId, getMetaCalculatorDefaultValue, getMetaModel, getPropertyNamesThatIDepend, getQualifiedName, getSimpleName, hasDefaultValueCalculator, isHidden, isTransient, setLabel, setLabelId, setQualifiedName, setTransient, toQualifiedNames
-
Methods inherited from class org.openxava.util.meta.MetaElement
getDescription, getDescription, getDescription, getDescription, getLabel, getLabel, getLabel, getLocale, getName, getPlaceholder, getPlaceholder, getPlaceholder, has18nLabel, hasName, setDescription, setName, setPlaceholder
-
-
-
-
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:
setMetaModelin classMetaMember
-
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:IPropertyValidatorValidate.The validation errors are added to an object of type
Messages.- Specified by:
validatein interfaceIPropertyValidator- Parameters:
errors- Object that accumulate 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 XavaExceptionUtil to generate EJB code.- Throws:
XavaException
-
getConditionArgumentsPropertyNames
public java.util.Collection getConditionArgumentsPropertyNames() throws XavaExceptionThese 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 XavaExceptionUtil to generate EJB code.- Throws:
XavaException
-
getMetaCalculator
public MetaCalculator getMetaCalculator()
- Overrides:
getMetaCalculatorin classMetaMember
-
setMetaCalculator
public void setMetaCalculator(MetaCalculator metaCalculator)
-
hasCalculator
public boolean hasCalculator()
- Overrides:
hasCalculatorin classMetaMember
-
getMaximum
public int getMaximum()
-
setMaximum
public void setMaximum(int maximum)
-
setOrphanRemoval
public void setOrphanRemoval(boolean orphanRemoval)
-
isOrphanRemoval
public boolean isOrphanRemoval()
-
getInverseCollection
public java.lang.String getInverseCollection()
-
setInverseCollection
public void setInverseCollection(java.lang.String inverseCollection)
-
hasInverseCollection
public boolean hasInverseCollection()
-
isElementCollection
public boolean isElementCollection()
-
setElementCollection
public void setElementCollection(boolean elementCollection)
-
isSortable
public boolean isSortable()
-
setSortable
public void setSortable(boolean ordenable)
-
-