Oracle® Data Integrator Java API Reference
11g Release 1 (11.1.1.3.0)

E17060-01

oracle.odi.domain.model
Class OdiSubModel

java.lang.Object
  extended by oracle.odi.domain.support.BusinessObject
      extended by oracle.odi.domain.support.AbstractRepositoryEntity
          extended by oracle.odi.domain.support.AbstractOdiEntity
              extended by oracle.odi.domain.model.AbstractOdiSubModel
                  extended by oracle.odi.domain.model.OdiSubModel
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, IExportable, IOdiEntity, IRepositoryEntity, IWorkDevelopmentOdiEntity

public class OdiSubModel
extends AbstractOdiSubModel

A sub model is a group of functionally homogeneous datastores within a model.

A sub model may be contained by a OdiModel or another sub model. A sub model may also contain any number of other sub models.

The datastores of a model can be inserted directly by using AbstractOdiSubModel.addDataStore(OdiDataStore), or by automatic distribution. The base class AbstractOdiSubModel handles adding, removing datastores. This class handles the automatic distribution configuration for the datastores.

For automatic distribution, Use this class to define a distribution rule of the datastores in your sub models. Datastores, depending on the datastores distribution rule for each sub model, are compared to the automatic distribution mask. If they match this pattern, then they are moved into this sub model.

