Package org.pentaho.di.trans
Interface HasDatabasesInterface
- All Known Implementing Classes:
AbstractMeta,JobMeta,TransMeta
public interface HasDatabasesInterface
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddDatabase(int p, org.pentaho.di.core.database.DatabaseMeta ci) Add a database connection to the transformation on a certain location.voidaddDatabase(org.pentaho.di.core.database.DatabaseMeta databaseMeta) Add a database connection to the transformation.voidaddOrReplaceDatabase(org.pentaho.di.core.database.DatabaseMeta databaseMeta) Add a database connection to the transformation if that connection didn't exists yet.org.pentaho.di.core.database.DatabaseMetafindDatabase(String name) Searches the list of databases for a database with a certain nameorg.pentaho.di.core.database.DatabaseMetagetDatabase(int i) Retrieves a database connection information a a certain location.List<org.pentaho.di.core.database.DatabaseMeta>Get an ArrayList of defined DatabaseInfo objects.booleanChecks whether or not the connections have changed.intindexOfDatabase(org.pentaho.di.core.database.DatabaseMeta ci) Find the location of databaseintCount the nr of databases in the transformation.voidremoveDatabase(int i) Removes a database from the transformation on a certain location.voidsetDatabases(List<org.pentaho.di.core.database.DatabaseMeta> databases)
-
Method Details
-
getDatabases
List<org.pentaho.di.core.database.DatabaseMeta> getDatabases()Get an ArrayList of defined DatabaseInfo objects.- Returns:
- an ArrayList of defined DatabaseInfo objects.
-
setDatabases
- Parameters:
databases- The databases to set.
-
addDatabase
void addDatabase(org.pentaho.di.core.database.DatabaseMeta databaseMeta) Add a database connection to the transformation.- Parameters:
databaseMeta- The database connection information.
-
addOrReplaceDatabase
void addOrReplaceDatabase(org.pentaho.di.core.database.DatabaseMeta databaseMeta) Add a database connection to the transformation if that connection didn't exists yet. Otherwise, replace the connection in the transformation- Parameters:
databaseMeta- The database connection information.
-
addDatabase
void addDatabase(int p, org.pentaho.di.core.database.DatabaseMeta ci) Add a database connection to the transformation on a certain location.- Parameters:
p- The locationci- The database connection information.
-
getDatabase
org.pentaho.di.core.database.DatabaseMeta getDatabase(int i) Retrieves a database connection information a a certain location.- Parameters:
i- The database number.- Returns:
- The database connection information.
-
removeDatabase
void removeDatabase(int i) Removes a database from the transformation on a certain location.- Parameters:
i- The location
-
nrDatabases
int nrDatabases()Count the nr of databases in the transformation.- Returns:
- The nr of databases
-
findDatabase
Searches the list of databases for a database with a certain name- Parameters:
name- The name of the database connection- Returns:
- The database connection information or null if nothing was found.
-
indexOfDatabase
int indexOfDatabase(org.pentaho.di.core.database.DatabaseMeta ci) Find the location of database- Parameters:
ci- The database queried- Returns:
- The location of the database, -1 if nothing was found.
-
haveConnectionsChanged
boolean haveConnectionsChanged()Checks whether or not the connections have changed.- Returns:
- True if the connections have been changed.
-