Top Description Fields Constructors Methods
org.eclipse.persistence.tools.schemaframework

public Class VarrayDefinition

extends DatabaseObjectDefinition
Class Inheritance
Known Direct Subclasses
org.eclipse.persistence.tools.schemaframework.ObjectVarrayDefinition
Imports
java.io.*, org.eclipse.persistence.internal.databaseaccess.*, org.eclipse.persistence.internal.sessions.AbstractSession, org.eclipse.persistence.exceptions.*

Purpose: Allow for creation of varray type.

Field Summary

Modifier and TypeField and Description
protected int
protected Class<?>
protected String
protected int
Inherited from org.eclipse.persistence.tools.schemaframework.DatabaseObjectDefinition:
namequalifier

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
appendTypeString(final Writer
Target writer where to write type string.
writer
,
final AbstractSession
Current session context.
session
)

INTERNAL: Append the type.

public Writer

Returns:

Target writer with CREATE TYPE ... AS VARRAY (...) OF ... already written to it.
buildCreationWriter
(final AbstractSession
Current session context.
session
,
final Writer
Target writer.
writer
)

Implements abstract org.eclipse.persistence.tools.schemaframework.DatabaseObjectDefinition.buildCreationWriter.

INTERNAL: Return the DDL to create the VARRAY.
public Writer
public int
getSize()

PUBLIC: Return the maximum size of the array.

public Class<?>
getType()

PUBLIC: Return the type of the field.

public String
getTypeName()

PUBLIC: Return the type of the field.

public int
getTypeSize()

PUBLIC: Return the size of the element field, this is only required for some field types.

public void
setSize(int size)

PUBLIC: Set the maximum size of the array.

public void
setType(Class<?> type)

PUBLIC: Set the type of the field.

public void
setTypeName(String typeName)

PUBLIC: Set the type of the field.

public void
setTypeSize(int typeSize)

PUBLIC: Set the size of the element field, this is only required for some field types.

Inherited from org.eclipse.persistence.tools.schemaframework.DatabaseObjectDefinition:
buildVPDCreationFunctionWriterbuildVPDCreationPolicyWriterbuildVPDDeletionWriterclonecreateDatabaseSchemacreateDatabaseSchemaOnDatabasecreateObjectcreateOnDatabasedropDatabaseSchemadropDatabaseSchemaOnDatabasedropFromDatabasedropObjectgetDatabaseSchemagetFieldTypeDefinitiongetFieldTypeDefinitiongetFullNamegetNamegetQualifierhasDatabaseSchemapostCreateObjectpreDropObjectsetNamesetQualifiershouldCreateDatabaseSchemashouldCreateVPDCallstoString

Field Detail

sizeback to summary
protected int size
typeback to summary
protected Class<?> type
typeNameback to summary
protected String typeName
typeSizeback to summary
protected int typeSize

Constructor Detail

VarrayDefinitionback to summary
public VarrayDefinition()

Method Detail

appendTypeStringback to summary
public void appendTypeString(final Writer writer, final AbstractSession session) throws ValidationException

INTERNAL: Append the type.

Parameters
writer:Writer

Target writer where to write type string.

session:AbstractSession

Current session context.

Exceptions
ValidationException:
When invalid or inconsistent data were found.
buildCreationWriterback to summary
public Writer buildCreationWriter(final AbstractSession session, final Writer writer) throws ValidationException

Implements abstract org.eclipse.persistence.tools.schemaframework.DatabaseObjectDefinition.buildCreationWriter.

INTERNAL: Return the DDL to create the VARRAY.

Parameters
session:AbstractSession

Current session context.

writer:Writer

Target writer.

Returns:Writer

Target writer with CREATE TYPE ... AS VARRAY (...) OF ... already written to it.

Annotations
@Override
Exceptions
ValidationException:
When invalid or inconsistent data were found.
buildDeletionWriterback to summary
public Writer buildDeletionWriter(AbstractSession session, Writer writer) throws ValidationException

Implements abstract org.eclipse.persistence.tools.schemaframework.DatabaseObjectDefinition.buildDeletionWriter.

INTERNAL: Return the DDL to drop the varray.

Annotations
@Override
getSizeback to summary
public int getSize()

PUBLIC: Return the maximum size of the array.

getTypeback to summary
public Class<?> getType()

PUBLIC: Return the type of the field. This should be set to a java class, such as String.class, Integer.class or Date.class.

getTypeNameback to summary
public String getTypeName()

PUBLIC: Return the type of the field. This is the exact DB type name, which can be used instead of the Java class.

getTypeSizeback to summary
public int getTypeSize()

PUBLIC: Return the size of the element field, this is only required for some field types.

setSizeback to summary
public void setSize(int size)

PUBLIC: Set the maximum size of the array.

setTypeback to summary
public void setType(Class<?> type)

PUBLIC: Set the type of the field. This should be set to a java class, such as String.class, Integer.class or Date.class.

setTypeNameback to summary
public void setTypeName(String typeName)

PUBLIC: Set the type of the field. This is the exact DB type name, which can be used instead of the Java class.

setTypeSizeback to summary
public void setTypeSize(int typeSize)

PUBLIC: Set the size of the element field, this is only required for some field types.