Class Attribute<E extends Entity<E,A,R>, A extends Attribute<E,A,R>, R extends Relationship<E,A,R>>

java.lang.Object
org.apache.cayenne.map.Attribute<E,A,R>
All Implemented Interfaces:
XMLSerializable
Direct Known Subclasses:
DbAttribute, ObjAttribute

public abstract class Attribute<E extends Entity<E,A,R>, A extends Attribute<E,A,R>, R extends Relationship<E,A,R>> extends Object implements XMLSerializable
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.
  • Field Details

  • Constructor Details

    • Attribute

      public Attribute()
      Creates an unnamed Attribute.
    • Attribute

      public Attribute(String name)
      Creates a named Attribute.
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • encodeAsXML

      public abstract void encodeAsXML(XMLEncoder encoder, ProjectNodeVisitor<?> delegate)
      Description copied from interface: XMLSerializable
      Prints itself as XML to the provided XMLEncoder.
      Specified by:
      encodeAsXML in interface XMLSerializable
    • getEntity

      public Entity<E,A,R> getEntity()
      Returns parent entity that holds this attribute.
    • setEntity

      public void setEntity(Entity<E,A,R> entity)
      Sets parent entity that holds this attribute.
    • getName

      public String getName()
    • setName

      public void setName(String name)