br.ufg.integrate.lookup.schema.jdbc
Class Table

java.lang.Object
  extended by br.ufg.integrate.lookup.schema.jdbc.Table
All Implemented Interfaces:
Entity

public class Table
extends Object
implements Entity

Version:
0.1 Representa um conjunto de elementos de um mesmo tipo. No caso de fontes de dados relacionais, representa uma tabela.
Author:
Rogerio

Constructor Summary
Table(String name)
           
 
Method Summary
 void addAttribute(Column c)
          Insere a coluna na coleção.
 void addAttributeRef(AttributeRef fk)
          Insere uma referência para outra tabela.
 Attribute getAttribute(String attributeName)
          Retorna a coluna pelo nome.
 List<AttributeRef> getAttributeRefs()
          Coleção de atributos desta entidade que referenciam outras entidades.
 List<Attribute> getAttributes()
          Coleção de atributos desta entidade.
 String getName()
          Nome desta entidade.
 void setAttributes(List<Attribute> attr)
           
 void setAttributesRefs(List<AttributeRef> fks)
           
 void setName(String aName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Table

public Table(String name)
Method Detail

addAttribute

public void addAttribute(Column c)
                  throws WrapperException
Insere a coluna na coleção. Não aceita inserir colunas sem nome.

Parameters:
c -
Throws:
WrapperException - Caso inserida uma coluna sem nome.

addAttributeRef

public void addAttributeRef(AttributeRef fk)
                     throws WrapperException
Insere uma referência para outra tabela.

Parameters:
fk -
Throws:
WrapperException

getAttribute

public Attribute getAttribute(String attributeName)
Retorna a coluna pelo nome.

Parameters:
attributeName -
Returns:
Coluna pelo nome.

getAttributes

public List<Attribute> getAttributes()
Description copied from interface: Entity
Coleção de atributos desta entidade.

Specified by:
getAttributes in interface Entity
Returns:
Coleção de atributos.

getAttributeRefs

public List<AttributeRef> getAttributeRefs()
Description copied from interface: Entity
Coleção de atributos desta entidade que referenciam outras entidades.

Specified by:
getAttributeRefs in interface Entity
Returns:
Coleção de atributos referenciados.

getName

public String getName()
Description copied from interface: Entity
Nome desta entidade.

Specified by:
getName in interface Entity
Returns:
Nome da entidade.

setAttributes

public void setAttributes(List<Attribute> attr)
Specified by:
setAttributes in interface Entity

setName

public void setName(String aName)

setAttributesRefs

public void setAttributesRefs(List<AttributeRef> fks)
Specified by:
setAttributesRefs in interface Entity


Copyright © 2008 Rogério Arantes Gaioso. All Rights Reserved.