easik.sketch.util.Export.Components
Class ExportAttribute

java.lang.Object
  extended by easik.sketch.util.Export.Components.ExportAttribute

public class ExportAttribute
extends java.lang.Object

Class to store attribute information. Should only be used for exportation to a database. Does not provide functionality for graphical display.

Since:
2006-05-18 Vera Ranieri
Version:
2006-06-30 Vera Ranieri
Author:
Vera Ranieri 2006

Field Summary
private  java.lang.String _name
          The name of this attribute
private  java.lang.String _type
          The type of this attribute
private  java.util.HashMap _types
          The HashMap of types, indexed by the platform
 
Constructor Summary
ExportAttribute(java.lang.String name, java.lang.String tempType, java.util.HashMap types)
          Constructor.
 
Method Summary
static java.lang.String getAttributeString(ExportTable t)
          Formats the Attribute string for SQL.
 java.lang.String getName()
          Getter method for the name of the attribute
 java.lang.String getType()
          Getter method for the data type of the attribute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_name

private java.lang.String _name
The name of this attribute


_type

private java.lang.String _type
The type of this attribute


_types

private java.util.HashMap _types
The HashMap of types, indexed by the platform

Constructor Detail

ExportAttribute

public ExportAttribute(java.lang.String name,
                       java.lang.String tempType,
                       java.util.HashMap types)
Constructor. Attributes are not allowed to have whitespace in the name. Any contained whitespaces are replaced with an underscore.

Parameters:
name - The name of the attribute
tempType - The data type of the attribute
types - HashMap of all types, indexed by the key type
Since:
2006-05-18, Vera Ranieri
Method Detail

getName

public java.lang.String getName()
Getter method for the name of the attribute

Returns:
The name of the attribute
Since:
2006-05-18, Vera Ranieri

getType

public java.lang.String getType()
Getter method for the data type of the attribute

Returns:
The data type of the attribute
Since:
2006-05-18, Vera Ranieri

getAttributeString

public static java.lang.String getAttributeString(ExportTable t)
Formats the Attribute string for SQL. Accepts a table as a parameter. The attributes of this table are then determined and the attribute string is created. This attribute string does not contain any foreign key references or unique or primary key references.

Parameters:
t - The table for which attributes need to be determined.
Returns:
The attribute string formatted for SQL derived from table t
Since:
2006-06-14, Vera Ranieri