net.sourceforge.jdbcimporter
Class EntityDef

java.lang.Object
  extended bynet.sourceforge.jdbcimporter.EntityDef
Direct Known Subclasses:
ExportEntityDef, GenerateEntityDef, ImportEntityDef

public class EntityDef
extends java.lang.Object

The EntityDef class defines an entity (table). This definition includes:

Version:
0.6
Author:
Chris Nagy
See Also:
ImportEntityDef, GenerateEntityDef, ExportEntityDef

Field Summary
protected  java.util.List columns
          The list of columns.
 
Constructor Summary
EntityDef()
           
 
Method Summary
 void addColumn(ColumnDef columnDef)
          Adds a column definition.
 void addProperty(java.lang.String key, java.lang.String value)
          Add a property that is associated with the entity def.
 java.lang.String getCatalog()
          Returns the name of the catalog.
 int getColumnCount()
          Returns the number of columns
 java.util.Iterator getColumnIterator()
          Returns the list of columns.
 java.lang.String getProperty(java.lang.String key)
          Returns the value of a property that is associated with the entity def.
 java.lang.String getSchema()
          Returns the name of the schema.
 java.lang.String getTable()
          Returns the name of the table.
 void setCatalog(java.lang.String newCatalog)
          Sets the name of the catalog that contains the table.
 void setSchema(java.lang.String newSchema)
          Sets the name of the schema that owns the table.
 void setTable(java.lang.String newTable)
          Sets the name of the table.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

columns

protected java.util.List columns
The list of columns.

Constructor Detail

EntityDef

public EntityDef()
Method Detail

setTable

public void setTable(java.lang.String newTable)
Sets the name of the table.

Parameters:
newTable - name of the table

getTable

public java.lang.String getTable()
Returns the name of the table.

Returns:
name of the table

setCatalog

public void setCatalog(java.lang.String newCatalog)
Sets the name of the catalog that contains the table.

Parameters:
newCatalog - name of the catalog

getCatalog

public java.lang.String getCatalog()
Returns the name of the catalog.

Returns:
name of the catalog

setSchema

public void setSchema(java.lang.String newSchema)
Sets the name of the schema that owns the table.

Parameters:
newSchema - name of the schema

getSchema

public java.lang.String getSchema()
Returns the name of the schema.

Returns:
name of the schema

addColumn

public void addColumn(ColumnDef columnDef)
Adds a column definition.

Parameters:
columnDef - the definition of the column

getColumnIterator

public java.util.Iterator getColumnIterator()
Returns the list of columns.

Returns:
list of column definitions

getColumnCount

public int getColumnCount()
Returns the number of columns

Returns:
number of columns
Since:
0.69

addProperty

public void addProperty(java.lang.String key,
                        java.lang.String value)
Add a property that is associated with the entity def.

Parameters:
key - the name of the property
value - the value of the property

getProperty

public java.lang.String getProperty(java.lang.String key)
Returns the value of a property that is associated with the entity def. If the property does not exist then null is returned.

Parameters:
key - the name of the property
Returns:
the value of the property