Package org.apache.cayenne.map
Class Attribute
java.lang.Object
org.apache.cayenne.map.Attribute
- All Implemented Interfaces:
Serializable,CayenneMapEntry,XMLSerializable
- Direct Known Subclasses:
DbAttribute,ObjAttribute
public abstract class Attribute extends Object implements CayenneMapEntry, XMLSerializable, Serializable
Defines a property descriptor that is a part of an Entity. Two examples of things that
are described by attributes are Java class properties and database table columns.
- See Also:
- Serialized Form
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description abstract voidencodeAsXML(XMLEncoder encoder, ConfigurationNodeVisitor delegate)Prints itself as XML to the provided XMLEncoder.EntitygetEntity()Returns parent entity that holds this attribute.StringgetName()Returns the name property of this object.ObjectgetParent()Returns the parent map.voidsetEntity(Entity entity)Sets parent entity that holds this attribute.voidsetName(String name)voidsetParent(Object parent)Stores the parent map.StringtoString()
-
Field Details
-
name
-
entity
-
-
Constructor Details
-
Attribute
public Attribute()Creates an unnamed Attribute. -
Attribute
Creates a named Attribute.
-
-
Method Details
-
toString
-
encodeAsXML
Description copied from interface:XMLSerializablePrints itself as XML to the provided XMLEncoder.- Specified by:
encodeAsXMLin interfaceXMLSerializable
-
getEntity
Returns parent entity that holds this attribute. -
setEntity
Sets parent entity that holds this attribute. -
getName
Description copied from interface:CayenneMapEntryReturns the name property of this object.- Specified by:
getNamein interfaceCayenneMapEntry- Returns:
- name of this entry.
-
setName
-
getParent
Description copied from interface:CayenneMapEntryReturns the parent map.- Specified by:
getParentin interfaceCayenneMapEntry
-
setParent
Description copied from interface:CayenneMapEntryStores the parent map.- Specified by:
setParentin interfaceCayenneMapEntry
-