|
||||||||||
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.MetaBean
public class MetaBean
Description: the meta description of a bean or class. the class/bean itself can have a map of features and an array
of metaproperties.
MetaProperty
,
Serialized FormField Summary |
---|
Fields inherited from interface org.apache.bval.model.Features.Bean |
---|
DOMAIN, MAIN_KEY, UNIQUE_KEY |
Constructor Summary | |
---|---|
MetaBean()
|
Method Summary | ||
---|---|---|
protected
|
copyInto(T target)
Copy this FeaturesCapable into another FeaturesCapable
instance. |
|
Class<?> |
getBeanClass()
Get the beanClass. |
|
String |
getId()
Get the id. |
|
String |
getName()
Get the name. |
|
MetaProperty[] |
getProperties()
Get the properties. |
|
MetaProperty |
getProperty(String name)
Get the specified MetaProperty . |
|
boolean |
hasProperties()
Learn whether there are any known properties. |
|
boolean |
hasRelationships()
Learn whether any known property is a relationship. |
|
void |
putProperty(String name,
MetaProperty property)
bidirectional - set the relationship between a MetaProperty and its parentMetaBean |
|
MetaBean |
resolveMetaBean(Object bean)
If this MetaBean is compatible with bean , return this , else null . |
|
void |
setBeanClass(Class<?> beanClass)
Set the beanClass. |
|
void |
setId(String id)
Set the id. |
|
void |
setName(String name)
Set the name. |
|
void |
setProperties(MetaProperty[] properties)
Set the properties. |
|
String |
toString()
|
Methods inherited from class org.apache.bval.model.FeaturesCapable |
---|
addValidation, copy, createFeaturesMap, getFeature, getFeature, getFeatures, getValidations, hasValidation, optimizeRead, putFeature, setValidations |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MetaBean()
Method Detail |
---|
public String getId()
public void setId(String id)
id
- the String to setpublic String getName()
public void setName(String name)
name
- the String to setpublic Class<?> getBeanClass()
public void setBeanClass(Class<?> beanClass)
beanClass
- the Class> to setpublic MetaProperty[] getProperties()
public void setProperties(MetaProperty[] properties)
properties
- the MetaProperty[] to setpublic MetaProperty getProperty(String name)
MetaProperty
.
name
-
null
public boolean hasRelationships()
MetaProperty.isRelationship()
public boolean hasProperties()
public void putProperty(String name, MetaProperty property)
name
- property
- if null
, removepublic String toString()
toString
in class Object
protected <T extends FeaturesCapable> void copyInto(T target)
FeaturesCapable
into another FeaturesCapable
instance.
copyInto
in class FeaturesCapable
public MetaBean resolveMetaBean(Object bean)
If this MetaBean
is compatible with bean
, return this
, else null
.
Compatibility is satisfied in one of the following ways:
bean
is nullbean
is an instance of our beanClass
bean
is our beanClass
itself
bean
-
this
or null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |