Skip navigation links

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

E17060-03


oracle.odi.domain.project
Class OdiUserFunction

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.project.OdiUserFunction

All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, IExportable, IOdiEntity, IRepositoryEntity, IWorkDevelopmentOdiEntity, ISmartExportable

public final class OdiUserFunction
extends oracle.odi.domain.support.AbstractOdiEntity
implements IExportable, IWorkDevelopmentOdiEntity, ISmartExportable

Represents design time metadata about a customized function that can be used in expressions of other objects such as OdiInterface, OdiUserProcedure.

OdiUserFunction is the root entity of OdiUserFunction - OdiUserFunctionImpl aggregate. Thus, an instance of OdiUserFunction controls life cycle of OdiUserFunctionImpl that belongs to it, and provides auditing informations about this aggregate.

Each OdiUserFunction can have zero, one or many implementations (OdiUserFunctionImpl). Each implementation can support one or many technologies (OdiTechnology). As the root of aggregate, OdiUserFunction manages the mappings between its implementations and technologies. Zero or one (but not more) OdiUserFunction's implementation can be declared as default for newly created technologies, i.e. automatically support them. To define default OdiUserFunctionImpl user should use mapByTechnologyExclusionSafely(OdiUserFunctionImpl, Collection, IOdiTechnologyFinder) method, passing the Collection of technologies to be NOT supported by default implementation.

There are two distinct scopes of OdiUserFunction: Global and Project.

An OdiUserFunction is independent from any physical information, thus is not tied to any OdiTechnology. As such, functionString property is just a basic text pattern defining relevant parameters and types. This functionString will be replaced during code generation by actual implementation according relevant technology where the expression will be executed (see OdiUserFunctionImpl).

Since:
11.1.1.3.0
See Also:
Serialized Form

Field Summary

 

Fields inherited from class oracle.odi.domain.support.AbstractOdiEntity
STARTING_INTERNAL_VERSION

 

Constructor Summary
OdiUserFunction(OdiProject pProject, java.lang.String pName, java.lang.String pGroupName, java.lang.String pFunctionString)
          Constructs a new OdiUserFunction with the given name, group name and functional string owned by the given OdiProject.
