Skip navigation links

Oracle TopLink Java API Reference
10g Release 3 (10.1.3.1)

B28219-01


oracle.toplink.tools.schemaframework
Class TableDefinition

java.lang.Object
  extended byoracle.toplink.tools.schemaframework.DatabaseObjectDefinition
      extended byoracle.toplink.tools.schemaframework.TableDefinition

All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable
Direct Known Subclasses:
TypeTableDefinition

public class TableDefinition
extends DatabaseObjectDefinition

Purpose: Allow a generic way of creating tables on the different platforms.

See Also:
Serialized Form

Field Summary

 

Fields inherited from class oracle.toplink.tools.schemaframework.DatabaseObjectDefinition
name, qualifier

 

Constructor Summary
TableDefinition()
           

 

Method Summary
 void addField(FieldDefinition field)
          PUBLIC: Add the field to the table.
 void addField(java.lang.String fieldName, java.lang.Class type)
          PUBLIC: Add the field to the table, default sizes are used.
 void addField(java.lang.String fieldName, java.lang.Class type, int fieldSize)
          PUBLIC: Add the field to the table.
 void addField(java.lang.String fieldName, java.lang.Class type, int fieldSize, int fieldSubSize)
          PUBLIC: Add the field to the table.
 void addField(java.lang.String fieldName, java.lang.String typeName)
          PUBLIC: Add the field to the type to a nested type.
 void addForeignKeyConstraint(ForeignKeyConstraint foreignKey)
          PUBLIC: Add a foreign key constraint to the table.
 void addForeignKeyConstraint(java.lang.String name, java.lang.String sourceField, java.lang.String targetField, java.lang.String targetTable)
          PUBLIC: Add a foreign key constraint to the table.
 void addIdentityField(java.lang.String fieldName, java.lang.Class type)
          PUBLIC: Add the field to the table, default sizes are used.
 void addIdentityField(java.lang.String fieldName, java.lang.Class type, int fieldSize)
          PUBLIC: Add the field to the table, default sizes are used.
 void addPrimaryKeyField(java.lang.String fieldName, java.lang.Class type)
          PUBLIC: Add the field to the table, default sizes are used.
 void addPrimaryKeyField(java.lang.String fieldName, java.lang.Class type, int fieldSize)
          PUBLIC: Add the field to the table, default sizes are used.
 java.lang.Object clone()
          PUBLIC: Performs a deep copy of this table definition.
 java.util.Vector getFields()
           
 java.util.Vector getForeignKeys()
           
 java.util.Vector getPrimaryKeyFieldNames()
           
 void setFields(java.util.Vector fields)
           
 void setForeignKeys(java.util.Vector foreignKeys)
           

 

Methods inherited from class oracle.toplink.tools.schemaframework.DatabaseObjectDefinition
getName, getQualifier, setName, setQualifier, toString

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Constructor Detail

TableDefinition

public TableDefinition()

Method Detail

addField

public void addField(java.lang.String fieldName,
                     java.lang.Class type)
PUBLIC: Add the field to the table, default sizes are used.
Parameters:
type - is the Java class type coresponding to the database type.

addField

public void addField(java.lang.String fieldName,
                     java.lang.Class type,
                     int fieldSize)
PUBLIC: Add the field to the table.
Parameters:
type - is the Java class type coresponding to the database type.

addField

public void addField(java.lang.String fieldName,
                     java.lang.Class type,
                     int fieldSize,
                     int fieldSubSize)
PUBLIC: Add the field to the table.
Parameters:
type - is the Java class type coresponding to the database type.

addField

public void addField(java.lang.String fieldName,
                     java.lang.String typeName)
PUBLIC: Add the field to the type to a nested type.
Parameters:
typeName - is the name of the nested type.

addField

public void addField(FieldDefinition field)
PUBLIC: Add the field to the table.

addForeignKeyConstraint

public void addForeignKeyConstraint(java.lang.String name,
                                    java.lang.String sourceField,
                                    java.lang.String targetField,
                                    java.lang.String targetTable)
PUBLIC: Add a foreign key constraint to the table.

addForeignKeyConstraint

public void addForeignKeyConstraint(ForeignKeyConstraint foreignKey)
PUBLIC: Add a foreign key constraint to the table.

addIdentityField

public void addIdentityField(java.lang.String fieldName,
                             java.lang.Class type)
PUBLIC: Add the field to the table, default sizes are used. Identity fields are used on Sybase for native sequencing, The field must be of numberish type and cannot have a subsize.
Parameters:
type - is the Java class type coresponding to the database type.

addIdentityField

public void addIdentityField(java.lang.String fieldName,
                             java.lang.Class type,
                             int fieldSize)
PUBLIC: Add the field to the table, default sizes are used. Identity fields are used on Sybase for native sequencing, The field must be of numberish type and cannot have a subsize.
Parameters:
type - is the Java class type coresponding to the database type.

addPrimaryKeyField

public void addPrimaryKeyField(java.lang.String fieldName,
                               java.lang.Class type)
PUBLIC: Add the field to the table, default sizes are used. This field is set as part of the primary key.
Parameters:
type - is the Java class type coresponding to the database type.

addPrimaryKeyField

public void addPrimaryKeyField(java.lang.String fieldName,
                               java.lang.Class type,
                               int fieldSize)
PUBLIC: Add the field to the table, default sizes are used. This field is set as part of the primary key.
Parameters:
type - is the Java class type coresponding to the database type.

clone

public java.lang.Object clone()
PUBLIC: Performs a deep copy of this table definition.
Overrides:
clone in class DatabaseObjectDefinition

getFields

public java.util.Vector getFields()

getForeignKeys

public java.util.Vector getForeignKeys()

getPrimaryKeyFieldNames

public java.util.Vector getPrimaryKeyFieldNames()

setFields

public void setFields(java.util.Vector fields)

setForeignKeys

public void setForeignKeys(java.util.Vector foreignKeys)

Skip navigation links

Copyright © 1998, 2006, Oracle. All Rights Reserved.