Package org.openxava.model.meta
Class MetaProperty
java.lang.Object
org.openxava.util.meta.MetaElement
org.openxava.model.meta.MetaMember
org.openxava.model.meta.MetaProperty
- All Implemented Interfaces:
Serializable,Cloneable,Comparable<MetaMember>
- Direct Known Subclasses:
MetaViewAction,PropertiesSeparator
- Author:
- Javier Paniza; modified by Radoslaw OStrzycki, Newitech Sp. z o.o.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMetaValidator(MetaValidator metaValidator) voidaddValidValue(Object validValue) voidcontainsValidValue(Object value) booleandepends(MetaProperty other) booleanConvert a valid value for this property in a String valid for display to user.Convert a valid value for this property in a String valid for display to user.Can be nullgetQualifiedLabel(Locale locale) getQualifiedLabel(javax.servlet.ServletRequest request) intgetScale()intgetSize()getType()getValidValue(int i) intgetValidValueIndex(Object value) The first value is 1, to left 0 for no value case.getValidValueLabel(int i) getValidValueLabel(Object value) getValidValueLabel(Locale locale, int i) getValidValueLabel(Locale locale, Object value) getValidValueLabel(javax.servlet.ServletRequest request, int i) Deprecated.Use getValidValueLabel(int i) insteadgetValidValueLabel(javax.servlet.ServletRequest request, Object value) Deprecated.Use getValidValue(Object value) insteadgetValidValuesLabels(Locale locale) A string with the localized labels separate with '|'.getValidValuesLabels(javax.servlet.ServletRequest request) A string with the localized labels separate with '|'.booleanbooleanbooleanbooleanbooleaninthashCode()booleanbooleanbooleanbooleanbooleanbooleanisCompatibleWith(Class type) Verify if the type, stereotype or any annotation of the property is compatible with the indicated type.booleanbooleanbooleanbooleanbooleanbooleanisHidden()booleanbooleanisKey()booleanbooleanisNumber()booleanbooleanbooleanbooleanbooleanDeprecated.booleanCheck if this property is a String of 32 characters (typical UUID/OID size) whose editor does not have a list-formatter.booleanConvert the argument in a object of type valid for assign to this property.Convert the argument in a object of type valid for assign to this property.voidsetCalculation(String calculation) voidsetHidden(boolean hidden) voidsetKey(boolean key) voidvoidsetMetaCalculator(MetaCalculator metaCalculator) voidsetMetaCalculatorDefaultValue(MetaCalculator metaCalculatorDefaultValue) voidsetNotFieldBackedAndNotCalculated(boolean notFieldBackedAndNotCalculated) voidsetQualifiedLabel(String qualifiedLabel) voidsetReadOnly(boolean readOnly) voidsetRequired(boolean newRequired) voidsetRequiredMessage(String requiredMessage) voidsetScale(int newScale) voidsetSearchKey(boolean searchKey) voidsetSize(int newSize) voidsetStereotype(String newStereotype) voidsetTypeName(String type) voidsetVersion(boolean version) toString()booleanusesForCalculation(String qualifiedPropertyName) voidvoidvoidvalidValuesLabels(Locale locale) validValuesLabels(javax.servlet.ServletRequest request) Deprecated.Use validValuesLabels() insteadMethods inherited from class org.openxava.model.meta.MetaMember
compareTo, getAnnotations, getId, getLabel, getLabelId, getMetaModel, getPropertyNamesThatIDepend, getQualifiedName, getSimpleName, isTransient, setLabelId, setMetaModel, setQualifiedName, setTransient, toQualifiedNamesMethods 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
-
Constructor Details
-
MetaProperty
public MetaProperty()
-
-
Method Details
-
setLabel
- Overrides:
setLabelin classMetaMember
-
addValidValue
-
containsValidValue
-
getValidValue
- Throws:
XavaException
-
getValidValueIndex
The first value is 1, to left 0 for no value case. -
getValidValueLabel
- Throws:
XavaException
-
getValidValueLabel
Deprecated.Use getValidValueLabel(int i) insteadDeprecated since 3.1.- Throws:
XavaException
-
getValidValueLabel
-
getValidValueLabel
-
getValidValueLabel
Deprecated.Use getValidValue(Object value) insteadDeprecated since 3.1. -
getValidValueLabel
- Throws:
XavaException
-
getQualifiedLabel
- Throws:
XavaException
-
getQualifiedLabel
- Throws:
XavaException
-
getValidValuesLabels
A string with the localized labels separate with '|'. -
getValidValuesLabels
A string with the localized labels separate with '|'. -
getStereotype
-
hasStereotype
public boolean hasStereotype() -
isNumber
- Throws:
XavaException
-
isInteger
public boolean isInteger()- Since:
- 7.4.5
-
getSize
- Returns:
- Can return -1 if the datatype does not have length concept
- Throws:
XavaException
-
getScale
- Returns:
- scale param
- Throws:
XavaException
-
getType
- Throws:
XavaException
-
getCMPTypeName
- Throws:
XavaException
-
getTypeName
- Throws:
XavaException
-
setTypeName
- Throws:
XavaException
-
hasNotDependentDefaultValueCalculator
public boolean hasNotDependentDefaultValueCalculator()- Since:
- 5.1
-
hasDefaultValueCalculator
public boolean hasDefaultValueCalculator()- Overrides:
hasDefaultValueCalculatorin classMetaMember
-
hasCalculator
public boolean hasCalculator()- Overrides:
hasCalculatorin classMetaMember
-
createDefaultValueCalculator
- Returns:
- null if this does not have calculator for default value
- Throws:
XavaException
-
getCalculator
- Returns:
- null if this does not have calculator
- Throws:
XavaException
-
isDefaultCalculatorHibernateIdGenerator
- Throws:
XavaException
-
getHbmGeneratorCode
- Throws:
XavaException
-
getMetaValidators
-
isKey
public boolean isKey() -
setKey
public void setKey(boolean key) -
isFilterCapable
public boolean isFilterCapable()- Since:
- 7.1.4
-
isNotFieldBackedAndNotCalculated
public boolean isNotFieldBackedAndNotCalculated()- Since:
- 7.1.4
-
setNotFieldBackedAndNotCalculated
public void setNotFieldBackedAndNotCalculated(boolean notFieldBackedAndNotCalculated) -
isCalculated
public boolean isCalculated() -
isPersistent
- Throws:
XavaException
-
isRequired
public boolean isRequired() -
setStereotype
-
setRequired
public void setRequired(boolean newRequired) -
setSize
public void setSize(int newSize) -
setScale
public void setScale(int newScale) -
hasValidValues
public boolean hasValidValues() -
validate
- Throws:
RemoteException
-
validate
- Throws:
RemoteException
-
validate
public void validate(Messages errors, Object object, boolean creating, String container) throws RemoteException - Throws:
RemoteException- Since:
- 6.2.1
-
validValues
-
validValuesLabels
-
validValuesLabels
Deprecated.Use validValuesLabels() insteadDeprecated since 3.1. -
validValuesLabels
-
isReadOnly
- Throws:
XavaException
-
cloneMetaProperty
- Throws:
XavaException
-
getMetaCalculator
- Overrides:
getMetaCalculatorin classMetaMember
-
setMetaCalculator
-
getMetaCalculatorDefaultValue
- Overrides:
getMetaCalculatorDefaultValuein classMetaMember
-
setMetaCalculatorDefaultValue
-
hasDependentProperties
- Throws:
XavaException
-
getDependentPropertiesNames
- Throws:
XavaException
-
depends
- Parameters:
other- Can be null, in which case return false- Throws:
XavaException
-
hasMetaModel
public boolean hasMetaModel() -
setReadOnly
public void setReadOnly(boolean readOnly) -
isHidden
public boolean isHidden()- Overrides:
isHiddenin classMetaMember
-
setHidden
public void setHidden(boolean hidden) -
hasCalculatorDefaultValueOnCreate
public boolean hasCalculatorDefaultValueOnCreate() -
getMapping
Can be null- Throws:
XavaException
-
parse
Convert the argument in a object of type valid for assign to this property.Convierte el argumento enviado en un objeto de tipo v�lido para asignar a esta propiedad.
If argument is primitive return the match wrapper.
- Returns:
- Can be null
- Throws:
ParseExceptionXavaException
-
parse
Convert the argument in a object of type valid for assign to this property.If argument is primitive return the match wrapper.
- Returns:
- Can be null
- Throws:
ParseExceptionXavaException
-
isTypeOrStereotypeCompatibleWith
Deprecated. -
isCompatibleWith
Verify if the type, stereotype or any annotation of the property is compatible with the indicated type.- Since:
- 6.6
-
format
Convert a valid value for this property in a String valid for display to user.- Returns:
- Can be null.
- Throws:
XavaException
-
format
Convert a valid value for this property in a String valid for display to user.- Returns:
- Can be null.
- Throws:
XavaException
-
addMetaValidator
-
usesForCalculation
-
getPropertiesNamesUsedForCalculation
-
toString
-
equals
-
hashCode
public int hashCode() -
isVersion
public boolean isVersion() -
setVersion
public void setVersion(boolean version) -
isSearchKey
public boolean isSearchKey() -
setSearchKey
public void setSearchKey(boolean searchKey) -
getRequiredMessage
-
setRequiredMessage
-
getQualifiedLabel
-
setQualifiedLabel
-
getCalculation
-
setCalculation
-
hasCalculation
public boolean hasCalculation()- Since:
- 5.7
-
isFile
-
isDateType
public boolean isDateType()- Since:
- 7.4.2
-
isDateTimeType
public boolean isDateTimeType()- Since:
- 7.4.2
-
isUUIDNotFormattedInList
public boolean isUUIDNotFormattedInList()Check if this property is a String of 32 characters (typical UUID/OID size) whose editor does not have a list-formatter.Such properties typically show just a raw OID value in lists which is not useful for users (e.g., IMAGES_GALLERY, DISCUSSION, FILES stereotipes). Properties with a list-formatter (e.g., FILE stereotype with AttachedFile editor) will return false because they display meaningful content.
- Since:
- 7.7
-