OdiUserFunction(java.lang.String pName, java.lang.String pGroupName, java.lang.String pFunctionString)
          Constructs a new global (i.e.

 

Method Summary
 OdiUserFunctionImpl addImplementation(java.lang.String pImplementationString)
          Creates a new implementation of this OdiUserFunction specified by pImplementationString.
 OdiUserFunctionImpl getDefaultImplementation()
          Obtains the default OdiUserFunctionImpl - implementation which automatically supports newly created technologies.
 java.lang.String getDescription()
          Obtains the description of this OdiUserFunction.
 java.lang.String getFunctionString()
          Obtains the function's string / text of this OdiUserFunction.
 java.lang.String getGroupName()
          Obtains group name for this OdiUserFunction.
 OdiUserFunctionImpl getImplementation(OdiTechnology pTechnology, IOdiTechnologyFinder pFinder)
          Obtains the OdiUserFunctionImpl which supports the given OdiTechnology or null if it is not supported.
 java.util.Collection<OdiUserFunctionImpl> getImplementations()
          Obtains an unmodifiable collection of OdiUserFunctionImpls related to this OdiUserFunction.
 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()
          Obtains the name of this OdiUserFunction.
 OdiProject getProject()
          Obtains the OdiProject this OdiUserFunction belongs to, or null if this is a global OdiUserFunction.
 IRepositoryEntity getSecurityContainer()
          Define a generic way to retrieve container for entities.
 java.util.Collection<OdiTechnology> getSupportedTechnologies(OdiUserFunctionImpl pImplementation, IOdiTechnologyFinder pFinder)
          Obtains the Collection of OdiTechnologys supported by the given OdiUserFunctionImpl.
 java.lang.Number getUserFunctionId()
          Obtains the ID of this OdiUserFunction.
 boolean isGlobal()
          Returns whether this OdiUserFunction is global, or not.
 boolean isInstanceLevelSecurityNeeded()
          Internal: this method is for internal purpose and must not be considered as part of the public API.
 void mapByTechnologyExclusion(OdiUserFunctionImpl pDefaultImpl, java.util.Collection<OdiTechnology> pExcludedTechnologies, IOdiTechnologyFinder pFinder)
          Deprecated. 
 void mapByTechnologyExclusionSafely(OdiUserFunctionImpl pDefaultImpl, java.util.Collection<OdiTechnology> pExcludedTechnologies, IOdiTechnologyFinder pFinder)
          Specify the implementation becoming default and OdiTechnologys that will not be supported by it.
 void mapByTechnologyInclusion(OdiUserFunctionImpl pImpl, java.util.Collection<OdiTechnology> pIncludedTechnologies, IOdiTechnologyFinder pFinder)
          Deprecated. 
 void mapByTechnologyInclusionSafely(OdiUserFunctionImpl pImpl, java.util.Collection<OdiTechnology> pIncludedTechnologies, IOdiTechnologyFinder pFinder)
          Specify the OdiTechnologys that will be supported by the given OdiUserFunctionImpl.
 void removeImplementation(OdiUserFunctionImpl pImplementation)
          Remove the given implementation (OdiUserFunctionImpl) of this OdiUserFunction.
 void setDescription(java.lang.String pDescription)
          Sets the description of this OdiUserFunction.
 void setFunctionString(java.lang.String pFunctionString)
          Specifies the function string value.
 void setGroupName(java.lang.String pGroupName)
          Sets the group name of this OdiUserFunction.
 void setName(java.lang.String pName)
          Sets the name of this OdiUserFunction.
 void unmapByTechnologyExclusion(IOdiTechnologyFinder pFinder)
          Finds the default OdiUserFunctionImpl and make it non-default.

 

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

 

Constructor Detail

OdiUserFunction

public OdiUserFunction(java.lang.String pName,
                       java.lang.String pGroupName,
                       java.lang.String pFunctionString)
Constructs a new global (i.e. without any enclosing project) OdiUserFunction with the given name, group name and functional string.
Parameters:
pName - - the name of the User Function
pGroupName - - the group name for the User Function
pFunctionString - - the function's string / text of the User Function
Throws:
DomainRuntimeException - if pName, pGroupName or pFunctionString is null or empty or if pName or pGroupName is longer than NAME_MAX_LENGTH
Since:
11.1.1.5.0
See Also:
NAME_MAX_LENGTH

OdiUserFunction

public OdiUserFunction(OdiProject pProject,
                       java.lang.String pName,
                       java.lang.String pGroupName,
                       java.lang.String pFunctionString)
Constructs a new OdiUserFunction with the given name, group name and functional string owned by the given OdiProject.
Parameters:
pProject - - the owning project
pName - - the name of the User Function
pGroupName - - the group name for the User Function
pFunctionString - - the function's string / text of the User Function
Throws:
DomainRuntimeException - if pName, pGroupName or pFunctionString is null or empty or if pName or pGroupName is longer than NAME_MAX_LENGTH
Since:
11.1.1.5.0
See Also:
NAME_MAX_LENGTH

Method Detail

getUserFunctionId

public java.lang.Number getUserFunctionId()
Obtains the ID of this OdiUserFunction.
Returns:
OdiUserFunction ID

getName

public java.lang.String getName()
Obtains the name of this OdiUserFunction.
Specified by:
getName in interface IOdiEntity
Overrides:
getName in class oracle.odi.domain.support.AbstractOdiEntity
Returns:
OdiUserFunction name
See Also:
setName(String)

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

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

getProject

public OdiProject getProject()
Obtains the OdiProject this OdiUserFunction belongs to, or null if this is a global OdiUserFunction.
Returns:
the OdiProject this OdiUserFunction belongs to

getFunctionString

public java.lang.String getFunctionString()
Obtains the function's string / text of this OdiUserFunction.
Returns:
function string
See Also:
setFunctionString(String)

isGlobal

public boolean isGlobal()
Returns whether this OdiUserFunction is global, or not. (true if this is a Global Scope OdiUserFunction, false if this is a Project Scope OdiUserFunction).
Returns:
whether this OdiUserFunction is global, or not

getGroupName

public java.lang.String getGroupName()
Obtains group name for this OdiUserFunction. OdiUserFunction can be grouped using this property.
Returns:
group name
See Also:
setGroupName(String)

getDescription

public java.lang.String getDescription()
Obtains the description of this OdiUserFunction.
Returns:
description
See Also:
setDescription(String)

getImplementations

public java.util.Collection<OdiUserFunctionImpl> getImplementations()
Obtains an unmodifiable collection of OdiUserFunctionImpls related to this OdiUserFunction.
Returns:
implementations

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

setFunctionString

public void setFunctionString(java.lang.String pFunctionString)
Specifies the function string value.
Parameters:
pFunctionString - a String specifying the function string value
Throws:
DomainRuntimeException - if the pFunctionString is null or empty
See Also:
getFunctionString()

setName

public void setName(java.lang.String pName)
Sets the name of this OdiUserFunction.
Parameters:
pName - name
Throws:
DomainRuntimeException - if the pName is null, empty or longer than NAME_MAX_LENGTH
Since:
11.1.1.5.0
See Also:
getName()

setGroupName

public void setGroupName(java.lang.String pGroupName)
Sets the group name of this OdiUserFunction. OdiUserFunction can be grouped using this property.
Parameters:
pGroupName - group name
Throws:
DomainRuntimeException - if the pGroupName is null, empty or longer than NAME_MAX_LENGTH
Since:
11.1.1.5.0
See Also:
getGroupName()

setDescription

public void setDescription(java.lang.String pDescription)
Sets the description of this OdiUserFunction.
Parameters:
pDescription - description
Since:
11.1.1.5.0
See Also:
getDescription()

addImplementation

public OdiUserFunctionImpl addImplementation(java.lang.String pImplementationString)
Creates a new implementation of this OdiUserFunction specified by pImplementationString.
Parameters:
pImplementationString - implementation string
Returns:
created OdiUserFunctionImpl instance
Throws:
DomainRuntimeException - if pImplementationString is null or empty
Since:
11.1.1.5.0
See Also:
removeImplementation(OdiUserFunctionImpl)

removeImplementation

public void removeImplementation(OdiUserFunctionImpl pImplementation)
Remove the given implementation (OdiUserFunctionImpl) of this OdiUserFunction.
Parameters:
pImplementation - OdiUserFunctionImpl to remove
Throws:
DomainRuntimeException - if pImplementation is null or pImplementation does not belong to this OdiUserFunction
Since:
11.1.1.5.0
See Also:
addImplementation(String)

getSupportedTechnologies

public java.util.Collection<OdiTechnology> getSupportedTechnologies(OdiUserFunctionImpl pImplementation,
                                                                    IOdiTechnologyFinder pFinder)
Obtains the Collection of OdiTechnologys supported by the given OdiUserFunctionImpl.
Parameters:
pImplementation - OdiUserFunctionImpl belonging to this OdiUserFunction
pFinder - technology finder
Returns:
supported OdiTechnologys Collection
Throws:
DomainRuntimeException - if the given IOdiTechnologyFinder is null or pImplementation does not belong to this OdiUserFunction
Since:
11.1.1.5.0

mapByTechnologyExclusionSafely

public void mapByTechnologyExclusionSafely(OdiUserFunctionImpl pDefaultImpl,
                                           java.util.Collection<OdiTechnology> pExcludedTechnologies,
                                           IOdiTechnologyFinder pFinder)

Specify the implementation becoming default and OdiTechnologys that will not be supported by it. I.e. given OdiUserFunctionImpl will support all other (not in pExcludedTechnologies) and all new created OdiTechnologys.

Thus, make sure you exclude all Technologies already supported by other OdiUserFunction's implementations.

Within a single OdiUserFunction you can have only one default implementation.

Parameters:
pDefaultImpl - OdiUserFunctionImpl belonging to this OdiUserFunction
pExcludedTechnologies - Collection of OdiTechnologys to be excluded
pFinder - technology finder
Throws:
DomainRuntimeException - if pImpl, pExcludedTechnologies or pFinder is null
java.lang.IllegalStateException - if default implementation already exists
Since:
11.1.1.5.0
See Also:
mapByTechnologyInclusionSafely(OdiUserFunctionImpl, Collection, IOdiTechnologyFinder)

mapByTechnologyExclusion

@Deprecated
public void mapByTechnologyExclusion(OdiUserFunctionImpl pDefaultImpl,
                                                java.util.Collection<OdiTechnology> pExcludedTechnologies,
                                                IOdiTechnologyFinder pFinder)
                              throws OdiTechnologyAlreadyImplementedException
Deprecated. 

Specify the implementation becoming default and OdiTechnologys that will not be supported by it. I.e. given OdiUserFunctionImpl will support all other (not in pExcludedTechnologies) and all new created OdiTechnologys.

Thus, make sure you exclude all Technologies already supported by other OdiUserFunction's implementations.

Within a single OdiUserFunction you can have only one default implementation.

Parameters:
pDefaultImpl - OdiUserFunctionImpl belonging to this OdiUserFunction
pExcludedTechnologies - Collection of OdiTechnologys to be excluded
pFinder - technology finder
Throws:
OdiTechnologyAlreadyImplementedException - if some already supported OdiTechnology is not given to be excluded.
DomainRuntimeException - if pImpl, pExcludedTechnologies or pFinder is null
java.lang.IllegalStateException - if default implementation already exists
Since:
11.1.1.5.0
See Also:
mapByTechnologyInclusionSafely(OdiUserFunctionImpl, Collection, IOdiTechnologyFinder)

unmapByTechnologyExclusion

public void unmapByTechnologyExclusion(IOdiTechnologyFinder pFinder)
Finds the default OdiUserFunctionImpl and make it non-default. This means that implementation will not automatically support new created OdiTechnologys. The set of its currently supported technologies is not changed (become mapped by Technology inclusion).
Parameters:
pFinder - technology finder
Throws:
DomainRuntimeException - if pFinder is null
Since:
11.1.1.5.0
See Also:
mapByTechnologyExclusionSafely(OdiUserFunctionImpl, Collection, IOdiTechnologyFinder), mapByTechnologyInclusionSafely(OdiUserFunctionImpl, Collection, IOdiTechnologyFinder)

mapByTechnologyInclusionSafely

public void mapByTechnologyInclusionSafely(OdiUserFunctionImpl pImpl,
                                           java.util.Collection<OdiTechnology> pIncludedTechnologies,
                                           IOdiTechnologyFinder pFinder)
Specify the OdiTechnologys that will be supported by the given OdiUserFunctionImpl.
Parameters:
pImpl - OdiUserFunctionImpl belonging to this OdiUserFunction
pIncludedTechnologies - Collection of OdiTechnologys to be supported
pFinder - technology finder
Throws:
DomainRuntimeException - if pImpl, pIncludedTechnologies or pFinder is null
Since:
11.1.1.5.0
See Also:
mapByTechnologyExclusionSafely(OdiUserFunctionImpl, Collection, IOdiTechnologyFinder)

mapByTechnologyInclusion

@Deprecated
public void mapByTechnologyInclusion(OdiUserFunctionImpl pImpl,
                                                java.util.Collection<OdiTechnology> pIncludedTechnologies,
                                                IOdiTechnologyFinder pFinder)
                              throws OdiTechnologyAlreadyImplementedException
Deprecated. 
Specify the OdiTechnologys that will be supported by the given OdiUserFunctionImpl.
Parameters:
pImpl - OdiUserFunctionImpl belonging to this OdiUserFunction
pIncludedTechnologies - Collection of OdiTechnologys to be supported
pFinder - technology finder
Throws:
OdiTechnologyAlreadyImplementedException - if one of the given OdiTechnology is already supported
DomainRuntimeException - if pImpl, pIncludedTechnologies or pFinder is null
Since:
11.1.1.5.0
See Also:
mapByTechnologyExclusionSafely(OdiUserFunctionImpl, Collection, IOdiTechnologyFinder)

getDefaultImplementation

public OdiUserFunctionImpl getDefaultImplementation()

Obtains the default OdiUserFunctionImpl - implementation which automatically supports newly created technologies. Each OdiUserFunction can have zero or one default implementation. Thus, method returns null if none OdiUserFunctionImpl is default.

The default implementation can be defined using mapByTechnologyExclusionSafely(OdiUserFunctionImpl, Collection, IOdiTechnologyFinder) method.

Returns:
default OdiUserFunctionImpl
Since:
11.1.1.5.0
See Also:
mapByTechnologyExclusionSafely(OdiUserFunctionImpl, Collection, IOdiTechnologyFinder)

getImplementation

public OdiUserFunctionImpl getImplementation(OdiTechnology pTechnology,
                                             IOdiTechnologyFinder pFinder)
Obtains the OdiUserFunctionImpl which supports the given OdiTechnology or null if it is not supported.
Parameters:
pTechnology - technology
pFinder - technology finder
Returns:
implementation supporting the given technology
Since:
11.1.1.5.0
See Also:
mapByTechnologyExclusionSafely(OdiUserFunctionImpl, Collection, IOdiTechnologyFinder), mapByTechnologyInclusionSafely(OdiUserFunctionImpl, Collection, IOdiTechnologyFinder)

Skip navigation links

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

E17060-03


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