public class MetaBean extends FeaturesCapable implements Cloneable, Features.Bean
MetaProperty,
Serialized Formfeatures, validationsDOMAIN, MAIN_KEY, UNIQUE_KEY| Constructor and Description |
|---|
MetaBean() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
copyInto(FeaturesCapable 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)
|
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() |
addValidation, copy, createFeaturesMap, getFeature, getFeature, getFeatures, getValidations, hasValidation, optimizeRead, putFeature, setValidationspublic 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 - nullpublic boolean hasRelationships()
MetaProperty.isRelationship()public boolean hasProperties()
public void putProperty(String name, MetaProperty property)
name - property - if null, removeprotected void copyInto(FeaturesCapable target)
FeaturesCapable into another FeaturesCapable
instance.copyInto in class FeaturesCapablepublic 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 beanClassbean is our beanClass itselfbean - this or nullCopyright © 2010-2013 The Apache Software Foundation. All Rights Reserved.