rdbtoonto.dbmodel
Class Attribute

java.lang.Object
  extended by rdbtoonto.dbmodel.Attribute

public class Attribute
extends java.lang.Object

Class for attribute definition


Constructor Summary
Attribute(java.lang.String name, AType type)
           
 
Method Summary
 void addFriendlyName(java.lang.String friendlyName)
           
 boolean compatible(Attribute a)
          Test of Type compatibility between two attributes
 void display()
           
 java.lang.String getFriendlyName()
          Returns the first friendly name for the attribute if any (otherwise null).
 java.util.Vector<java.lang.String> getFriendlyNames()
          Returns the friendly names.
 java.lang.String getName()
           
 AType getType()
           
 boolean hasFriendlyName()
          Returns true if the attribute has finally at least one friendly name.
 boolean isForeignKey()
           
 boolean isPrimaryKey()
           
 void setIsForeignKey(boolean val)
           
 void setIsPrimaryKey(boolean val)
           
 void setName(java.lang.String name)
           
 void setType(AType type)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Attribute

public Attribute(java.lang.String name,
                 AType type)
Method Detail

getName

public java.lang.String getName()

setName

public void setName(java.lang.String name)

getType

public AType getType()

setType

public void setType(AType type)

isPrimaryKey

public boolean isPrimaryKey()

setIsPrimaryKey

public void setIsPrimaryKey(boolean val)

isForeignKey

public boolean isForeignKey()

setIsForeignKey

public void setIsForeignKey(boolean val)

getFriendlyName

public java.lang.String getFriendlyName()
Returns the first friendly name for the attribute if any (otherwise null).
Friendly names might found in forms.


hasFriendlyName

public boolean hasFriendlyName()
Returns true if the attribute has finally at least one friendly name.


getFriendlyNames

public java.util.Vector<java.lang.String> getFriendlyNames()
Returns the friendly names.
If none defined, an empty vector is returned.


addFriendlyName

public void addFriendlyName(java.lang.String friendlyName)

display

public void display()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

compatible

public boolean compatible(Attribute a)
Test of Type compatibility between two attributes