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
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
encodeAsXML(XMLEncoder encoder, ConfigurationNodeVisitor delegate)
Prints itself as XML to the provided XMLEncoder.Entity
getEntity()
Returns parent entity that holds this attribute.String
getName()
Returns the name property of this object.Object
getParent()
Returns the parent map.void
setEntity(Entity entity)
Sets parent entity that holds this attribute.void
setName(String name)
void
setParent(Object parent)
Stores the parent map.String
toString()
-
-
-
Constructor Detail
-
Attribute
public Attribute()
Creates an unnamed Attribute.
-
Attribute
public Attribute(String name)
Creates a named Attribute.
-
-
Method Detail
-
encodeAsXML
public abstract void encodeAsXML(XMLEncoder encoder, ConfigurationNodeVisitor delegate)
Description copied from interface:XMLSerializable
Prints itself as XML to the provided XMLEncoder.- Specified by:
encodeAsXML
in interfaceXMLSerializable
-
getEntity
public Entity getEntity()
Returns parent entity that holds this attribute.
-
setEntity
public void setEntity(Entity entity)
Sets parent entity that holds this attribute.
-
getName
public String getName()
Description copied from interface:CayenneMapEntry
Returns the name property of this object.- Specified by:
getName
in interfaceCayenneMapEntry
- Returns:
- name of this entry.
-
setName
public void setName(String name)
-
getParent
public Object getParent()
Description copied from interface:CayenneMapEntry
Returns the parent map.- Specified by:
getParent
in interfaceCayenneMapEntry
-
setParent
public void setParent(Object parent)
Description copied from interface:CayenneMapEntry
Stores the parent map.- Specified by:
setParent
in interfaceCayenneMapEntry
-
-