Skip navigation links

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

E17060-02


oracle.odi.core.repository
Class Repository

java.lang.Object
  extended by oracle.odi.core.repository.Repository

Direct Known Subclasses:
MasterRepository, WorkRepository

public abstract class Repository
extends java.lang.Object

Abstract superclass representing an ODI repository.

A Repository provides various technical informations about a repository, that might be required by other services implementations. It is especially providing method getDataSource() that is basically allowing for JDBC access to that repository.

Known subclasses are MasterRepository and WorkRepository.

This class isn't intent to be sub-classed by application code.

See Also:
MasterRepository, WorkRepository

Method Summary
 javax.sql.DataSource getDataSource()
          Obtains JDBC DataSource pointing to this repository.
 com.sunopsis.dwg.dbobj.SnpConnect getLegacyConnectionDef()
          INTERNAL: Returns an handle on the legacy connection definition for this repository.
static MasterRepository getMasterRepository(javax.sql.DataSource pDataSource)
          Gets a MasterRepository instance.
 java.lang.String getName()
          Obtains the name of this repository.
 int getShortId()
          Obtain the short id of this repository.
 java.lang.String getTechnologyCode()
          Obtains internal ODI technology code (aka dialect) for this repository.
static WorkRepository getWorkRepository(MasterRepository pMasterRepository, javax.sql.DataSource pDataSource, com.sunopsis.dwg.dbobj.SnpConnect pWorkSnpConnect, com.sunopsis.dwg.dbobj.SnpRemRep pWorkRemRep)
          INTERNAL: Gets a WorkRepository instance.
 long ping()
          Return the time needed to execute a very simple query on the repository.

 

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

 

Method Detail

getMasterRepository

public static MasterRepository getMasterRepository(javax.sql.DataSource pDataSource)
                                            throws OdiConfigurationException
Gets a MasterRepository instance.
Parameters:
pDataSource - JDBC DataSource of an ODI master repository
Returns:
a MasterRepository object
Throws:
OdiConfigurationException - when the DataSource provided does not match a valid ODI master repository.
MasterRepositoryResourceFailureException - if no connection can be obtained from given DataSource
MasterRepositoryVersionMismatchException - if given repository's DataSource doesn't match required version
IllegalMasterRepositoryStatusException - in case of illegal repository status
NotMasterRepositorySchemaException - if given DataSource schema does not correspond to a master repository

getWorkRepository

public static WorkRepository getWorkRepository(MasterRepository pMasterRepository,
                                               javax.sql.DataSource pDataSource,
                                               com.sunopsis.dwg.dbobj.SnpConnect pWorkSnpConnect,
                                               com.sunopsis.dwg.dbobj.SnpRemRep pWorkRemRep)
                                        throws OdiConfigurationException
INTERNAL: Gets a WorkRepository instance.
Parameters:
pMasterRepository - master repository
pDataSource - JDBC DataSource of an ODI work repository
pWorkSnpConnect -
Returns:
a WorkRepository object
Throws:
OdiConfigurationException - when the DataSource provided does not match a valid ODI work repository.
WorkRepositoryResourceFailureException - if no connection can be obtained from given DataSource
WorkRepositoryVersionMismatchException - if given repository's DataSource doesn't match required version
IllegalWorkRepositoryStatusException - in case of illegal repository status
NotWorkRepositorySchemaException - if given DataSource schema does not correspond to a work repository
RepositoriesNotBoundException - if given master and wor repositories are not bound according ODI repositories topology

getDataSource

public javax.sql.DataSource getDataSource()
Obtains JDBC DataSource pointing to this repository.

Note: this DataSource isn't managed by ODI persistence management. Don't use this DataSource to implement transactional data access code.

Returns:
a DataSource to this repository

getTechnologyCode

public java.lang.String getTechnologyCode()
Obtains internal ODI technology code (aka dialect) for this repository.
Returns:
a technology code

getName

public java.lang.String getName()
Obtains the name of this repository.
Returns:
repository's name

getLegacyConnectionDef

public com.sunopsis.dwg.dbobj.SnpConnect getLegacyConnectionDef()
INTERNAL: Returns an handle on the legacy connection definition for this repository.
Returns:
a SnpConnect object

ping

public long ping()
          throws org.springframework.dao.DataAccessResourceFailureException
Return the time needed to execute a very simple query on the repository. This can be used to have an idea on how good is the network to the repository. This can also be used to check if the repository is down or if there is a network outage.
Returns:
the time in milliseconds
Throws:
org.springframework.dao.DataAccessResourceFailureException - in case of repository access failure.

getShortId

public int getShortId()
Obtain the short id of this repository.
Returns:
the short ID as an int

Skip navigation links

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

E17060-02


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