There are two methods to classify:

  • (UI Only) By clicking Distribution the current rule is applied to the datastores.
  • At the end of the reverse-engineering process, all rules are applied in the order specified in the Order of mask application after a Reverse field.

    Since:
    11.1.1.3.0
    See Also:
    Serialized Form

    Nested Class Summary
    static class OdiSubModel.DistributionRule
              Defines data store distribution rule that apply to an OdiSubModel.
     
    Field Summary
     
    Fields inherited from class oracle.odi.domain.model.AbstractOdiSubModel
    CODE_MAX_LENGTH, NAME_MAX_LENGTH
     
    Fields inherited from class oracle.odi.domain.support.AbstractOdiEntity
    STARTING_INTERNAL_VERSION
     
    Constructor Summary
    OdiSubModel(OdiModel pParentModel, java.lang.String pName, java.lang.String pCode)
              Creates a sub model with a parent model, a name and a code.
    OdiSubModel(OdiSubModel pParentSubModel, java.lang.String pName, java.lang.String pCode)
              Creates a sub model with a parent sub model, a name and a code.
     
    Method Summary
     void addSubModel(OdiSubModel pSubModel)
              Add the given sub model to the collection of sub models of this OdiSubModel instance.
     java.lang.String getDistributionMask()
              Get the distribution mask for this OdiSubModel instance.
     java.lang.String getDistributionOrder()
              Get the distribution order for this OdiSubModel instance.
     OdiSubModel.DistributionRule getDistributionRule()
              Get the distribution rule for this OdiSubModel instance.
     OdiSubModel getParentSubModel()
              Returns the parent sub model of this OdiSubModel instance.
     java.util.Collection<OdiSubModel> getSubModels()
              Obtains the unmodifiable collection of sub models of this OdiSubModel instance.
     void removeSubModel(OdiSubModel pSubModel)
              Remove the given sub model from the collection of sub models of this OdiSubModel instance.
     void setDistributionMask(java.lang.String pDistributionMask)
              Set the distribution mask for this OdiSubModel instance.
     void setDistributionOrder(java.lang.String pDistributionOrder)
              Defines the distribution order of this OdiSubModel instance.
     void setDistributionRule(OdiSubModel.DistributionRule pDistributionRule)
              Set the distribution rule for this OdiSubModel instance.
     void setName(java.lang.String pName)
              Set the name of this OdiSubModel instance.
     
    Methods inherited from class oracle.odi.domain.model.AbstractOdiSubModel
    addDataStore, getCode, getDataStores, getInternalId, getModel, getName, getSecurityContainer, getSubModelId, removeDataStore
     
    Methods inherited from class oracle.odi.domain.support.AbstractOdiEntity
    equals, getFirstDate, getFirstUser, getInternalVersion, getLastDate, getLastUser, hashCode, isInstanceLevelSecurityNeeded, isNew, toString
     
    Methods inherited from class oracle.odi.domain.support.BusinessObject
    clone
     
    Methods inherited from class java.lang.Object
    getClass, notify, notifyAll, wait, wait, wait
     
    Methods inherited from interface oracle.odi.domain.IOdiEntity
    getFirstDate, getFirstUser, getLastDate, getLastUser, isInstanceLevelSecurityNeeded
     

    Constructor Detail

    OdiSubModel

    public OdiSubModel(OdiModel pParentModel,
                       java.lang.String pName,
                       java.lang.String pCode)
    Creates a sub model with a parent model, a name and a code.

    Parameters:
    pParentModel - parent model
    pName - sub model name
    pCode - unique code for sub model
    Throws:
    java.lang.IllegalArgumentException - if parent model is null ; if the name is null, empty or longer than NAME_MAX_LENGTH; if the code is null, empty, longer than CODE_MAX_LENGTH, or contains whitespaces or is not uppercase
    See Also:
    OdiModel

    OdiSubModel

    public OdiSubModel(OdiSubModel pParentSubModel,
                       java.lang.String pName,
                       java.lang.String pCode)
    Creates a sub model with a parent sub model, a name and a code.

    Parameters:
    pParentSubModel - parent sub model
    pName - sub model name
    pCode - unique sub model code
    Throws:
    java.lang.IllegalArgumentException - if the parent sub model is null ; if the name is null, empty or longer than NAME_MAX_LENGTH ; if the code is null, empty, longer than CODE_MAX_LENGTH, contains whitespaces or is not uppercase
    Method Detail

    addSubModel

    public void addSubModel(OdiSubModel pSubModel)
    Add the given sub model to the collection of sub models of this OdiSubModel instance.

    This will also set the ParentSubModel of the given sub model to this sub model. If the given sub model was already associated to an other sub model, it will be removed from the other sub model.

    Parameters:
    pSubModel - sub model to be added
    Throws:
    java.lang.IllegalArgumentException - if pSubModel is null or if you try to move the pSubModel to an other OdiModel or if you try to create cycles in hierarchy

    getDistributionMask

    public java.lang.String getDistributionMask()
    Get the distribution mask for this OdiSubModel instance.

    The distribution mask determines the pattern to which the datastores names must adhere to be classified in this OdiSubModel instance.

    Returns:
    the mask for data stores distribution
    See Also:
    setDistributionMask(String)

    getDistributionOrder

    public java.lang.String getDistributionOrder()
    Get the distribution order for this OdiSubModel instance.

    The distribution order determines the order in which the mask is applied at the end of a reverse-engineering process. Consequently, a rule with a high priority order on all datastores will have precedence. A rule with a high order on non classified datastores will apply only on datastores ignored by the other rules' patterns. At the end of the reverse-engineering process, new datastores are considered as non classified. Those already classified as a sub model stay attached to their sub model.

    Returns:
    the distribution order of this OdiSubModel instance
    See Also:
    setDistributionOrder(String)

    getDistributionRule

    public OdiSubModel.DistributionRule getDistributionRule()
    Get the distribution rule for this OdiSubModel instance.

    The distribution rule determines which datastores will be considered and compared to the automatic assignment mask.

    Returns:
    the distribution rule
    See Also:
    setDistributionRule(DistributionRule)

    getParentSubModel

    public OdiSubModel getParentSubModel()
    Returns the parent sub model of this OdiSubModel instance.

    Returns:
    an OdiSubModel object representing the parent sub model value

    getSubModels

    public java.util.Collection<OdiSubModel> getSubModels()
    Obtains the unmodifiable collection of sub models of this OdiSubModel instance.

    Use removeSubModel(OdiSubModel) and addSubModel(OdiSubModel) to respectively add and remove a sub model.

    Returns:
    the unmodifiable collection of sub models
    See Also:
    addSubModel(OdiSubModel), removeSubModel(OdiSubModel)

    removeSubModel

    public void removeSubModel(OdiSubModel pSubModel)
    Remove the given sub model from the collection of sub models of this OdiSubModel instance.

    This will also reset the OdiSubModel of the given sub model to null.

    Note: IOdiEntityManager.remove(pSubModel) must also be called in order to remove the sub model from the repository

    Parameters:
    pSubModel - sub model to be removed
    Throws:
    java.lang.IllegalArgumentException - if pSubModel is null or does not belong to this OdiSubModel

    setDistributionMask

    public void setDistributionMask(java.lang.String pDistributionMask)
    Set the distribution mask for this OdiSubModel instance.

    The distribution mask determines the pattern to which the datastores names must adhere to be classified in this OdiSubModel instance.

    Parameters:
    pDistributionMask - the data stores distribution mask
    See Also:
    getDistributionMask()

    setDistributionOrder

    public void setDistributionOrder(java.lang.String pDistributionOrder)
    Defines the distribution order of this OdiSubModel instance.

    The distribution order determines the order in which the mask is applied at the end of a reverse-engineering process. Consequently, a rule with a high priority order on all datastores will have precedence. A rule with a high order on non classified datastores will apply only on datastores ignored by the other rules' patterns. At the end of the reverse-engineering process, new datastores are considered as non classified. Those already classified as a sub model stay attached to their sub model.

    By default distribution order is set to null.

    Parameters:
    pDistributionOrder - the distribution order
    See Also:
    getDistributionOrder()

    setDistributionRule

    public void setDistributionRule(OdiSubModel.DistributionRule pDistributionRule)
    Set the distribution rule for this OdiSubModel instance.

    The distribution rule determines which datastores will be considered and compared to the automatic assignment mask.

    By default distribution rule is set to OdiSubModel.DistributionRule.NO_DISTRIBUTION.

    Parameters:
    pDistributionRule - the distribution rule
    Throws:
    java.lang.IllegalArgumentException - if given rule is null
    See Also:
    getDistributionRule()

    setName

    public void setName(java.lang.String pName)
    Set the name of this OdiSubModel instance.

    Parameters:
    pName - sub model name
    Throws:
    java.lang.IllegalArgumentException - if the name is null, empty, contains whitespaces or is longer than NAME_MAX_LENGTH

    Oracle® Data Integrator Java API Reference
    11g Release 1 (11.1.1.3.0)

    E17060-01

    Copyright © 2010, Oracle and/or its affiliates. All rights reserved.