org.pentaho.di.repository.kdr.delegates
Class KettleDatabaseRepositoryDatabaseDelegate

java.lang.Object
  extended by org.pentaho.di.repository.kdr.delegates.KettleDatabaseRepositoryBaseDelegate
      extended by org.pentaho.di.repository.kdr.delegates.KettleDatabaseRepositoryDatabaseDelegate

public class KettleDatabaseRepositoryDatabaseDelegate
extends KettleDatabaseRepositoryBaseDelegate


Constructor Summary
KettleDatabaseRepositoryDatabaseDelegate(KettleDatabaseRepository repository)
           
 
Method Summary
 void delDatabase(ObjectId id_database)
           
 void delDatabaseAttributes(ObjectId id_database)
           
 void deleteDatabaseMeta(String databaseName)
          Remove a database connection from the repository
 RowMetaAndData getDatabase(ObjectId id_database)
           
 RowMetaAndData getDatabaseAttribute(ObjectId id_database_attribute)
           
 Collection<RowMetaAndData> getDatabaseAttributes()
           
 String getDatabaseConTypeCode(ObjectId id_database_contype)
           
 ObjectId getDatabaseConTypeID(String code)
           
 ObjectId getDatabaseID(String name)
           
 String getDatabaseTypeCode(ObjectId id_database_type)
           
 ObjectId getDatabaseTypeID(String code)
           
 int getNrDatabaseAttributes(ObjectId id_database)
           
 int getNrDatabases()
           
 int getNrDatabases(ObjectId id_transformation)
           
 ObjectId insertDatabase(String name, String type, String access, String host, String dbname, String port, String user, String pass, String servername, String data_tablespace, String index_tablespace)
           
 DatabaseMeta loadDatabaseMeta(ObjectId id_database)
          Load the Database Info
 void saveDatabaseMeta(DatabaseMeta databaseMeta)
          Saves the database information into a given repository.
 void updateDatabase(ObjectId id_database, String name, String type, String access, String host, String dbname, String port, String user, String pass, String servername, String data_tablespace, String index_tablespace)
           
 
Methods inherited from class org.pentaho.di.repository.kdr.delegates.KettleDatabaseRepositoryBaseDelegate
quote, quoteTable
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KettleDatabaseRepositoryDatabaseDelegate

public KettleDatabaseRepositoryDatabaseDelegate(KettleDatabaseRepository repository)
Method Detail

getDatabaseID

public ObjectId getDatabaseID(String name)
                       throws KettleException
Throws:
KettleException

getDatabaseTypeCode

public String getDatabaseTypeCode(ObjectId id_database_type)
                           throws KettleException
Throws:
KettleException

getDatabaseConTypeCode

public String getDatabaseConTypeCode(ObjectId id_database_contype)
                              throws KettleException
Throws:
KettleException

getDatabase

public RowMetaAndData getDatabase(ObjectId id_database)
                           throws KettleException
Throws:
KettleException

getDatabaseAttribute

public RowMetaAndData getDatabaseAttribute(ObjectId id_database_attribute)
                                    throws KettleException
Throws:
KettleException

getDatabaseAttributes

public Collection<RowMetaAndData> getDatabaseAttributes()
                                                 throws KettleDatabaseException,
                                                        KettleValueException
Throws:
KettleDatabaseException
KettleValueException

loadDatabaseMeta

public DatabaseMeta loadDatabaseMeta(ObjectId id_database)
                              throws KettleException
Load the Database Info

Throws:
KettleException

saveDatabaseMeta

public void saveDatabaseMeta(DatabaseMeta databaseMeta)
                      throws KettleException
Saves the database information into a given repository.

Parameters:
databaseMeta - The database metadata object to store
Throws:
KettleException - if an error occurs.

insertDatabase

public ObjectId insertDatabase(String name,
                               String type,
                               String access,
                               String host,
                               String dbname,
                               String port,
                               String user,
                               String pass,
                               String servername,
                               String data_tablespace,
                               String index_tablespace)
                        throws KettleException
Throws:
KettleException

updateDatabase

public void updateDatabase(ObjectId id_database,
                           String name,
                           String type,
                           String access,
                           String host,
                           String dbname,
                           String port,
                           String user,
                           String pass,
                           String servername,
                           String data_tablespace,
                           String index_tablespace)
                    throws KettleException
Throws:
KettleException

getDatabaseTypeID

public ObjectId getDatabaseTypeID(String code)
                           throws KettleException
Throws:
KettleException

getDatabaseConTypeID

public ObjectId getDatabaseConTypeID(String code)
                              throws KettleException
Throws:
KettleException

deleteDatabaseMeta

public void deleteDatabaseMeta(String databaseName)
                        throws KettleException
Remove a database connection from the repository

Parameters:
databaseName - The name of the connection to remove
Throws:
KettleException - In case something went wrong: database error, insufficient permissions, depending objects, etc.

delDatabase

public void delDatabase(ObjectId id_database)
                 throws KettleException
Throws:
KettleException

delDatabaseAttributes

public void delDatabaseAttributes(ObjectId id_database)
                           throws KettleException
Throws:
KettleException

getNrDatabases

public int getNrDatabases()
                   throws KettleException
Throws:
KettleException

getNrDatabases

public int getNrDatabases(ObjectId id_transformation)
                   throws KettleException
Throws:
KettleException

getNrDatabaseAttributes

public int getNrDatabaseAttributes(ObjectId id_database)
                            throws KettleException
Throws:
KettleException