commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stevencasw...@apache.org
Subject cvs commit: jakarta-commons-sandbox/sql/src/java/org/apache/commons/sql/model Table.java
Date Mon, 21 Oct 2002 11:38:04 GMT
stevencaswell    2002/10/21 04:38:04

  Modified:    sql/src/java/org/apache/commons/sql/model Table.java
  Log:
  added properties:
  - catalog
  - remarks
  - schema
  - type
  added method addColumns to provide columns to the table object in a list
  
  Revision  Changes    Path
  1.6       +66 -1     jakarta-commons-sandbox/sql/src/java/org/apache/commons/sql/model/Table.java
  
  Index: Table.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/sql/src/java/org/apache/commons/sql/model/Table.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Table.java	20 Sep 2002 20:34:38 -0000	1.5
  +++ Table.java	21 Oct 2002 11:38:03 -0000	1.6
  @@ -67,7 +67,15 @@
   
   public class Table 
   {
  -    private String name;
  +    private String catalog = null;
  +    
  +    private String name = null;
  +
  +    private String schema = null;
  +
  +    private String remarks = null;
  +    
  +    private String type = null;
       
       private List columns = new ArrayList();
       
  @@ -78,6 +86,46 @@
       public Table() 
       {
       }
  +
  +    public String getCatalog()
  +    {
  +        return this.catalog;
  +    }
  +    
  +    public void setCatalog(String catalog)
  +    {
  +        this.catalog = catalog;
  +    }
  +
  +    public String getRemarks()
  +    {
  +        return this.remarks;
  +    }
  +    
  +    public void setRemarks(String remarks)
  +    {
  +        this.remarks = remarks;
  +    }
  +
  +    public String getSchema()
  +    {
  +        return this.schema;
  +    }
  +    
  +    public void setSchema(String schema)
  +    {
  +        this.schema = schema;
  +    }
  +    
  +    public String getType()
  +    {
  +        return (type == null) ? "(null)" : type;
  +    }
  +
  +    public void setType(String type)
  +    {
  +        this.type = type;
  +    }
       
       public String getName() 
       {
  @@ -92,6 +140,23 @@
       public void addColumn(Column column)
       {
           columns.add(column);
  +    }
  +
  +    public void addColumns(List columns)
  +    {
  +        if(columns != null &&
  +           columns.size() > 0)
  +        {
  +            int columnsSize = columns.size();
  +            for(int i = 0; i < columnsSize; i++)
  +            {
  +                Column column = (Column) columns.get(i);
  +                if(column != null)
  +                {
  +                    this.addColumn(column);
  +                }
  +            }
  +        }
       }
       
       public List getColumns()
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message