org.clazzes.jdbc2xml.schema
Class PrimaryKeyInfo

java.lang.Object
  extended by org.clazzes.jdbc2xml.schema.PrimaryKeyInfo

public class PrimaryKeyInfo
extends java.lang.Object

This class implements all infos we need to describe a primary key.

Author:
wglas

Constructor Summary
PrimaryKeyInfo()
          Default constructor.
PrimaryKeyInfo(org.xml.sax.Attributes atts)
          Initialize this object from SAX attributes.
PrimaryKeyInfo(java.lang.String name, java.lang.String columns)
          Construct a primary key object from a name and a comma-separated list of column names.
 
Method Summary
 void addColumn(java.lang.String column)
           
 java.util.List<java.lang.String> getColumns()
           
 java.lang.String getName()
           
 void setColumns(java.util.List<java.lang.String> columns)
           
 void setName(java.lang.String name)
           
 org.xml.sax.Attributes toAttributes()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrimaryKeyInfo

public PrimaryKeyInfo()
Default constructor.


PrimaryKeyInfo

public PrimaryKeyInfo(java.lang.String name,
                      java.lang.String columns)
Construct a primary key object from a name and a comma-separated list of column names.

Parameters:
name - The name of the primary key.
columns - The list of columns,separated by commas.

PrimaryKeyInfo

public PrimaryKeyInfo(org.xml.sax.Attributes atts)
Initialize this object from SAX attributes.

Parameters:
atts - A SAX attributes bag to set to this object.
Method Detail

toAttributes

public org.xml.sax.Attributes toAttributes()
Returns:
A SAX Attributes bag filled with the information about this private key.

getName

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

setName

public void setName(java.lang.String name)
Parameters:
name - the name to set

getColumns

public java.util.List<java.lang.String> getColumns()
Returns:
the columns

setColumns

public void setColumns(java.util.List<java.lang.String> columns)
Parameters:
columns - the columns to set

addColumn

public void addColumn(java.lang.String column)
Parameters:
column - The column name to add to the list of columns.


Copyright © 2008. All Rights Reserved.