Package org.apache.cayenne.map
Class EmbeddedAttribute
java.lang.Object
org.apache.cayenne.map.Attribute
org.apache.cayenne.map.ObjAttribute
org.apache.cayenne.map.EmbeddedAttribute
- All Implemented Interfaces:
- Serializable,- ConfigurationNode,- CayenneMapEntry,- XMLSerializable
public class EmbeddedAttribute extends ObjAttribute
An attribute of the ObjEntity that maps to an embeddable class.
- Since:
- 3.0
- See Also:
- Serialized Form
- 
Field SummaryFields Modifier and Type Field Description protected Map<String,String>attributeOverridesFields inherited from class org.apache.cayenne.map.ObjAttributedbAttributePath, type, usedForLocking
- 
Constructor SummaryConstructors Constructor Description EmbeddedAttribute()EmbeddedAttribute(String name)EmbeddedAttribute(String name, String type, ObjEntity entity)
- 
Method SummaryModifier and Type Method Description voidaddAttributeOverride(String name, String dbAttributeName)voidencodeAsXML(XMLEncoder encoder, ConfigurationNodeVisitor delegate)Prints itself as XML to the provided XMLEncoder.ObjAttributegetAttribute(String name)Returns an ObjAttribute for a given name, taking into account column name overrides.ObjAttributegetAttributeForDbPath(String dbPath)Returns an ObjAttribute that maps to a givenDbAttribute, or returns null if no such attribute exists.Map<String,String>getAttributeOverrides()Collection<ObjAttribute>getAttributes()Returns a Collection of ObjAttributes of an embedded object taking into account column name overrides.EmbeddablegetEmbeddable()Class<?>getJavaClass()Returns Java class of an object property described by this attribute.StringgetType()Returns a type of this attribute that must be anEmbeddableobject.voidremoveAttributeOverride(String name)voidsetType(String type)Sets a type of this attribute that must be anEmbeddableobject.Methods inherited from class org.apache.cayenne.map.ObjAttributeacceptVisitor, getClientAttribute, getDbAttribute, getDbAttributeName, getDbAttributePath, getDbPathIterator, getDbPathIterator, getEntity, getMaxLength, isFlattened, isInherited, isMandatory, isPrimaryKey, isUsedForLocking, setDbAttributePath, setUsedForLocking, toString, updateDbAttributePath
- 
Field Details- 
attributeOverrides
 
- 
- 
Constructor Details- 
EmbeddedAttributepublic EmbeddedAttribute()
- 
EmbeddedAttribute
- 
EmbeddedAttribute
 
- 
- 
Method Details- 
encodeAsXMLDescription copied from class:ObjAttributePrints itself as XML to the provided XMLEncoder.- Specified by:
- encodeAsXMLin interface- XMLSerializable
- Overrides:
- encodeAsXMLin class- ObjAttribute
 
- 
getAttributeOverrides
- 
getEmbeddable
- 
getAttributeForDbPathReturns an ObjAttribute that maps to a givenDbAttribute, or returns null if no such attribute exists.
- 
getAttributeReturns an ObjAttribute for a given name, taking into account column name overrides.
- 
getAttributesReturns a Collection of ObjAttributes of an embedded object taking into account column name overrides.
- 
addAttributeOverride
- 
removeAttributeOverride
- 
getTypeReturns a type of this attribute that must be anEmbeddableobject.- Overrides:
- getTypein class- ObjAttribute
 
- 
getJavaClassReturns Java class of an object property described by this attribute. Wraps any thrown exceptions into CayenneRuntimeException.- Overrides:
- getJavaClassin class- ObjAttribute
 
- 
setTypeSets a type of this attribute that must be anEmbeddableobject.- Overrides:
- setTypein class- ObjAttribute
 
 
-