Top Description Fields Constructors Methods
liquibase.executor.jvm

public Class RowMapperNotNullConstraintsResultSetExtractor

extends RowMapperResultSetExtractor
Class Inheritance
Imports
java.sql.ResultSet, .SQLException, java.util.ArrayList, .List, .Map

Adapter implementation of the ResultSetExtractor interface that delegates to a RowMapper which is supposed to create a not null constraint object for each row.

Special mapper needed because sys table ALL_CONSTRAINTS provides info about not null constraints that have type 'C' and SEARCH_CONDITION(Text of search condition for a check constraint) field with 'is not null' string of data type: 'LONG' But type 'LONG' limits us to do any text operations (match, contains, etc.) on DB level Only one way to do this on backend side

See Also
RowMapper, RowMapperResultSetExtractor, liquibase.executor.Executor

Field Summary

Modifier and TypeField and Description
private static final String
private static final String
SEARCH_CONDITION_FIELD

Field describes condition for NotNullConstraint in String format e.g. "ID" IS NOT NULL | name = 'foo' | etc.

Inherited from liquibase.executor.jvm.RowMapperResultSetExtractor:
rowMapperrowsExpected

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Object
extractData(ResultSet
ResultSet to extract data from. Implementations should not close this: it will be closed by the calling JdbcTemplate.
resultSet
)

Overrides liquibase.executor.jvm.RowMapperResultSetExtractor.extractData.

Implements liquibase.executor.jvm.ResultSetExtractor.extractData.

Implementations must implement this method to process the entire ResultSet.

Field Detail

SEARCH_CONDITIONback to summary
private static final String SEARCH_CONDITION
SEARCH_CONDITION_FIELDback to summary
private static final String SEARCH_CONDITION_FIELD

Field describes condition for NotNullConstraint in String format e.g. "ID" IS NOT NULL | name = 'foo' | etc.

Constructor Detail

RowMapperNotNullConstraintsResultSetExtractorback to summary
public RowMapperNotNullConstraintsResultSetExtractor(RowMapper rowMapper)

Method Detail

extractDataback to summary
public Object extractData(ResultSet resultSet) throws SQLException

Overrides liquibase.executor.jvm.RowMapperResultSetExtractor.extractData.

Implements liquibase.executor.jvm.ResultSetExtractor.extractData.

Doc from liquibase.executor.jvm.ResultSetExtractor.extractData.

Implementations must implement this method to process the entire ResultSet.

Parameters
resultSet:ResultSet

ResultSet to extract data from. Implementations should not close this: it will be closed by the calling JdbcTemplate.

Returns:Object

an arbitrary result object, or null if none (the extractor will typically be stateful in the latter case).

Annotations
@Override
Exceptions
SQLException:
if a SQLException is encountered getting column values or navigating (that is, there's no need to catch SQLException)