|
Oracle® Data Integrator Java API Reference 11g Release 1 (11.1.1.5.0) E17060-02 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IDDLGeneratorService
Generate DDL Diffs and DDL Generation User Procedures for a model.
DDL Generator Service that allows manipulating DDL generation options to generate a procedure the can perform the DDL generation.
This service provides a functionality similar to what ODI provides in the UI when using the "Generate DDL" action on an ODI Model.
The following example show how one can choose to generate only new objects in the database: import oracle.odi.generation.support.DDLGeneratorServiceImpl;
... // Create an instance of the DDL generator using the current ODI Instance IDDLGeneratorService ddlgen = new DDLGeneratorServiceImpl(odiInstance); // Compute all differences for the ODI model we're working on: DDLDifferences diffs = ddlgen.computeDDLDifferences(myOdiModel.getModelId(), myOdiContext.getCode(), false); // Get the collection of DDLDiff objects Collection<DDLDiff> alldiffs = diffs.getDiffs(); // Filter out the differences to set only the NEW actions on all differences for (DDLDiff diff: alldiffs) { if (diff.getDiffType() == DDLDiff.DiffType.NEW) { diff.setToGenerate(true); } } // Finally, generate the ODI procedure Number newProcId = ddlgen.generateProcedure( "New Procedure000", // Procedure name null, // action group we want to use, null -> Generic Action Group destinationFolder.getFolderId(), // Odi Folder ID, diffs // The list we previously obtained from the DDL Generator service ); // Do something with the procedure... ...
Users can use any combination of DDLDiff.DiffType
and DDLDiff.ObjectType
to further refine their DDL code generation options...
DDLDiff
, DDLDifferences
Method Summary | |
---|---|
DDLDifferences |
computeDDLDifferences(java.lang.Number pOdiModelId, java.lang.String pOdiContextCode, boolean pProcessTablesOutsideOfModel) Computes a DDLDifferences object for a given ODI Model ID. |
java.lang.Number |
generateProcedure(java.lang.String pProcedureName, java.lang.Number pOdiActionGroupId, java.lang.Number pOdiFolderId, DDLDifferences pDDLDifferences) Invokes the DDL generator service to create a procedure with all DDL statements that match the list of differences defined in the pDifferences parameter. |
Method Detail |
---|
DDLDifferences computeDDLDifferences(java.lang.Number pOdiModelId, java.lang.String pOdiContextCode, boolean pProcessTablesOutsideOfModel)
Computes a DDLDifferences
object for a given ODI Model ID. Note that the differences are calculated between the saved repository model and the database. Changes applied to the model that are not saved will not be used to calculate the differences.
pOdiModelId
- Existing ODI Model IDpOdiContextCode
- Context Code for existing OdiContext used to access the tables in a schema.pProcessTablesOutsideOfModel
- Indicator to ask the generator if it needs to compare all tables of the schema with the tables of the ODI Model or limit only to the tables already defined in the ODI model.java.lang.IllegalArgumentException
- if the pContextCode is not set or pOdiModelId is not set.DDLGeneratorServiceException
- if pOdiContext or pOdiModelId cannot be found, or any other error.java.lang.Number generateProcedure(java.lang.String pProcedureName, java.lang.Number pOdiActionGroupId, java.lang.Number pOdiFolderId, DDLDifferences pDDLDifferences)
Invokes the DDL generator service to create a procedure with all DDL statements that match the list of differences defined in the pDifferences
parameter.
pProcedureName
- Name of the procedure that the generator will create.pOdiActionGroupId
- ID of the ODI Action Group to use. When set to null
, it will use the Generic Action Group as defined in ODI Topology.pOdiFolderId
- Destination Folder ID in which the procedure will be created.pDDLDifferences
- the DDLDifferences
object as obtained initially from computeDDLDifferences()
and eventually modified with setToGenerate(true)
on some of the DDLDiff
differences.java.lang.IllegalArgumentException
- if the pProcedureName is not set, OdiFolderId is null, or DDLDifferences is null.DDLGeneratorServiceException
- if pOdiModelId, pOdiFolderId or pOdiActionGroupId cannot be found, or any oother error.
|
Oracle® Data Integrator Java API Reference 11g Release 1 (11.1.1.5.0) E17060-02 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |