Oracle Application Server TopLink API Reference
10g Release 2 (10.1.2)

B15903-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.util.Vector getFields()
java.util.Vector getForeignKeys()
java.util.Vector getPrimaryKeyFieldNames()
void setFields(java.util.Vector field)
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.

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 field)

setForeignKeys

public void setForeignKeys(java.util.Vector foreignKeys)

Copyright © 1998, 2005 Oracle Corporation. All Rights Reserved.