Package org.apache.cayenne.map
Class Embeddable
java.lang.Object
org.apache.cayenne.map.Embeddable
- All Implemented Interfaces:
- Serializable,- ConfigurationNode,- XMLSerializable
A mapping descriptor of an embeddable class. Embeddable is a persistent class
 that doesn't have its own identity and is embedded in other persistent
 classes. It can be viewed as a custom type mapped to one or more database
 columns. Embeddable mapping can include optional default column names that
 can be overriden by the owning entity.
- Since:
- 3.0
- See Also:
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected Map<String,EmbeddableAttribute> protected Stringprotected DataMap
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescription<T> TacceptVisitor(ConfigurationNodeVisitor<T> visitor) voidaddAttribute(EmbeddableAttribute attribute) Adds new embeddable attribute to the entity, setting its parent embeddable to be this object.voidencodeAsXML(XMLEncoder encoder, ConfigurationNodeVisitor delegate) XMLSerializableimplementation that generates XML for embeddable.getAttribute(String name) getAttributeForDbPath(String dbPath) Returns EmbeddableAttribute of this Embeddable that maps todbAttributeparameter.Returns an unmodifiable sorted map of embeddable attributes.Returns an unmodifiable collection of embeddable attributes.voidremoveAttribute(String name) voidsetClassName(String className) voidsetDataMap(DataMap dataMap) 
- 
Field Details- 
className
- 
attributes
- 
dataMap
 
- 
- 
Constructor Details- 
Embeddablepublic Embeddable()
- 
Embeddable
 
- 
- 
Method Details- 
acceptVisitor- Specified by:
- acceptVisitorin interface- ConfigurationNode
- Since:
- 3.1
 
- 
getDataMap
- 
setDataMap
- 
getAttributeForDbPathReturns EmbeddableAttribute of this Embeddable that maps todbAttributeparameter. Returns null if no such attribute is found.
- 
getAttributeMapReturns an unmodifiable sorted map of embeddable attributes.
- 
getAttributesReturns an unmodifiable collection of embeddable attributes.
- 
addAttributeAdds new embeddable attribute to the entity, setting its parent embeddable to be this object. If attribute has no name, IllegalArgumentException is thrown.
- 
getAttribute
- 
removeAttribute
- 
getClassName
- 
setClassName
- 
encodeAsXMLXMLSerializableimplementation that generates XML for embeddable.- Specified by:
- encodeAsXMLin interface- XMLSerializable
 
 
-