Class PostgresSourceDatabase
- java.lang.Object
-
- org.odpi.openmetadata.adapters.connectors.integration.postgres.PostgresSourceDatabase
-
public class PostgresSourceDatabase extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description PostgresSourceDatabase(org.odpi.openmetadata.frameworks.connectors.properties.ConnectionProperties egeriaProps)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<PostgresDatabase>getDabases()java.util.List<PostgresSchema>getDatabaseSchema(java.lang.String databaseName)Lists the schemas for a given databasejava.util.List<PostgresForeignKeyLinks>getForeginKeyLinksForTable(java.lang.String tableName)lists the foreign key attributes needed to create an enetity relationship between the database columnsjava.util.List<java.lang.String>getForeignKeyColumnNamesForTable(java.lang.String tableName)Wrapper function which lists the Postgres foreign key attributes for views for a given tablejava.util.List<java.lang.String>getPrimaryKeyColumnNamesForTable(java.lang.String tableName)Wrapper function which lists the Postgres primary key attributes for a given table namejava.util.List<PostgresTable>getTables(java.lang.String schemaName)Wrapper function which lists the Postgres attributes for tables for a given schemajava.util.List<PostgresTable>getViews(java.lang.String schemaName)Wrapper function which lists the Postgres attributes for views for a given schema
-
-
-
Method Detail
-
getDabases
public java.util.List<PostgresDatabase> getDabases() throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getDatabaseSchema
public java.util.List<PostgresSchema> getDatabaseSchema(java.lang.String databaseName) throws java.sql.SQLException
Lists the schemas for a given database- Parameters:
databaseName- the name of the database to find the schemas- Returns:
- A list of schemas for the given database
- Throws:
java.sql.SQLException- thrown by the JDBC Driver
-
getViews
public java.util.List<PostgresTable> getViews(java.lang.String schemaName) throws java.sql.SQLException
Wrapper function which lists the Postgres attributes for views for a given schema- Parameters:
schemaName- the name of the database to find the schemas- Returns:
- A list of schemas for the given database
- Throws:
java.sql.SQLException- thrown by the JDBC Driver
-
getTables
public java.util.List<PostgresTable> getTables(java.lang.String schemaName) throws java.sql.SQLException
Wrapper function which lists the Postgres attributes for tables for a given schema- Parameters:
schemaName- the name of the database to find the schemas- Returns:
- A list of tables for the given database
- Throws:
java.sql.SQLException- thrown by the JDBC Driver
-
getPrimaryKeyColumnNamesForTable
public java.util.List<java.lang.String> getPrimaryKeyColumnNamesForTable(java.lang.String tableName) throws java.sql.SQLExceptionWrapper function which lists the Postgres primary key attributes for a given table name- Parameters:
tableName- the name of the database to find the schemas- Returns:
- A list of primary keys for the given database
- Throws:
java.sql.SQLException- thrown by the JDBC Driver
-
getForeignKeyColumnNamesForTable
public java.util.List<java.lang.String> getForeignKeyColumnNamesForTable(java.lang.String tableName) throws java.sql.SQLExceptionWrapper function which lists the Postgres foreign key attributes for views for a given table- Parameters:
tableName- the name of the table- Returns:
- A list of foreign keys for the given table
- Throws:
java.sql.SQLException- thrown by the JDBC Driver
-
getForeginKeyLinksForTable
public java.util.List<PostgresForeignKeyLinks> getForeginKeyLinksForTable(java.lang.String tableName) throws java.sql.SQLException
lists the foreign key attributes needed to create an enetity relationship between the database columns- Parameters:
tableName- the name of the table containimng the foregin keys- Returns:
- A list of foregin key links attributes for the given table
- Throws:
java.sql.SQLException- thrown by the JDBC Driver
-
-