|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.bval.model.FeaturesCapable
org.apache.bval.model.MetaProperty
public class MetaProperty
Description: the meta description of a property of a bean. It supports a map
of features and multiple validations.
Validation
,
MetaBean
,
Serialized FormField Summary |
---|
Fields inherited from interface org.apache.bval.model.Features.Property |
---|
DEFAULT_VALUE, DENIED, ENUM, HIDDEN, JAVASCRIPT_VALIDATION_FUNCTIONS, MANDATORY, MAX_LENGTH, MAX_VALUE, MIN_LENGTH, MIN_VALUE, PREFERRED, READONLY, REF_BEAN_ID, REF_BEAN_TYPE, REF_CASCADE, REG_EXP, TIME_LAG, UNIQUE_KEY |
Constructor Summary | |
---|---|
MetaProperty()
Create a new MetaProperty instance. |
Method Summary | |
---|---|
MetaProperty |
clone()
|
String[] |
getJavaScriptValidations()
Deprecated. |
MetaBean |
getMetaBean()
Get the metabean of the target bean (mainly for relationships). |
String |
getName()
Get the name of this property. |
MetaBean |
getParentMetaBean()
Get the metabean that owns this property (set by MetaBean.putProperty()) |
Type |
getType()
Get the type of this property. |
Class<?> |
getTypeClass()
Resolve the type of this property to a class. |
boolean |
isMandatory()
Learn whether this property is considered mandatory. |
boolean |
isRelationship()
Learn whether this property is considered a relationship. |
void |
setMandatory(boolean mandatory)
Set this property as being mandatory (or not). |
void |
setMetaBean(MetaBean metaBean)
Set the MetaBean of this MetaProperty . |
void |
setName(String name)
Set the name of this property. |
(package private) void |
setParentMetaBean(MetaBean parentMetaBean)
Set the metabean that owns this property (usually called by MetaBean.putProperty()) |
void |
setType(Type type)
Set the type of this property. |
String |
toString()
|
Methods inherited from class org.apache.bval.model.FeaturesCapable |
---|
addValidation, copy, copyInto, createFeaturesMap, getFeature, getFeature, getFeatures, getValidations, hasValidation, optimizeRead, putFeature, setValidations |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MetaProperty()
Method Detail |
---|
public MetaBean getMetaBean()
public void setMetaBean(MetaBean metaBean)
MetaProperty
.
metaBean
- to setpublic MetaBean getParentMetaBean()
void setParentMetaBean(MetaBean parentMetaBean)
parentMetaBean
- public boolean isRelationship()
true
if it has a MetaBean of its ownpublic void setType(Type type)
type
- to setpublic Type getType()
public Class<?> getTypeClass()
null
if cannot be determinedpublic String getName()
public boolean isMandatory()
true
if the MANDATORY
feature is set to true
.Features.Property#MANDATORY}
public void setMandatory(boolean mandatory)
mandatory
- Features.Property#MANDATORY}
@Deprecated public String[] getJavaScriptValidations()
public void setName(String name)
name
- to setpublic MetaProperty clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |