|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecteasik.sketch.attribute.EntityAttribute
public class EntityAttribute
This class is used to store information related to entity attributes.
Field Summary | |
---|---|
private javax.swing.tree.DefaultMutableTreeNode |
_attNode
The representation of this attribute as a DefaultMutableTreeNode |
private DataType |
_dataType
The data type of the attribute |
private java.lang.String |
_name
The name of the attribute |
private java.lang.String |
_tempDataType
The temporary data type |
Constructor Summary | |
---|---|
EntityAttribute(java.lang.String inName,
DataType inDataType)
Default Constructor |
|
EntityAttribute(java.lang.String inName,
java.lang.String inType)
Constructor for reading in from file when the data types have not yet been initiated and thus we must load their references after loading them into the data type controller |
Method Summary | |
---|---|
DataType |
getDataType()
Returns data type |
java.lang.String |
getName()
Returns name of attribute. |
javax.swing.tree.DefaultMutableTreeNode |
getNode()
Returns the node used for displaying the attribute |
static boolean |
isAttNameUsed(EntityNode inNode,
java.lang.String attName)
Check to see if an attribute name is already used in the entity |
static boolean |
isProtectedName(EntityNode parent,
java.lang.String attName)
Determines whether an attribute name is protected. |
void |
setDataType(DataType inType)
Sets the data type of the attribute |
void |
setName(java.lang.String inName)
Sets the attribute name. |
void |
setNode(javax.swing.tree.DefaultMutableTreeNode inNode)
Sets the node used for displaying the attribute |
void |
setTypeFromTemp()
Sets the data type from the temporary type name |
java.lang.String |
toString()
Overwrite standard toString function. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private java.lang.String _name
private DataType _dataType
private java.lang.String _tempDataType
private javax.swing.tree.DefaultMutableTreeNode _attNode
Constructor Detail |
---|
public EntityAttribute(java.lang.String inName, DataType inDataType)
inName
- Name of attributeinDataType
- Data type of attributepublic EntityAttribute(java.lang.String inName, java.lang.String inType)
inName
- The name of the attributeinType
- The name of the data type used for the attributeMethod Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public void setName(java.lang.String inName)
inName
- Attribute Namepublic java.lang.String getName()
public DataType getDataType()
public void setTypeFromTemp()
public void setDataType(DataType inType)
inType
- The data type of the attributepublic void setNode(javax.swing.tree.DefaultMutableTreeNode inNode)
inNode
- The node used for displaying the attributepublic javax.swing.tree.DefaultMutableTreeNode getNode()
public static boolean isAttNameUsed(EntityNode inNode, java.lang.String attName)
inNode
- The entity being checked againstattName
- The name being checked for duplication
public static boolean isProtectedName(EntityNode parent, java.lang.String attName)
parent
- The entity node to which the attribute is being added.attName
- The potential name of the attribute
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |