Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.7.2)

E13403-10


oracle.javatools.db
Class Ddl

java.lang.Object
  extended by oracle.javatools.db.Ddl


public class Ddl
extends java.lang.Object

Class for the DDL to create an object. Typically this will contain fragments of DDL statements for secondary objects. For Primary objects, it will contain the complete DDL necessary for the creation of the Object.

The DDL is not one single script. Different aspects of the creation are handled by seperate scripts. For example, table creation has one script to handle the basic creation of the tables and columns. Another script alters the table to add the constraints.

When the DDL fragments for an object are created, they are returned as an instance of a Ddl class. This is a HashTable. The file extension of the DDL script is used as the key.

This is part of the deprecated DDLGenerator api and has been replaced with DDL.


Field Summary
static java.lang.String ACO
          DDL type alter tables to add columns
static java.lang.String BODY
          DDL type package or type body
static java.lang.String CMC
          DDL type Column Comment
static java.lang.String CMT
          DDL type Table Comment
static java.lang.String CONCC
          DDL type alter table to add constraints
static java.lang.String CONFK
          DDL type alter table to add constraints
static java.lang.String CONUK
          DDL type alter table to add constraints
static java.lang.String DATABASELINK
          DDL type create databaselink
static java.lang.String DROP
          DDL type drop an object
static java.lang.String DROP_XMLSCHEMA
          DDL type drop a XML Schema object
static java.lang.String DROPCON
          DDL type drop a constraint
static java.lang.String DROPMVL
          DDL type drop a Materialized View Log
static java.lang.String EVOLVED_TYPE_ALTER
          DDL type evolved type ALTER statement
static java.lang.String FLASHBACK
          DDL type restore an object
static java.lang.String GRANT
          DDL type grant privs
static java.lang.String INCOMPLETE_TYPE
          DDL type incomplete.
static java.lang.String IND
          DDL type Create Index
static java.lang.String IOT
          DDL type alter table oracle index organized table properties
static java.lang.String LOBP
          DDL type alter table LOB Parmaters
static java.lang.String MVL
          DDL type create materialized view logs
static java.lang.String MVW
          DDL type create materialized views
static java.lang.String OET
          DDL type alter table oracle external table properties
static java.lang.String RENTAB
          DDL type rename table
static java.lang.String[] s_ddlOrder
          array of DDL type strings in a reasonable generation order.
static java.util.HashSet s_ddlTerminatorRequired
           
static java.lang.String SCHEMA
          DDL type create a schema
static java.lang.String SEQ
          DDL type Create Sequence
static java.lang.String SPEC
          DDL type package or type spec
static java.lang.String SPOOLOFF
          DDL type turn spooling off
static java.lang.String SPOOLON
          DDL type turn spooling on
static java.lang.String SYN
          DDL type Create Synonym
static java.lang.String TAB
          DDL type create tables and columns
static java.lang.String TP
          DDL type alter table oracle Table Partition properties
static java.lang.String TRG
          DDL type create triggers
static java.lang.String TRG_DIS
          DDL type disable triggers
static java.lang.String VW
          DDL type create views
static java.lang.String XMLSCHEMA
          DDL type create XML Schema (N.B.

 

Constructor Summary
Ddl()
          Deprecated. - replaced by DDL

 

Method Summary
 Ddl append(Ddl appendThis)
          appends one set of DDL to another
 boolean containsKey(java.lang.String key)
          true if this key is in the table
 DDL<oracle.javatools.db.ora.ddl.OracleDDLType> convertToNew(DBObject obj)
           
 java.lang.String get(java.lang.String key)
          gets an SQL string.
 java.lang.String[] getAddConstraints()
          Get the DDL for constraints.
 java.lang.String[] getArray(java.lang.String key)
          gets an array of SQL strings.
 java.util.List getArrayList(java.lang.String key)
          gets a List of SQL strings.
 java.lang.String[] getArrayTrimSlash(java.lang.String key)
          gets an array of SQL strings, trim slash from end of SPEC and BODY.
 java.lang.String getCreateTable()
          Get the DDL for create table
 java.lang.String getDdl()
          gets all the DDL concatenated into a string SQL*Plus settings first, then create table! SQL*Plus settings are not duplicated.
 java.lang.String getDdl(boolean addTerminators)
          gets all the DDL concatenated into a string SQL*Plus settings first, then create table! SQL*Plus settings are not duplicated.
 java.lang.String getOne(java.lang.String key)
           
 java.lang.String getSqlTerminator()
          get the current SQL statement terminator
 boolean isArray(java.lang.String ddlType)
          returns true if this DDL type is held as an array of Strings
 java.util.Set keySet()
           
 void put(java.lang.String key, java.util.Collection sqla)
          add an ArrayList of SQL strings to the key
 void put(java.lang.String key, java.lang.String sql)
          adds an SQL string to the key
 void put(java.lang.String key, java.lang.String[] sqla)
          adds an array of SQL strings to the key
 void putOne(java.lang.String key, java.lang.String sql)
          adds an SQL string to the key if it not already present
 void setSqlTerminator(java.lang.String terminator)
          set an alternative SQL statement terminator
 Ddl stripPrompts()
          strip out any prompt statements

 

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

 

Field Detail

ACO

public static final java.lang.String ACO
DDL type alter tables to add columns
See Also:
Constant Field Values

CMT

public static final java.lang.String CMT
DDL type Table Comment
See Also:
Constant Field Values

CMC

public static final java.lang.String CMC
DDL type Column Comment
See Also:
Constant Field Values

CONUK

public static final java.lang.String CONUK
DDL type alter table to add constraints
See Also:
Constant Field Values

CONFK

public static final java.lang.String CONFK
DDL type alter table to add constraints
See Also:
Constant Field Values

CONCC

public static final java.lang.String CONCC
DDL type alter table to add constraints
See Also:
Constant Field Values

OET

public static final java.lang.String OET
DDL type alter table oracle external table properties
See Also:
Constant Field Values

IOT

public static final java.lang.String IOT
DDL type alter table oracle index organized table properties
See Also:
Constant Field Values

TP

public static final java.lang.String TP
DDL type alter table oracle Table Partition properties
See Also:
Constant Field Values

LOBP

public static final java.lang.String LOBP
DDL type alter table LOB Parmaters
See Also:
Constant Field Values

IND

public static final java.lang.String IND
DDL type Create Index
See Also:
Constant Field Values

MVW

public static final java.lang.String MVW
DDL type create materialized views
See Also:
Constant Field Values

MVL

public static final java.lang.String MVL
DDL type create materialized view logs
See Also:
Constant Field Values

SEQ

public static final java.lang.String SEQ
DDL type Create Sequence
See Also:
Constant Field Values

SYN

public static final java.lang.String SYN
DDL type Create Synonym
See Also:
Constant Field Values

TAB

public static final java.lang.String TAB
DDL type create tables and columns
See Also:
Constant Field Values

TRG

public static final java.lang.String TRG
DDL type create triggers
See Also:
Constant Field Values

TRG_DIS

public static final java.lang.String TRG_DIS
DDL type disable triggers
See Also:
Constant Field Values

VW

public static final java.lang.String VW
DDL type create views
See Also:
Constant Field Values

DROP

public static final java.lang.String DROP
DDL type drop an object
See Also:
Constant Field Values

DROP_XMLSCHEMA

public static final java.lang.String DROP_XMLSCHEMA
DDL type drop a XML Schema object
See Also:
Constant Field Values

DROPMVL

public static final java.lang.String DROPMVL
DDL type drop a Materialized View Log
See Also:
Constant Field Values

FLASHBACK

public static final java.lang.String FLASHBACK
DDL type restore an object
See Also:
Constant Field Values

DROPCON

public static final java.lang.String DROPCON
DDL type drop a constraint
See Also:
Constant Field Values

RENTAB

public static final java.lang.String RENTAB
DDL type rename table
See Also:
Constant Field Values

INCOMPLETE_TYPE

public static final java.lang.String INCOMPLETE_TYPE
DDL type incomplete. This is an incomplete type or package spec. It allows references to as yet undefined types - (otherwise a self reference is not possible)
See Also:
Constant Field Values

SPEC

public static final java.lang.String SPEC
DDL type package or type spec
See Also:
Constant Field Values

EVOLVED_TYPE_ALTER

public static final java.lang.String EVOLVED_TYPE_ALTER
DDL type evolved type ALTER statement
See Also:
Constant Field Values

BODY

public static final java.lang.String BODY
DDL type package or type body
See Also:
Constant Field Values

SPOOLON

public static final java.lang.String SPOOLON
DDL type turn spooling on
See Also:
Constant Field Values

SPOOLOFF

public static final java.lang.String SPOOLOFF
DDL type turn spooling off
See Also:
Constant Field Values

SCHEMA

public static final java.lang.String SCHEMA
DDL type create a schema
See Also:
Constant Field Values

GRANT

public static final java.lang.String GRANT
DDL type grant privs
See Also:
Constant Field Values

DATABASELINK

public static final java.lang.String DATABASELINK
DDL type create databaselink
See Also:
Constant Field Values

XMLSCHEMA

public static final java.lang.String XMLSCHEMA
DDL type create XML Schema (N.B. DDL type NOT Object Type)
See Also:
Constant Field Values

s_ddlOrder

public static final java.lang.String[] s_ddlOrder
array of DDL type strings in a reasonable generation order. This is the order in which the DDL is concatenated by getDdl() This list should not contain the SPOOL commands; they get special treatment. We just want one spool command at the start and a SPOOL OFF at the end.

s_ddlTerminatorRequired

public static final java.util.HashSet s_ddlTerminatorRequired

Constructor Detail

Ddl

@Deprecated
public Ddl()
Deprecated. - replaced by DDL

Method Detail

setSqlTerminator

public void setSqlTerminator(java.lang.String terminator)
set an alternative SQL statement terminator

getSqlTerminator

public java.lang.String getSqlTerminator()
get the current SQL statement terminator

isArray

public boolean isArray(java.lang.String ddlType)
returns true if this DDL type is held as an array of Strings

containsKey

public boolean containsKey(java.lang.String key)
true if this key is in the table

put

public void put(java.lang.String key,
                java.lang.String sql)
adds an SQL string to the key

putOne

public void putOne(java.lang.String key,
                   java.lang.String sql)
adds an SQL string to the key if it not already present

put

public void put(java.lang.String key,
                java.lang.String[] sqla)
adds an array of SQL strings to the key

put

public void put(java.lang.String key,
                java.util.Collection sqla)
add an ArrayList of SQL strings to the key

get

public java.lang.String get(java.lang.String key)
gets an SQL string. This method needs more work so that it can handle a key to an array of SQL strings. In this case it should return the concatenated Strings seperated by semi-colons

getOne

public java.lang.String getOne(java.lang.String key)

getArray

public java.lang.String[] getArray(java.lang.String key)
gets an array of SQL strings. This method handles a single string by converting it to an array.

getArrayTrimSlash

public java.lang.String[] getArrayTrimSlash(java.lang.String key)
gets an array of SQL strings, trim slash from end of SPEC and BODY. This method handles a single string by converting it to an array.

getArrayList

public java.util.List getArrayList(java.lang.String key)
gets a List of SQL strings. This method handles a single string by converting it to an array.

getCreateTable

public java.lang.String getCreateTable()
Get the DDL for create table

getAddConstraints

public java.lang.String[] getAddConstraints()
Get the DDL for constraints. This is an array of alter table statements, one for each constraint

keySet

public java.util.Set keySet()

getDdl

public java.lang.String getDdl()
gets all the DDL concatenated into a string SQL*Plus settings first, then create table! SQL*Plus settings are not duplicated.

getDdl

public java.lang.String getDdl(boolean addTerminators)
gets all the DDL concatenated into a string SQL*Plus settings first, then create table! SQL*Plus settings are not duplicated.

append

public Ddl append(Ddl appendThis)
appends one set of DDL to another

stripPrompts

public Ddl stripPrompts()
strip out any prompt statements

convertToNew

public DDL<oracle.javatools.db.ora.ddl.OracleDDLType> convertToNew(DBObject obj)

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.7.2)

E13403-10


Copyright © 1997, 2013, Oracle. All rights reserved.