Class RowIdSupport
java.lang.Object
net.sf.jailer.datamodel.RowIdSupport
-
Constructor Summary
ConstructorsConstructorDescriptionRowIdSupport(DataModel dataModel, DBMS configuration, boolean useRowIds, boolean useRowIdsOnlyForTablesWithoutPK) Constructor.RowIdSupport(DataModel dataModel, DBMS configuration, String rowIdType, boolean useRowIds, boolean useRowIdsOnlyForTablesWithoutPK) Constructor.RowIdSupport(DataModel dataModel, DBMS configuration, String rowIdType, ExecutionContext executionContext) Constructor.RowIdSupport(DataModel dataModel, DBMS configuration, ExecutionContext executionContext) Constructor. -
Method Summary
Modifier and TypeMethodDescriptiongetColumns(Table table, Session session) Gets the columns with additional rowid-column of a table.getColumns(Table table, Session session, boolean exact) Gets the columns with additional rowid-column of a table.getPrimaryKey(Table table) Gets the primary key of a table.getPrimaryKey(Table table, Session session) Gets the primary key of a table.getPrimaryKey(Table table, Session session, boolean exact) Gets the primary key of a table.Gets the universal primary key.getUniversalPrimaryKey(Session session) Gets the universal primary key.booleanisRowIdColumn(Column column) Checks whether the given column is the rowid column.voidsetUseRowIdsOnlyForTablesWithoutPK(boolean useRowIdsOnlyForTablesWithoutPK) Sets whether rowids should only be used for tables without a primary key.
-
Constructor Details
-
RowIdSupport
public RowIdSupport(DataModel dataModel, DBMS configuration, String rowIdType, boolean useRowIds, boolean useRowIdsOnlyForTablesWithoutPK) Constructor.- Parameters:
dataModel- the data modelconfiguration- DBMS configurationrowIdType- type of rowid-columnsuseRowIds-trueiff rowid column is used instead of primary keysuseRowIdsOnlyForTablesWithoutPK-trueto use rowids only for tables without a primary key
-
RowIdSupport
public RowIdSupport(DataModel dataModel, DBMS configuration, boolean useRowIds, boolean useRowIdsOnlyForTablesWithoutPK) Constructor.- Parameters:
dataModel- the data modelconfiguration- DBMS configurationuseRowIds-trueiff rowid column is used instead of primary keysuseRowIdsOnlyForTablesWithoutPK-trueto use rowids only for tables without a primary key
-
RowIdSupport
public RowIdSupport(DataModel dataModel, DBMS configuration, String rowIdType, ExecutionContext executionContext) Constructor.- Parameters:
dataModel- the data modelconfiguration- DBMS configurationrowIdType- type of rowid-columns
-
RowIdSupport
Constructor.- Parameters:
dataModel- the data modelconfiguration- DBMS configuration
-
-
Method Details
-
getPrimaryKey
Gets the primary key of a table.- Parameters:
table- the tablesession- the session, ornullexact-trueto check rowid applicability exactly against the database- Returns:
- the primary key of the table
-
getPrimaryKey
Gets the primary key of a table.- Parameters:
table- the tablesession- the session, ornull- Returns:
- the primary key of the table
-
getPrimaryKey
Gets the primary key of a table.- Parameters:
table- the table- Returns:
- the primary key of the table
-
getUniversalPrimaryKey
Gets the universal primary key.- Parameters:
session- for null value guessing- Returns:
- the universal primary key
-
getUniversalPrimaryKey
Gets the universal primary key.- Returns:
- the universal primary key
-
setUseRowIdsOnlyForTablesWithoutPK
public void setUseRowIdsOnlyForTablesWithoutPK(boolean useRowIdsOnlyForTablesWithoutPK) Sets whether rowids should only be used for tables without a primary key.- Parameters:
useRowIdsOnlyForTablesWithoutPK-trueto use rowids only for tables without a primary key
-
getColumns
-
getColumns
Gets the columns with additional rowid-column of a table.- Parameters:
table- the tablesession- the session, ornullexact-trueto check rowid applicability exactly against the database- Returns:
- the columns of the table, including the rowid-column if applicable
-
isRowIdColumn
Checks whether the given column is the rowid column.- Parameters:
column- the column to check- Returns:
trueif the given column is the rowid column
-