jdbcadmin.core.data
Class Table

java.lang.Object
  extended byjdbcadmin.core.data.Table
All Implemented Interfaces:
java.lang.Comparable, java.io.Serializable

public class Table
extends java.lang.Object
implements java.lang.Comparable, java.io.Serializable

Represente une table

See Also:
Serialized Form

Constructor Summary
Table(java.lang.String aNom, Schema aSchema)
          Constructor
 
Method Summary
 void addColumn(Column aCol)
          Adds a column
 void addPKColumn(java.lang.String aPKColName)
          Adds a primarykey column
 int compareTo(java.lang.Object aObj)
           
 boolean containsColumn(java.lang.String aColName)
          Indicates whether or not the table contains the specified column
 java.util.List getColMap()
           
 Column getColumn(java.lang.String aNom)
          Retrieves a column
 java.util.List getColumnNames()
           
 int getColumnNumber()
           
 java.util.Map getColumnSizes()
          Retrieves a Map associating column names with their display size.
 java.lang.String getCompleteName()
           
 java.lang.String getHeaderString()
          Retrieves a String with column namles, ready to display.
 java.lang.String getName()
           
 java.util.List getPkColumns()
           
 Schema getSchema()
           
 boolean hasPrimaryKey()
          Indicates whether or not the table has got a primary key
 boolean isFilled()
           
 boolean isPKColumn(java.lang.String aColName)
          Inidactes whether or not the specified column is part of the primary key
 java.util.Iterator iterateColumnNames()
          Iterate the column names.
 java.util.Iterator iterateColumns()
          Iterate the columns.
 void setFilled(boolean aFilled)
           
 void setPkColumns(java.util.List aPkColumns)
           
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Table

public Table(java.lang.String aNom,
             Schema aSchema)
Constructor

Parameters:
aNom - table name
aSchema - schema
Method Detail

toString

public java.lang.String toString()


addPKColumn

public void addPKColumn(java.lang.String aPKColName)
                 throws java.lang.IllegalArgumentException
Adds a primarykey column

Parameters:
aPKColName - name of the pk column
Throws:
java.lang.IllegalArgumentException - if there is no columns with this name in the table

addColumn

public void addColumn(Column aCol)
Adds a column

Parameters:
aCol - the column to had

containsColumn

public boolean containsColumn(java.lang.String aColName)
Indicates whether or not the table contains the specified column

Parameters:
aColName - name of the searched column
Returns:
true if exists, false otherwise

isPKColumn

public boolean isPKColumn(java.lang.String aColName)
Inidactes whether or not the specified column is part of the primary key

Parameters:
aColName - name of the searched column
Returns:
true if belongs to the PK, false otherwise

iterateColumns

public java.util.Iterator iterateColumns()
Iterate the columns.

Returns:
iterator on columns

iterateColumnNames

public java.util.Iterator iterateColumnNames()
Iterate the column names.

Returns:
iterator on column names

getColumnSizes

public java.util.Map getColumnSizes()
Retrieves a Map associating column names with their display size.

Returns:
the map

getHeaderString

public java.lang.String getHeaderString()
                                 throws TechnicalException
Retrieves a String with column namles, ready to display.

Returns:
the header string
Throws:
TechnicalException - technical error

getColumnNumber

public int getColumnNumber()
Returns:
the numner of columns

getColumn

public Column getColumn(java.lang.String aNom)
Retrieves a column

Parameters:
aNom - column name
Returns:
the column

getColumnNames

public java.util.List getColumnNames()
Returns:
the column names list

getColMap

public java.util.List getColMap()
Returns:
the colums list

hasPrimaryKey

public boolean hasPrimaryKey()
Indicates whether or not the table has got a primary key

Returns:
true is has a primary kay, false otherwise

getCompleteName

public java.lang.String getCompleteName()
Returns:
the complete name (prefixed by the schema name)

compareTo

public int compareTo(java.lang.Object aObj)
Specified by:
compareTo in interface java.lang.Comparable
Throws:
java.lang.IllegalArgumentException - if aObj is not a Table

isFilled

public boolean isFilled()
Returns:
Returns the filled.

setFilled

public void setFilled(boolean aFilled)
Parameters:
aFilled - The filled to set.

getName

public java.lang.String getName()
Returns:
Returns the name.

getPkColumns

public java.util.List getPkColumns()
Returns:
Returns the pkColumns.

setPkColumns

public void setPkColumns(java.util.List aPkColumns)
Parameters:
aPkColumns - The pkColumns to set.

getSchema

public Schema getSchema()
Returns:
Returns the schema.


Copyright © 2004-2005 Norsys. All Rights Reserved.