public class MetaBean extends FeaturesCapable implements Cloneable, Features.Bean
MetaProperty
,
Serialized Formfeatures, validations
DOMAIN, 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, setValidations
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
, removeprotected void copyInto(FeaturesCapable 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
itselfbean
- this
or null
Copyright © 2010–2016 The Apache Software Foundation. All rights reserved.