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

E17060-01

oracle.odi.domain.topology
Class OdiContext

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.topology.OdiContext
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, IFlexFieldUser, IMasterOdiEntity, IOdiEntity, IRepositoryEntity

public class OdiContext
extends oracle.odi.domain.support.AbstractOdiEntity
implements IFlexFieldUser, IMasterOdiEntity

An ODI Context.

This class doesn't provides any method to manage mapping between physical schema and logical schema. It only permit to define a context in the ODI topology. Such OdiContext can then be used to map schemas using the class OdiContextualSchemaMapping.

Since:
11.1.1.3.0
See Also:
OdiPhysicalSchema, OdiLogicalSchema, OdiContextualSchemaMapping, Serialized Form

Field Summary
static int CODE_MAX_LENGTH
          Max length of context code.
static int NAME_MAX_LENGTH
          Max length of context name.
 
Fields inherited from class oracle.odi.domain.support.AbstractOdiEntity
STARTING_INTERNAL_VERSION
 
Constructor Summary
OdiContext(java.lang.String pCode)
          Create a new OdiContext with given code.
OdiContext(java.lang.String pName, java.lang.String pCode)
          Create a new OdiContext with given name and code.
 
Method Summary
 java.lang.String getCode()
          Returns this OdiContext's code.
 java.lang.Number getContextId()
          Returns the Internal Context ID.
 java.util.Collection<IFlexFieldValue> getFlexFieldsValues()
          Obtains flex fields values related to this IFlexFieldUser.
 java.io.Serializable getInternalId()
          Provides a common getter for the persistence layer to obtain an identity, irrespective of the actual type of identity used.
 java.lang.String getName()
          Returns the Context Name.
 IRepositoryEntity getSecurityContainer()
          Define a generic way to retrieve container for entities.
 void initFlexFields(IOdiFlexFieldFinder pOdiFlexFieldFinder)
          Initialize flex fields related to this IFlexFieldUser.
 boolean isDefaultContext()
          Returns whether this OdiContext has been defined as default OdiContext, or not.
 boolean isInstanceLevelSecurityNeeded()
          Internal: this method is for internal purpose and must not be considered as part of the public API.
 void setDefaultContext(boolean pDefaultContext)
          Set the default context without changing other context.
 void setName(java.lang.String pName)
          Sets the Context Name.
 
Methods inherited from class oracle.odi.domain.support.AbstractOdiEntity
equals, getFirstDate, getFirstUser, getInternalVersion, getLastDate, getLastUser, hashCode, 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
 

Field Detail

CODE_MAX_LENGTH

public static final int CODE_MAX_LENGTH
Max length of context code.

See Also:
Constant Field Values

NAME_MAX_LENGTH

public static final int NAME_MAX_LENGTH
Max length of context name.

See Also:
Constant Field Values
Constructor Detail

OdiContext

public OdiContext(java.lang.String pCode)
Create a new OdiContext with given code.

This constructor also defines the context's name with that code value as a default name value for this OdiContext.

Parameters:
pCode - the context's code

OdiContext

public OdiContext(java.lang.String pName,
                  java.lang.String pCode)
Create a new OdiContext with given name and code.

Parameters:
pName - context's name
pCode - context's code
Method Detail

getCode

public java.lang.String getCode()
Returns this OdiContext's code.

Returns:
context code

getContextId

public java.lang.Number getContextId()
Returns the Internal Context ID.

Returns:
context id

getFlexFieldsValues

public java.util.Collection<IFlexFieldValue> getFlexFieldsValues()
Description copied from interface: IFlexFieldUser
Obtains flex fields values related to this IFlexFieldUser.

Specified by:
getFlexFieldsValues in interface IFlexFieldUser
Returns:
an unmodifiable Collection of flex field values

getInternalId

public java.io.Serializable getInternalId()
Description copied from interface: IRepositoryEntity
Provides a common getter for the persistence layer to obtain an identity, irrespective of the actual type of identity used.

Typically a subclass will delegate to a public SomePrimitiveWrapper getId() method. The necessity for the getInternalId() abstract method is solely because the persistence layer needs a way of obtaining the identity irrespective of the actual identity implementation choice.

Returning null from this method will indicate the object has never been saved. This will likely be relied on by some DAO implementations.

Specified by:
getInternalId in interface IRepositoryEntity
Returns:
the persistence identity of this instance

getName

public java.lang.String getName()
Returns the Context Name.

Specified by:
getName in interface IOdiEntity
Overrides:
getName in class oracle.odi.domain.support.AbstractOdiEntity
Returns:
this context name
See Also:
setName(String)

getSecurityContainer

public IRepositoryEntity getSecurityContainer()
Description copied from interface: IRepositoryEntity
Define a generic way to retrieve container for entities.

Specified by:
getSecurityContainer in interface IRepositoryEntity
Returns:
container entity

initFlexFields

public void initFlexFields(IOdiFlexFieldFinder pOdiFlexFieldFinder)
Description copied from interface: IFlexFieldUser
Initialize flex fields related to this IFlexFieldUser.

Specified by:
initFlexFields in interface IFlexFieldUser
Parameters:
pOdiFlexFieldFinder - OdiFlexField finder to be used to query flex fields

isDefaultContext

public boolean isDefaultContext()
Returns whether this OdiContext has been defined as default OdiContext, or not.

Returns:
true if this is the default context, false otherwise

isInstanceLevelSecurityNeeded

public boolean isInstanceLevelSecurityNeeded()
Description copied from interface: IOdiEntity
Internal: this method is for internal purpose and must not be considered as part of the public API.

Defines a method to capture the info on which object needs instance level privilege.

Specified by:
isInstanceLevelSecurityNeeded in interface IOdiEntity
Overrides:
isInstanceLevelSecurityNeeded in class oracle.odi.domain.support.AbstractOdiEntity
Returns:
true if instance level security needed, false otherwise

setDefaultContext

public void setDefaultContext(boolean pDefaultContext)
Set the default context without changing other context.

INTERNAL: Do not call this method. It is internally used to define default context from IOdiEntityManager#setDefaultContext(String) method, which is the public API to define default context.

Parameters:
pDefaultContext - default context value

setName

public void setName(java.lang.String pName)
Sets the Context Name.

Parameters:
pName - context name
Throws:
java.lang.IllegalArgumentException - if name is null, empty or longer than 35
See Also:
getName()

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.