public class Embeddable extends Object implements ConfigurationNode, XMLSerializable, Serializable
Modifier and Type | Field and Description |
---|---|
protected SortedMap<String,EmbeddableAttribute> |
attributes |
protected String |
className |
protected DataMap |
dataMap |
Constructor and Description |
---|
Embeddable() |
Embeddable(String className) |
Modifier and Type | Method and Description |
---|---|
<T> T |
acceptVisitor(ConfigurationNodeVisitor<T> visitor) |
void |
addAttribute(EmbeddableAttribute attribute)
Adds new embeddable attribute to the entity, setting its parent
embeddable to be this object.
|
void |
encodeAsXML(XMLEncoder encoder,
ConfigurationNodeVisitor delegate)
XMLSerializable implementation that generates XML for embeddable. |
EmbeddableAttribute |
getAttribute(String name) |
EmbeddableAttribute |
getAttributeForDbPath(String dbPath)
Returns EmbeddableAttribute of this Embeddable that maps to
dbAttribute parameter. |
SortedMap<String,EmbeddableAttribute> |
getAttributeMap()
Returns an unmodifiable sorted map of embeddable attributes.
|
Collection<EmbeddableAttribute> |
getAttributes()
Returns an unmodifiable collection of embeddable attributes.
|
String |
getClassName() |
DataMap |
getDataMap() |
Class<?> |
getJavaClass()
Deprecated.
since 4.0 this method based on statically defined class
loading algorithm is not going to work in environments like
OSGi.
AdhocObjectFactory should be used as it can
provide the environment-specific class loading policy. |
void |
removeAttribute(String name) |
void |
setClassName(String className) |
void |
setDataMap(DataMap dataMap) |
protected String className
protected SortedMap<String,EmbeddableAttribute> attributes
protected DataMap dataMap
public Embeddable()
public Embeddable(String className)
public <T> T acceptVisitor(ConfigurationNodeVisitor<T> visitor)
acceptVisitor
in interface ConfigurationNode
public DataMap getDataMap()
public void setDataMap(DataMap dataMap)
@Deprecated public Class<?> getJavaClass()
AdhocObjectFactory
should be used as it can
provide the environment-specific class loading policy.public EmbeddableAttribute getAttributeForDbPath(String dbPath)
dbAttribute
parameter. Returns null if no such attribute is
found.public SortedMap<String,EmbeddableAttribute> getAttributeMap()
public Collection<EmbeddableAttribute> getAttributes()
public void addAttribute(EmbeddableAttribute attribute)
public EmbeddableAttribute getAttribute(String name)
public void removeAttribute(String name)
public String getClassName()
public void setClassName(String className)
public void encodeAsXML(XMLEncoder encoder, ConfigurationNodeVisitor delegate)
XMLSerializable
implementation that generates XML for embeddable.encodeAsXML
in interface XMLSerializable
Copyright © 2001–2017 Apache Cayenne. All rights reserved.