wt.step.schemaGenerator
Class EntityAttribute

java.lang.Object
  extended bywt.step.schemaGenerator.EntityAttribute
All Implemented Interfaces:
Comparable

class EntityAttribute
extends Object
implements Comparable

An attribute of an Entity with a name and a type name


Field Summary
private  boolean _isInherited
           
private  String _name
           
private  EntityDefinition _parent
           
private  String _typeName
           
 
Constructor Summary
(package private) EntityAttribute(String name, String typeName, EntityDefinition parent)
           
 
Method Summary
(package private)  void appendToName(String postfix)
          Add a postfix to the existing attribute name.
 int compareTo(Object otherObj)
          Standard comparison function.
 boolean equals(Object obj)
           
(package private)  String getName()
          Accessor for this attributes name
(package private)  String getType()
           
(package private)  void setInheritedFlag(boolean value)
          Flags wether this attribute is an inherited attribute for this entity
 String toString()
           
(package private)  void writeExpress(PrintStream outStream)
          Write the attribute in express.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_isInherited

private boolean _isInherited

_name

private String _name

_typeName

private String _typeName

_parent

private EntityDefinition _parent
Constructor Detail

EntityAttribute

EntityAttribute(String name,
                String typeName,
                EntityDefinition parent)
Method Detail

getName

String getName()
Accessor for this attributes name


getType

String getType()

appendToName

void appendToName(String postfix)
Add a postfix to the existing attribute name.


writeExpress

void writeExpress(PrintStream outStream)
Write the attribute in express. If it is flaged as inherited then a commented version is written.


compareTo

public int compareTo(Object otherObj)
Standard comparison function.

Specified by:
compareTo in interface Comparable
Returns:
0 if the objects are the same. Otherwise the result of String.compareTo on their names unless these are the same in which case their parent (EntityDefinition) names are compared.

equals

public boolean equals(Object obj)

toString

public String toString()

setInheritedFlag

void setInheritedFlag(boolean value)
Flags wether this attribute is an inherited attribute for this entity