diff --git a/inject/pom.xml b/core/pom.xml similarity index 97% rename from inject/pom.xml rename to core/pom.xml index f0eb54d..0e57f51 100644 --- a/inject/pom.xml +++ b/core/pom.xml @@ -10,7 +10,7 @@ 1.0-SNAPSHOT - inject + core diff --git a/inject/src/main/java/de/neitzel/inject/InjectableComponentScanner.java b/core/src/main/java/de/neitzel/core/inject/InjectableComponentScanner.java similarity index 99% rename from inject/src/main/java/de/neitzel/inject/InjectableComponentScanner.java rename to core/src/main/java/de/neitzel/core/inject/InjectableComponentScanner.java index 66bf98e..8f0092a 100644 --- a/inject/src/main/java/de/neitzel/inject/InjectableComponentScanner.java +++ b/core/src/main/java/de/neitzel/core/inject/InjectableComponentScanner.java @@ -1,6 +1,6 @@ -package de.neitzel.inject; +package de.neitzel.core.inject; -import de.neitzel.inject.annotation.Component; +import de.neitzel.core.inject.annotation.Component; import org.reflections.Reflections; import java.lang.reflect.Constructor; diff --git a/inject/src/main/java/de/neitzel/inject/annotation/Component.java b/core/src/main/java/de/neitzel/core/inject/annotation/Component.java similarity index 85% rename from inject/src/main/java/de/neitzel/inject/annotation/Component.java rename to core/src/main/java/de/neitzel/core/inject/annotation/Component.java index 87e25b3..fd4a3b0 100644 --- a/inject/src/main/java/de/neitzel/inject/annotation/Component.java +++ b/core/src/main/java/de/neitzel/core/inject/annotation/Component.java @@ -1,4 +1,4 @@ -package de.neitzel.inject.annotation; +package de.neitzel.core.inject.annotation; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/inject/src/main/java/de/neitzel/inject/annotation/Config.java b/core/src/main/java/de/neitzel/core/inject/annotation/Config.java similarity index 86% rename from inject/src/main/java/de/neitzel/inject/annotation/Config.java rename to core/src/main/java/de/neitzel/core/inject/annotation/Config.java index 1b0814e..1992bc2 100644 --- a/inject/src/main/java/de/neitzel/inject/annotation/Config.java +++ b/core/src/main/java/de/neitzel/core/inject/annotation/Config.java @@ -1,4 +1,4 @@ -package de.neitzel.inject.annotation; +package de.neitzel.core.inject.annotation; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/core/src/main/java/de/neitzel/core/sql/Query.java b/core/src/main/java/de/neitzel/core/sql/Query.java new file mode 100644 index 0000000..e9d1bc3 --- /dev/null +++ b/core/src/main/java/de/neitzel/core/sql/Query.java @@ -0,0 +1,231 @@ +package de.neitzel.core.sql; + +import lombok.RequiredArgsConstructor; +import lombok.SneakyThrows; +import lombok.extern.slf4j.Slf4j; + +import java.nio.charset.StandardCharsets; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.*; +import java.util.function.Function; +import java.util.stream.Stream; +import java.util.stream.StreamSupport; + +/** + * Helper class to build and execute parameterized SQL queries with factory-based result mapping. + */ +@Slf4j +@RequiredArgsConstructor +public class Query { + + /** + * An Integer Factory that can be used to read Integer Values of a ResultSet that only has Integers (e.g. a min oder max query) + */ + public static final Function INTEGER_FACTORY = rs -> { + try { + return rs.getInt(1); + } catch (SQLException e) { + throw new RuntimeException(e); + } + }; + + private final Connection connection; + private final List parameterSetters = new ArrayList<>(); + private Function factory; + private String queryText; + + public static void execute(final Connection connection, final String query) throws SQLException { + new Query(connection) + .setQueryText(query) + .execute(); + } + + /** + * sets the query. + */ + public Query setQueryText(final String queryText) { + this.queryText = queryText; + return this; + } + + /** + * Loads the query content from a resource URL. + */ + public Query setQueryResource(final String resourcePath) { + log.info("loading resource: {}", resourcePath); + try (Scanner scanner = new Scanner(Objects.requireNonNull(getClass().getResourceAsStream(resourcePath)), + StandardCharsets.UTF_8)) { + this.queryText = scanner.useDelimiter("\\A").next(); + } + log.info("query text: {}", this.queryText); + return this; + } + + /** + * Replaces placeholders in the query. + */ + public Query replace(final String placeholder, final String value) { + this.queryText = this.queryText.replace(placeholder, value); + log.info("query text: {}", this.queryText); + return this; + } + + /** + * Adds another parameter setter + * + * @param index Index of parameter in prepared statement + * @param value Value to set. + * @param setter Setter to use on prepared statement. + * @param Type of the Parameter. + * @return The Query. + */ + public Query addParameter(final int index, final X value, final TriSqlFunction setter) { + parameterSetters.add(ps -> setter.apply(ps, index, value)); + return this; + } + + /** + * Adds a ParameterSetter/ + * + * @param setter Setter for a parameter. + * @return the Qyery. + */ + public Query addParameter(ParameterSetter setter) { + parameterSetters.add(setter); + return this; + } + + /** + * Adds a result factory by name. + */ + public Query factory(final Function factory) { + this.factory = factory; + return this; + } + + /** + * Executes the query and returns a stream of results. This Stream must be closed so that the underlying ResultSet is closed. + */ + private Stream stream() throws SQLException { + ResultSet rs = createPreparedStatement().executeQuery(); + TrimmingResultSet trimmingResultSet = new TrimmingResultSet(rs); + return streamFromResultSet(trimmingResultSet, factory); + } + + /** + * Creates a PreparedStatement and applies all Parameter. + * + * @return the created PreparedStatement + * @throws SQLException thrown if the PreparedStatement could not be created. + */ + private PreparedStatement createPreparedStatement() throws SQLException { + PreparedStatement ps = connection.prepareStatement(queryText); + for (ParameterSetter setter : parameterSetters) { + setter.apply(ps); + } + return ps; + } + + /** + * Executes a query wich has no result. + * + * @throws SQLException Thrown when query cannot be executed. + */ + public void execute() throws SQLException { + try (PreparedStatement ps = createPreparedStatement()) { + ps.execute(); + } + } + + /** + * Streams the results of a ResultSet using a factory that creates instances for each row of the ResultSet + * + * @param rs ResultSet to stream from + * @param factory Factory to create instances of T. + * @return Stream of T instances. + */ + private Stream streamFromResultSet(final ResultSet rs, final Function factory) { + Iterator iterator = new Iterator<>() { + private boolean hasNextChecked = false; + private boolean hasNext; + + @Override + @SneakyThrows + public boolean hasNext() { + if (!hasNextChecked) { + hasNext = rs.next(); + hasNextChecked = true; + } + return hasNext; + } + + @Override + public T next() { + if (!hasNext()) { + throw new NoSuchElementException(); + } + hasNextChecked = false; + return factory.apply(rs); + } + }; + Spliterator spliterator = Spliterators.spliteratorUnknownSize(iterator, Spliterator.ORDERED); + return StreamSupport.stream(spliterator, false) + .onClose(() -> { + try { + rs.getStatement().close(); + } catch (SQLException ignored) { + // Exception is ignored. + } + try { + rs.close(); + } catch (SQLException ignored) { + // Exception is ignored. + } + }); + } + + public R withStream(Function, R> handler) throws SQLException { + try (Stream stream = stream()) { + return handler.apply(stream); + } + } + + /** + * Function with three parameters and no result which can throw an SQLException + * + * @param type of first parameter + * @param type of second parameter + * @param type of third parameter + */ + @FunctionalInterface + public interface TriSqlFunction { + + /** + * Calls the thre parameter function. + * + * @param t first parameter. + * @param u second parameter. + * @param v third parameter. + * @throws SQLException Function could throw an SQLException. + */ + void apply(T t, U u, V v) throws SQLException; + } + + /** + * ParameterSetter is a function Interface that could be used to alter a PreparedStatement. + */ + @FunctionalInterface + public interface ParameterSetter { + + /** + * Does the required work on PreparedStatement. + * + * @param ps PreparedStatement to work on. + * @throws SQLException Could be thrown when working on PreparedStatement. + */ + void apply(PreparedStatement ps) throws SQLException; + } +} diff --git a/core/src/main/java/de/neitzel/core/sql/TrimmingResultSet.java b/core/src/main/java/de/neitzel/core/sql/TrimmingResultSet.java new file mode 100644 index 0000000..3acff20 --- /dev/null +++ b/core/src/main/java/de/neitzel/core/sql/TrimmingResultSet.java @@ -0,0 +1,2366 @@ +package de.neitzel.core.sql; + +import lombok.RequiredArgsConstructor; + +import java.io.InputStream; +import java.io.Reader; +import java.math.BigDecimal; +import java.net.URL; +import java.sql.*; +import java.util.Calendar; +import java.util.Map; + +/** + * ResultSet that trims all String values. + */ +@RequiredArgsConstructor +public class TrimmingResultSet implements ResultSet { + + /** + * The ResultSet used to read data from. + */ + private final ResultSet resultSet; + + /** + * Gets string. + * + * @param columnIndex the column index + * @return the string + * @throws SQLException the sql exception + */ + @Override + public String getString(final int columnIndex) throws SQLException { + String value = resultSet.getString(columnIndex); + return value != null ? value.trim() : null; + } + + /** + * Gets string. + * + * @param columnLabel the column label + * @return the string + * @throws SQLException the sql exception + */ + @Override + public String getString(final String columnLabel) throws SQLException { + String value = resultSet.getString(columnLabel); + return value != null ? value.trim() : null; + } + + /** + * Next boolean. + * + * @return the boolean + * @throws SQLException the sql exception + */ + @Override + public boolean next() throws SQLException { + return resultSet.next(); + } + + /** + * Close. + * + * @throws SQLException the sql exception + */ + @Override + public void close() throws SQLException { + resultSet.close(); + } + + /** + * Was null boolean. + * + * @return the boolean + * @throws SQLException the sql exception + */ + @Override + public boolean wasNull() throws SQLException { + return resultSet.wasNull(); + } + + /** + * Gets boolean. + * + * @param columnIndex the column index + * @return the boolean + * @throws SQLException the sql exception + */ + @Override + public boolean getBoolean(final int columnIndex) throws SQLException { + return resultSet.getBoolean(columnIndex); + } + + /** + * Gets boolean. + * + * @param columnLabel the column label + * @return the boolean + * @throws SQLException the sql exception + */ + @Override + public boolean getBoolean(final String columnLabel) throws SQLException { + return resultSet.getBoolean(columnLabel); + } + + /** + * Gets byte. + * + * @param columnIndex the column index + * @return the byte + * @throws SQLException the sql exception + */ + @Override + public byte getByte(final int columnIndex) throws SQLException { + return resultSet.getByte(columnIndex); + } + + /** + * Gets byte. + * + * @param columnLabel the column label + * @return the byte + * @throws SQLException the sql exception + */ + @Override + public byte getByte(final String columnLabel) throws SQLException { + return resultSet.getByte(columnLabel); + } + + /** + * Gets short. + * + * @param columnIndex the column index + * @return the short + * @throws SQLException the sql exception + */ + @Override + public short getShort(final int columnIndex) throws SQLException { + return resultSet.getShort(columnIndex); + } + + /** + * Gets short. + * + * @param columnLabel the column label + * @return the short + * @throws SQLException the sql exception + */ + @Override + public short getShort(final String columnLabel) throws SQLException { + return resultSet.getShort(columnLabel); + } + + /** + * Gets int. + * + * @param columnIndex the column index + * @return the int + * @throws SQLException the sql exception + */ + @Override + public int getInt(final int columnIndex) throws SQLException { + return resultSet.getInt(columnIndex); + } + + /** + * Gets int. + * + * @param columnLabel the column label + * @return the int + * @throws SQLException the sql exception + */ + @Override + public int getInt(final String columnLabel) throws SQLException { + return resultSet.getInt(columnLabel); + } + + /** + * Gets long. + * + * @param columnIndex the column index + * @return the long + * @throws SQLException the sql exception + */ + @Override + public long getLong(final int columnIndex) throws SQLException { + return resultSet.getLong(columnIndex); + } + + /** + * Gets long. + * + * @param columnLabel the column label + * @return the long + * @throws SQLException the sql exception + */ + @Override + public long getLong(final String columnLabel) throws SQLException { + return resultSet.getLong(columnLabel); + } + + /** + * Gets float. + * + * @param columnIndex the column index + * @return the float + * @throws SQLException the sql exception + */ + @Override + public float getFloat(final int columnIndex) throws SQLException { + return resultSet.getFloat(columnIndex); + } + + /** + * Gets float. + * + * @param columnLabel the column label + * @return the float + * @throws SQLException the sql exception + */ + @Override + public float getFloat(final String columnLabel) throws SQLException { + return resultSet.getFloat(columnLabel); + } + + /** + * Gets double. + * + * @param columnIndex the column index + * @return the double + * @throws SQLException the sql exception + */ + @Override + public double getDouble(final int columnIndex) throws SQLException { + return resultSet.getDouble(columnIndex); + } + + /** + * Gets double. + * + * @param columnLabel the column label + * @return the double + * @throws SQLException the sql exception + */ + @Override + public double getDouble(final String columnLabel) throws SQLException { + return resultSet.getDouble(columnLabel); + } + + /** + * Gets big decimal. + * + * @param columnIndex the column index + * @param scale the scale + * @return the big decimal + * @throws SQLException the sql exception + */ + @Override + @Deprecated + public BigDecimal getBigDecimal(final int columnIndex, int scale) throws SQLException { + return resultSet.getBigDecimal(columnIndex, scale); + } + + /** + * Gets big decimal. + * + * @param columnIndex the column index + * @return the big decimal + * @throws SQLException the sql exception + */ + @Override + public BigDecimal getBigDecimal(final int columnIndex) throws SQLException { + return resultSet.getBigDecimal(columnIndex); + } + + /** + * Gets big decimal. + * + * @param columnLabel the column label + * @param scale the scale + * @return the big decimal + * @throws SQLException the sql exception + */ + @Override + @Deprecated + public BigDecimal getBigDecimal(final String columnLabel, int scale) throws SQLException { + return resultSet.getBigDecimal(columnLabel, scale); + } + + /** + * Gets big decimal. + * + * @param columnLabel the column label + * @return the big decimal + * @throws SQLException the sql exception + */ + @Override + public BigDecimal getBigDecimal(final String columnLabel) throws SQLException { + return resultSet.getBigDecimal(columnLabel); + } + + /** + * Get bytes byte [ ]. + * + * @param columnIndex the column index + * @return the byte [ ] + * @throws SQLException the sql exception + */ + @Override + public byte[] getBytes(final int columnIndex) throws SQLException { + return resultSet.getBytes(columnIndex); + } + + /** + * Get bytes byte [ ]. + * + * @param columnLabel the column label + * @return the byte [ ] + * @throws SQLException the sql exception + */ + @Override + public byte[] getBytes(final String columnLabel) throws SQLException { + return resultSet.getBytes(columnLabel); + } + + /** + * Gets date. + * + * @param columnIndex the column index + * @return the date + * @throws SQLException the sql exception + */ + @Override + public Date getDate(final int columnIndex) throws SQLException { + return resultSet.getDate(columnIndex); + } + + /** + * Gets date. + * + * @param columnLabel the column label + * @return the date + * @throws SQLException the sql exception + */ + @Override + public Date getDate(final String columnLabel) throws SQLException { + return resultSet.getDate(columnLabel); + } + + /** + * Gets date. + * + * @param columnIndex the column index + * @param cal the cal + * @return the date + * @throws SQLException the sql exception + */ + @Override + public Date getDate(final int columnIndex, final Calendar cal) throws SQLException { + return resultSet.getDate(columnIndex, cal); + } + + /** + * Gets date. + * + * @param columnLabel the column label + * @param cal the cal + * @return the date + * @throws SQLException the sql exception + */ + @Override + public Date getDate(final String columnLabel, final Calendar cal) throws SQLException { + return resultSet.getDate(columnLabel, cal); + } + + /** + * Gets time. + * + * @param columnIndex the column index + * @return the time + * @throws SQLException the sql exception + */ + @Override + public Time getTime(final int columnIndex) throws SQLException { + return resultSet.getTime(columnIndex); + } + + /** + * Gets time. + * + * @param columnLabel the column label + * @return the time + * @throws SQLException the sql exception + */ + @Override + public Time getTime(final String columnLabel) throws SQLException { + return resultSet.getTime(columnLabel); + } + + /** + * Gets time. + * + * @param columnIndex the column index + * @param cal the cal + * @return the time + * @throws SQLException the sql exception + */ + @Override + public Time getTime(final int columnIndex, final Calendar cal) throws SQLException { + return resultSet.getTime(columnIndex, cal); + } + + /** + * Gets time. + * + * @param columnLabel the column label + * @param cal the cal + * @return the time + * @throws SQLException the sql exception + */ + @Override + public Time getTime(final String columnLabel, final Calendar cal) throws SQLException { + return resultSet.getTime(columnLabel, cal); + } + + /** + * Gets timestamp. + * + * @param columnIndex the column index + * @return the timestamp + * @throws SQLException the sql exception + */ + @Override + public Timestamp getTimestamp(final int columnIndex) throws SQLException { + return resultSet.getTimestamp(columnIndex); + } + + /** + * Gets timestamp. + * + * @param columnLabel the column label + * @return the timestamp + * @throws SQLException the sql exception + */ + @Override + public Timestamp getTimestamp(final String columnLabel) throws SQLException { + return resultSet.getTimestamp(columnLabel); + } + + /** + * Gets timestamp. + * + * @param columnIndex the column index + * @param cal the cal + * @return the timestamp + * @throws SQLException the sql exception + */ + @Override + public Timestamp getTimestamp(final int columnIndex, final Calendar cal) throws SQLException { + return resultSet.getTimestamp(columnIndex, cal); + } + + /** + * Gets timestamp. + * + * @param columnLabel the column label + * @param cal the cal + * @return the timestamp + * @throws SQLException the sql exception + */ + @Override + public Timestamp getTimestamp(final String columnLabel, final Calendar cal) throws SQLException { + return resultSet.getTimestamp(columnLabel, cal); + } + + /** + * Gets ascii stream. + * + * @param columnIndex the column index + * @return the ascii stream + * @throws SQLException the sql exception + */ + @Override + public InputStream getAsciiStream(final int columnIndex) throws SQLException { + return resultSet.getAsciiStream(columnIndex); + } + + /** + * Gets unicode stream. + * + * @param columnIndex the column index + * @return the unicode stream + * @throws SQLException the sql exception + */ + @Override + public InputStream getUnicodeStream(final int columnIndex) throws SQLException { + return null; + } + + /** + * Gets ascii stream. + * + * @param columnLabel the column label + * @return the ascii stream + * @throws SQLException the sql exception + */ + @Override + public InputStream getAsciiStream(final String columnLabel) throws SQLException { + return resultSet.getAsciiStream(columnLabel); + } + + /** + * Gets unicode stream. + * + * @param columnLabel the column label + * @return the unicode stream + * @throws SQLException the sql exception + */ + @Override + public InputStream getUnicodeStream(final String columnLabel) throws SQLException { + return null; + } + + /** + * Gets binary stream. + * + * @param columnIndex the column index + * @return the binary stream + * @throws SQLException the sql exception + */ + @Override + public InputStream getBinaryStream(final int columnIndex) throws SQLException { + return resultSet.getBinaryStream(columnIndex); + } + + /** + * Gets binary stream. + * + * @param columnLabel the column label + * @return the binary stream + * @throws SQLException the sql exception + */ + @Override + public InputStream getBinaryStream(final String columnLabel) throws SQLException { + return resultSet.getBinaryStream(columnLabel); + } + + /** + * Gets warnings. + * + * @return the warnings + * @throws SQLException the sql exception + */ + @Override + public SQLWarning getWarnings() throws SQLException { + return null; + } + + /** + * Gets character stream. + * + * @param columnIndex the column index + * @return the character stream + * @throws SQLException the sql exception + */ + @Override + public Reader getCharacterStream(final int columnIndex) throws SQLException { + return resultSet.getCharacterStream(columnIndex); + } + + /** + * Gets character stream. + * + * @param columnLabel the column label + * @return the character stream + * @throws SQLException the sql exception + */ + @Override + public Reader getCharacterStream(final String columnLabel) throws SQLException { + return resultSet.getCharacterStream(columnLabel); + } + + /** + * Gets n string. + * + * @param columnIndex the column index + * @return the n string + * @throws SQLException the sql exception + */ + @Override + public String getNString(final int columnIndex) throws SQLException { + String value = resultSet.getNString(columnIndex); + return value != null ? value.trim() : null; + } + + /** + * Gets n string. + * + * @param columnLabel the column label + * @return the n string + * @throws SQLException the sql exception + */ + @Override + public String getNString(final String columnLabel) throws SQLException { + String value = resultSet.getNString(columnLabel); + return value != null ? value.trim() : null; + } + + /** + * Gets n character stream. + * + * @param columnIndex the column index + * @return the n character stream + * @throws SQLException the sql exception + */ + @Override + public Reader getNCharacterStream(final int columnIndex) throws SQLException { + return resultSet.getNCharacterStream(columnIndex); + } + + /** + * Gets n character stream. + * + * @param columnLabel the column label + * @return the n character stream + * @throws SQLException the sql exception + */ + @Override + public Reader getNCharacterStream(final String columnLabel) throws SQLException { + return resultSet.getNCharacterStream(columnLabel); + } + + /** + * Clear warnings. + * + * @throws SQLException the sql exception + */ + @Override + public void clearWarnings() throws SQLException { + resultSet.clearWarnings(); + } + + /** + * Gets cursor name. + * + * @return the cursor name + * @throws SQLException the sql exception + */ + @Override + public String getCursorName() throws SQLException { + return resultSet.getCursorName(); + } + + /** + * Gets meta data. + * + * @return the meta data + * @throws SQLException the sql exception + */ + @Override + public ResultSetMetaData getMetaData() throws SQLException { + return resultSet.getMetaData(); + } + + /** + * Gets object. + * + * @param columnIndex the column index + * @return the object + * @throws SQLException the sql exception + */ + @Override + public Object getObject(final int columnIndex) throws SQLException { + return resultSet.getObject(columnIndex); + } + + /** + * Gets object. + * + * @param columnLabel the column label + * @return the object + * @throws SQLException the sql exception + */ + @Override + public Object getObject(final String columnLabel) throws SQLException { + return resultSet.getObject(columnLabel); + } + + /** + * Gets object. + * + * @param columnIndex the column index + * @param map the map + * @return the object + * @throws SQLException the sql exception + */ + @Override + public Object getObject(final int columnIndex, final Map> map) throws SQLException { + return resultSet.getObject(columnIndex, map); + } + + /** + * Gets ref. + * + * @param columnIndex the column index + * @return the ref + * @throws SQLException the sql exception + */ + @Override + public Ref getRef(final int columnIndex) throws SQLException { + return resultSet.getRef(columnIndex); + } + + /** + * Gets blob. + * + * @param columnIndex the column index + * @return the blob + * @throws SQLException the sql exception + */ + @Override + public Blob getBlob(final int columnIndex) throws SQLException { + return resultSet.getBlob(columnIndex); + } + + /** + * Gets clob. + * + * @param columnIndex the column index + * @return the clob + * @throws SQLException the sql exception + */ + @Override + public Clob getClob(final int columnIndex) throws SQLException { + return resultSet.getClob(columnIndex); + } + + /** + * Gets array. + * + * @param columnIndex the column index + * @return the array + * @throws SQLException the sql exception + */ + @Override + public Array getArray(final int columnIndex) throws SQLException { + return resultSet.getArray(columnIndex); + } + + /** + * Gets object. + * + * @param columnLabel the column label + * @param map the map + * @return the object + * @throws SQLException the sql exception + */ + @Override + public Object getObject(final String columnLabel, final Map> map) throws SQLException { + return resultSet.getObject(columnLabel, map); + } + + /** + * Gets ref. + * + * @param columnLabel the column label + * @return the ref + * @throws SQLException the sql exception + */ + @Override + public Ref getRef(final String columnLabel) throws SQLException { + return resultSet.getRef(columnLabel); + } + + /** + * Gets blob. + * + * @param columnLabel the column label + * @return the blob + * @throws SQLException the sql exception + */ + @Override + public Blob getBlob(final String columnLabel) throws SQLException { + return resultSet.getBlob(columnLabel); + } + + /** + * Gets clob. + * + * @param columnLabel the column label + * @return the clob + * @throws SQLException the sql exception + */ + @Override + public Clob getClob(final String columnLabel) throws SQLException { + return resultSet.getClob(columnLabel); + } + + /** + * Gets array. + * + * @param columnLabel the column label + * @return the array + * @throws SQLException the sql exception + */ + @Override + public Array getArray(final String columnLabel) throws SQLException { + return resultSet.getArray(columnLabel); + } + + /** + * Find column int. + * + * @param columnLabel the column label + * @return the int + * @throws SQLException the sql exception + */ + @Override + public int findColumn(final String columnLabel) throws SQLException { + return resultSet.findColumn(columnLabel); + } + + /** + * Is before first boolean. + * + * @return the boolean + * @throws SQLException the sql exception + */ + @Override + public boolean isBeforeFirst() throws SQLException { + return resultSet.isBeforeFirst(); + } + + /** + * Is after last boolean. + * + * @return the boolean + * @throws SQLException the sql exception + */ + @Override + public boolean isAfterLast() throws SQLException { + return resultSet.isAfterLast(); + } + + /** + * Is first boolean. + * + * @return the boolean + * @throws SQLException the sql exception + */ + @Override + public boolean isFirst() throws SQLException { + return resultSet.isFirst(); + } + + /** + * Is last boolean. + * + * @return the boolean + * @throws SQLException the sql exception + */ + @Override + public boolean isLast() throws SQLException { + return resultSet.isLast(); + } + + /** + * Before first. + * + * @throws SQLException the sql exception + */ + @Override + public void beforeFirst() throws SQLException { + resultSet.beforeFirst(); + } + + /** + * After last. + * + * @throws SQLException the sql exception + */ + @Override + public void afterLast() throws SQLException { + resultSet.afterLast(); + } + + /** + * First boolean. + * + * @return the boolean + * @throws SQLException the sql exception + */ + @Override + public boolean first() throws SQLException { + return resultSet.first(); + } + + /** + * Last boolean. + * + * @return the boolean + * @throws SQLException the sql exception + */ + @Override + public boolean last() throws SQLException { + return resultSet.last(); + } + + /** + * Gets row. + * + * @return the row + * @throws SQLException the sql exception + */ + @Override + public int getRow() throws SQLException { + return resultSet.getRow(); + } + + /** + * Absolute boolean. + * + * @param row the row + * @return the boolean + * @throws SQLException the sql exception + */ + @Override + public boolean absolute(final int row) throws SQLException { + return resultSet.absolute(row); + } + + /** + * Relative boolean. + * + * @param rows the rows + * @return the boolean + * @throws SQLException the sql exception + */ + @Override + public boolean relative(final int rows) throws SQLException { + return resultSet.relative(rows); + } + + /** + * Previous boolean. + * + * @return the boolean + * @throws SQLException the sql exception + */ + @Override + public boolean previous() throws SQLException { + return resultSet.previous(); + } + + /** + * Gets fetch direction. + * + * @return the fetch direction + * @throws SQLException the sql exception + */ + @Override + public int getFetchDirection() throws SQLException { + return resultSet.getFetchDirection(); + } + + /** + * Sets fetch direction. + * + * @param direction the direction + * @throws SQLException the sql exception + */ + @Override + public void setFetchDirection(final int direction) throws SQLException { + resultSet.setFetchDirection(direction); + } + + /** + * Gets fetch size. + * + * @return the fetch size + * @throws SQLException the sql exception + */ + @Override + public int getFetchSize() throws SQLException { + return resultSet.getFetchSize(); + } + + /** + * Sets fetch size. + * + * @param rows the rows + * @throws SQLException the sql exception + */ + @Override + public void setFetchSize(final int rows) throws SQLException { + resultSet.setFetchSize(rows); + } + + /** + * Gets type. + * + * @return the type + * @throws SQLException the sql exception + */ + @Override + public int getType() throws SQLException { + return resultSet.getType(); + } + + /** + * Gets concurrency. + * + * @return the concurrency + * @throws SQLException the sql exception + */ + @Override + public int getConcurrency() throws SQLException { + return resultSet.getConcurrency(); + } + + /** + * Row updated boolean. + * + * @return the boolean + * @throws SQLException the sql exception + */ + @Override + public boolean rowUpdated() throws SQLException { + return resultSet.rowUpdated(); + } + + /** + * Row inserted boolean. + * + * @return the boolean + * @throws SQLException the sql exception + */ + @Override + public boolean rowInserted() throws SQLException { + return resultSet.rowInserted(); + } + + /** + * Row deleted boolean. + * + * @return the boolean + * @throws SQLException the sql exception + */ + @Override + public boolean rowDeleted() throws SQLException { + return resultSet.rowDeleted(); + } + + /** + * Update null. + * + * @param columnIndex the column index + * @throws SQLException the sql exception + */ + @Override + public void updateNull(final int columnIndex) throws SQLException { + resultSet.updateNull(columnIndex); + } + + /** + * Update boolean. + * + * @param columnIndex the column index + * @param x the x + * @throws SQLException the sql exception + */ + @Override + public void updateBoolean(final int columnIndex, final boolean x) throws SQLException { + resultSet.updateBoolean(columnIndex, x); + } + + /** + * Update byte. + * + * @param columnIndex the column index + * @param x the x + * @throws SQLException the sql exception + */ + @Override + public void updateByte(final int columnIndex, final byte x) throws SQLException { + resultSet.updateByte(columnIndex, x); + } + + /** + * Update short. + * + * @param columnIndex the column index + * @param x the x + * @throws SQLException the sql exception + */ + @Override + public void updateShort(final int columnIndex, final short x) throws SQLException { + resultSet.updateShort(columnIndex, x); + } + + /** + * Update int. + * + * @param columnIndex the column index + * @param x the x + * @throws SQLException the sql exception + */ + @Override + public void updateInt(final int columnIndex, final int x) throws SQLException { + resultSet.updateInt(columnIndex, x); + } + + /** + * Update long. + * + * @param columnIndex the column index + * @param x the x + * @throws SQLException the sql exception + */ + @Override + public void updateLong(final int columnIndex, final long x) throws SQLException { + resultSet.updateLong(columnIndex, x); + } + + /** + * Update float. + * + * @param columnIndex the column index + * @param x the x + * @throws SQLException the sql exception + */ + @Override + public void updateFloat(final int columnIndex, final float x) throws SQLException { + resultSet.updateFloat(columnIndex, x); + } + + /** + * Update double. + * + * @param columnIndex the column index + * @param x the x + * @throws SQLException the sql exception + */ + @Override + public void updateDouble(final int columnIndex, final double x) throws SQLException { + resultSet.updateDouble(columnIndex, x); + } + + /** + * Update big decimal. + * + * @param columnIndex the column index + * @param x the x + * @throws SQLException the sql exception + */ + @Override + public void updateBigDecimal(final int columnIndex, final BigDecimal x) throws SQLException { + resultSet.updateBigDecimal(columnIndex, x); + } + + /** + * Update string. + * + * @param columnIndex the column index + * @param x the x + * @throws SQLException the sql exception + */ + @Override + public void updateString(final int columnIndex, final String x) throws SQLException { + resultSet.updateString(columnIndex, x); + } + + /** + * Update bytes. + * + * @param columnIndex the column index + * @param x the x + * @throws SQLException the sql exception + */ + @Override + public void updateBytes(final int columnIndex, final byte[] x) throws SQLException { + resultSet.updateBytes(columnIndex, x); + } + + /** + * Update date. + * + * @param columnIndex the column index + * @param x the x + * @throws SQLException the sql exception + */ + @Override + public void updateDate(final int columnIndex, final Date x) throws SQLException { + resultSet.updateDate(columnIndex, x); + } + + /** + * Update time. + * + * @param columnIndex the column index + * @param x the x + * @throws SQLException the sql exception + */ + @Override + public void updateTime(final int columnIndex, final Time x) throws SQLException { + resultSet.updateTime(columnIndex, x); + } + + /** + * Update timestamp. + * + * @param columnIndex the column index + * @param x the x + * @throws SQLException the sql exception + */ + @Override + public void updateTimestamp(final int columnIndex, final Timestamp x) throws SQLException { + resultSet.updateTimestamp(columnIndex, x); + } + + /** + * Update ascii stream. + * + * @param columnIndex the column index + * @param x the x + * @param length the length + * @throws SQLException the sql exception + */ + @Override + public void updateAsciiStream(final int columnIndex, final InputStream x, final int length) throws SQLException { + resultSet.updateAsciiStream(columnIndex, x, length); + } + + /** + * Update binary stream. + * + * @param columnIndex the column index + * @param x the x + * @param length the length + * @throws SQLException the sql exception + */ + @Override + public void updateBinaryStream(final int columnIndex, final InputStream x, final int length) throws SQLException { + resultSet.updateBinaryStream(columnIndex, x, length); + } + + /** + * Update character stream. + * + * @param columnIndex the column index + * @param x the x + * @param length the length + * @throws SQLException the sql exception + */ + @Override + public void updateCharacterStream(final int columnIndex, final Reader x, final int length) throws SQLException { + resultSet.updateCharacterStream(columnIndex, x, length); + } + + /** + * Update object. + * + * @param columnIndex the column index + * @param x the x + * @param scaleOrLength the scale or length + * @throws SQLException the sql exception + */ + @Override + public void updateObject(final int columnIndex, final Object x, final int scaleOrLength) throws SQLException { + resultSet.updateObject(columnIndex, x, scaleOrLength); + } + + /** + * Update object. + * + * @param columnIndex the column index + * @param x the x + * @throws SQLException the sql exception + */ + @Override + public void updateObject(final int columnIndex, final Object x) throws SQLException { + resultSet.updateObject(columnIndex, x); + } + + /** + * Update null. + * + * @param columnLabel the column label + * @throws SQLException the sql exception + */ + @Override + public void updateNull(final String columnLabel) throws SQLException { + resultSet.updateNull(columnLabel); + } + + /** + * Update boolean. + * + * @param columnLabel the column label + * @param x the x + * @throws SQLException the sql exception + */ + @Override + public void updateBoolean(final String columnLabel, final boolean x) throws SQLException { + resultSet.updateBoolean(columnLabel, x); + } + + /** + * Update byte. + * + * @param columnLabel the column label + * @param x the x + * @throws SQLException the sql exception + */ + @Override + public void updateByte(final String columnLabel, final byte x) throws SQLException { + resultSet.updateByte(columnLabel, x); + } + + /** + * Update short. + * + * @param columnLabel the column label + * @param x the x + * @throws SQLException the sql exception + */ + @Override + public void updateShort(final String columnLabel, final short x) throws SQLException { + resultSet.updateShort(columnLabel, x); + } + + /** + * Update int. + * + * @param columnLabel the column label + * @param x the x + * @throws SQLException the sql exception + */ + @Override + public void updateInt(final String columnLabel, final int x) throws SQLException { + resultSet.updateInt(columnLabel, x); + } + + /** + * Update long. + * + * @param columnLabel the column label + * @param x the x + * @throws SQLException the sql exception + */ + @Override + public void updateLong(final String columnLabel, final long x) throws SQLException { + resultSet.updateLong(columnLabel, x); + } + + /** + * Update float. + * + * @param columnLabel the column label + * @param x the x + * @throws SQLException the sql exception + */ + @Override + public void updateFloat(final String columnLabel, final float x) throws SQLException { + resultSet.updateFloat(columnLabel, x); + } + + /** + * Update double. + * + * @param columnLabel the column label + * @param x the x + * @throws SQLException the sql exception + */ + @Override + public void updateDouble(final String columnLabel, final double x) throws SQLException { + resultSet.updateDouble(columnLabel, x); + } + + /** + * Update big decimal. + * + * @param columnLabel the column label + * @param x the x + * @throws SQLException the sql exception + */ + @Override + public void updateBigDecimal(final String columnLabel, final BigDecimal x) throws SQLException { + resultSet.updateBigDecimal(columnLabel, x); + } + + /** + * Update string. + * + * @param columnLabel the column label + * @param x the x + * @throws SQLException the sql exception + */ + @Override + public void updateString(final String columnLabel, final String x) throws SQLException { + resultSet.updateString(columnLabel, x); + } + + /** + * Update bytes. + * + * @param columnLabel the column label + * @param x the x + * @throws SQLException the sql exception + */ + @Override + public void updateBytes(final String columnLabel, final byte[] x) throws SQLException { + resultSet.updateBytes(columnLabel, x); + } + + /** + * Update date. + * + * @param columnLabel the column label + * @param x the x + * @throws SQLException the sql exception + */ + @Override + public void updateDate(final String columnLabel, final Date x) throws SQLException { + resultSet.updateDate(columnLabel, x); + } + + /** + * Update time. + * + * @param columnLabel the column label + * @param x the x + * @throws SQLException the sql exception + */ + @Override + public void updateTime(final String columnLabel, final Time x) throws SQLException { + resultSet.updateTime(columnLabel, x); + } + + /** + * Update timestamp. + * + * @param columnLabel the column label + * @param x the x + * @throws SQLException the sql exception + */ + @Override + public void updateTimestamp(final String columnLabel, final Timestamp x) throws SQLException { + resultSet.updateTimestamp(columnLabel, x); + } + + /** + * Update ascii stream. + * + * @param columnLabel the column label + * @param x the x + * @param length the length + * @throws SQLException the sql exception + */ + @Override + public void updateAsciiStream(final String columnLabel, final InputStream x, final int length) throws SQLException { + resultSet.updateAsciiStream(columnLabel, x, length); + } + + /** + * Update binary stream. + * + * @param columnLabel the column label + * @param x the x + * @param length the length + * @throws SQLException the sql exception + */ + @Override + public void updateBinaryStream(final String columnLabel, final InputStream x, final int length) throws SQLException { + resultSet.updateBinaryStream(columnLabel, x, length); + } + + /** + * Update character stream. + * + * @param columnLabel the column label + * @param reader the reader + * @param length the length + * @throws SQLException the sql exception + */ + @Override + public void updateCharacterStream(final String columnLabel, final Reader reader, final int length) throws SQLException { + resultSet.updateCharacterStream(columnLabel, reader, length); + } + + /** + * Update object. + * + * @param columnLabel the column label + * @param x the x + * @param scaleOrLength the scale or length + * @throws SQLException the sql exception + */ + @Override + public void updateObject(final String columnLabel, final Object x, final int scaleOrLength) throws SQLException { + resultSet.updateObject(columnLabel, x, scaleOrLength); + } + + /** + * Update object. + * + * @param columnLabel the column label + * @param x the x + * @throws SQLException the sql exception + */ + @Override + public void updateObject(final String columnLabel, final Object x) throws SQLException { + resultSet.updateObject(columnLabel, x); + } + + /** + * Insert row. + * + * @throws SQLException the sql exception + */ + @Override + public void insertRow() throws SQLException { + resultSet.insertRow(); + } + + /** + * Update row. + * + * @throws SQLException the sql exception + */ + @Override + public void updateRow() throws SQLException { + resultSet.updateRow(); + } + + /** + * Delete row. + * + * @throws SQLException the sql exception + */ + @Override + public void deleteRow() throws SQLException { + resultSet.deleteRow(); + } + + /** + * Refresh row. + * + * @throws SQLException the sql exception + */ + @Override + public void refreshRow() throws SQLException { + resultSet.refreshRow(); + } + + /** + * Cancel row updates. + * + * @throws SQLException the sql exception + */ + @Override + public void cancelRowUpdates() throws SQLException { + resultSet.cancelRowUpdates(); + } + + /** + * Move to insert row. + * + * @throws SQLException the sql exception + */ + @Override + public void moveToInsertRow() throws SQLException { + resultSet.moveToInsertRow(); + } + + /** + * Move to current row. + * + * @throws SQLException the sql exception + */ + @Override + public void moveToCurrentRow() throws SQLException { + resultSet.moveToCurrentRow(); + } + + /** + * Gets statement. + * + * @return the statement + * @throws SQLException the sql exception + */ + @Override + public Statement getStatement() throws SQLException { + return resultSet.getStatement(); + } + + /** + * Update ascii stream. + * + * @param columnIndex the column index + * @param x the x + * @param length the length + * @throws SQLException the sql exception + */ + @Override + public void updateAsciiStream(final int columnIndex, final InputStream x, final long length) throws SQLException { + resultSet.updateAsciiStream(columnIndex, x, length); + } + + /** + * Update binary stream. + * + * @param columnIndex the column index + * @param x the x + * @param length the length + * @throws SQLException the sql exception + */ + @Override + public void updateBinaryStream(final int columnIndex, final InputStream x, final long length) throws SQLException { + resultSet.updateBinaryStream(columnIndex, x, length); + } + + /** + * Update character stream. + * + * @param columnIndex the column index + * @param x the x + * @param length the length + * @throws SQLException the sql exception + */ + @Override + public void updateCharacterStream(final int columnIndex, final Reader x, final long length) throws SQLException { + resultSet.updateCharacterStream(columnIndex, x, length); + } + + /** + * Update ascii stream. + * + * @param columnLabel the column label + * @param x the x + * @param length the length + * @throws SQLException the sql exception + */ + @Override + public void updateAsciiStream(final String columnLabel, final InputStream x, final long length) throws SQLException { + resultSet.updateAsciiStream(columnLabel, x, length); + } + + /** + * Update binary stream. + * + * @param columnLabel the column label + * @param x the x + * @param length the length + * @throws SQLException the sql exception + */ + @Override + public void updateBinaryStream(final String columnLabel, final InputStream x, final long length) throws SQLException { + resultSet.updateBinaryStream(columnLabel, x, length); + } + + /** + * Update character stream. + * + * @param columnLabel the column label + * @param reader the reader + * @param length the length + * @throws SQLException the sql exception + */ + @Override + public void updateCharacterStream(final String columnLabel, final Reader reader, final long length) throws SQLException { + resultSet.updateCharacterStream(columnLabel, reader, length); + } + + /** + * Update blob. + * + * @param columnIndex the column index + * @param x the x + * @throws SQLException the sql exception + */ + @Override + public void updateBlob(final int columnIndex, final Blob x) throws SQLException { + resultSet.updateBlob(columnIndex, x); + } + + /** + * Update blob. + * + * @param columnLabel the column label + * @param x the x + * @throws SQLException the sql exception + */ + @Override + public void updateBlob(final String columnLabel, final Blob x) throws SQLException { + resultSet.updateBlob(columnLabel, x); + } + + /** + * Update clob. + * + * @param columnIndex the column index + * @param x the x + * @throws SQLException the sql exception + */ + @Override + public void updateClob(final int columnIndex, final Clob x) throws SQLException { + resultSet.updateClob(columnIndex, x); + } + + /** + * Update clob. + * + * @param columnLabel the column label + * @param x the x + * @throws SQLException the sql exception + */ + @Override + public void updateClob(final String columnLabel, final Clob x) throws SQLException { + resultSet.updateClob(columnLabel, x); + } + + /** + * Update array. + * + * @param columnIndex the column index + * @param x the x + * @throws SQLException the sql exception + */ + @Override + public void updateArray(final int columnIndex, final Array x) throws SQLException { + resultSet.updateArray(columnIndex, x); + } + + /** + * Update array. + * + * @param columnLabel the column label + * @param x the x + * @throws SQLException the sql exception + */ + @Override + public void updateArray(final String columnLabel, final Array x) throws SQLException { + resultSet.updateArray(columnLabel, x); + } + + /** + * Gets row id. + * + * @param columnIndex the column index + * @return the row id + * @throws SQLException the sql exception + */ + @Override + public RowId getRowId(final int columnIndex) throws SQLException { + return resultSet.getRowId(columnIndex); + } + + /** + * Gets row id. + * + * @param columnLabel the column label + * @return the row id + * @throws SQLException the sql exception + */ + @Override + public RowId getRowId(final String columnLabel) throws SQLException { + return resultSet.getRowId(columnLabel); + } + + /** + * Update row id. + * + * @param columnIndex the column index + * @param x the x + * @throws SQLException the sql exception + */ + @Override + public void updateRowId(final int columnIndex, final RowId x) throws SQLException { + resultSet.updateRowId(columnIndex, x); + } + + /** + * Update row id. + * + * @param columnLabel the column label + * @param x the x + * @throws SQLException the sql exception + */ + @Override + public void updateRowId(final String columnLabel, final RowId x) throws SQLException { + resultSet.updateRowId(columnLabel, x); + } + + /** + * Gets holdability. + * + * @return the holdability + * @throws SQLException the sql exception + */ + @Override + public int getHoldability() throws SQLException { + return resultSet.getHoldability(); + } + + /** + * Is closed boolean. + * + * @return the boolean + * @throws SQLException the sql exception + */ + @Override + public boolean isClosed() throws SQLException { + return resultSet.isClosed(); + } + + /** + * Update n string. + * + * @param columnIndex the column index + * @param nString the n string + * @throws SQLException the sql exception + */ + @Override + public void updateNString(final int columnIndex, final String nString) throws SQLException { + resultSet.updateNString(columnIndex, nString); + } + + /** + * Update n string. + * + * @param columnLabel the column label + * @param nString the n string + * @throws SQLException the sql exception + */ + @Override + public void updateNString(final String columnLabel, final String nString) throws SQLException { + resultSet.updateNString(columnLabel, nString); + } + + /** + * Update n clob. + * + * @param columnIndex the column index + * @param nClob the n clob + * @throws SQLException the sql exception + */ + @Override + public void updateNClob(final int columnIndex, final NClob nClob) throws SQLException { + resultSet.updateNClob(columnIndex, nClob); + } + + /** + * Update n clob. + * + * @param columnLabel the column label + * @param nClob the n clob + * @throws SQLException the sql exception + */ + @Override + public void updateNClob(final String columnLabel, final NClob nClob) throws SQLException { + resultSet.updateNClob(columnLabel, nClob); + } + + /** + * Gets n clob. + * + * @param columnIndex the column index + * @return the n clob + * @throws SQLException the sql exception + */ + @Override + public NClob getNClob(final int columnIndex) throws SQLException { + return resultSet.getNClob(columnIndex); + } + + /** + * Gets n clob. + * + * @param columnLabel the column label + * @return the n clob + * @throws SQLException the sql exception + */ + @Override + public NClob getNClob(final String columnLabel) throws SQLException { + return resultSet.getNClob(columnLabel); + } + + /** + * Gets sqlxml. + * + * @param columnIndex the column index + * @return the sqlxml + * @throws SQLException the sql exception + */ + @Override + public SQLXML getSQLXML(final int columnIndex) throws SQLException { + return resultSet.getSQLXML(columnIndex); + } + + /** + * Gets sqlxml. + * + * @param columnLabel the column label + * @return the sqlxml + * @throws SQLException the sql exception + */ + @Override + public SQLXML getSQLXML(final String columnLabel) throws SQLException { + return resultSet.getSQLXML(columnLabel); + } + + /** + * Update sqlxml. + * + * @param columnIndex the column index + * @param xmlObject the xml object + * @throws SQLException the sql exception + */ + @Override + public void updateSQLXML(final int columnIndex, final SQLXML xmlObject) throws SQLException { + resultSet.updateSQLXML(columnIndex, xmlObject); + } + + /** + * Update sqlxml. + * + * @param columnLabel the column label + * @param xmlObject the xml object + * @throws SQLException the sql exception + */ + @Override + public void updateSQLXML(final String columnLabel, final SQLXML xmlObject) throws SQLException { + resultSet.updateSQLXML(columnLabel, xmlObject); + } + + /** + * Update n character stream. + * + * @param columnIndex the column index + * @param x the x + * @param length the length + * @throws SQLException the sql exception + */ + @Override + public void updateNCharacterStream(final int columnIndex, final Reader x, final long length) throws SQLException { + resultSet.updateNCharacterStream(columnIndex, x, length); + } + + /** + * Update n character stream. + * + * @param columnLabel the column label + * @param reader the reader + * @param length the length + * @throws SQLException the sql exception + */ + @Override + public void updateNCharacterStream(final String columnLabel, final Reader reader, final long length) throws SQLException { + resultSet.updateNCharacterStream(columnLabel, reader, length); + } + + /** + * Update n character stream. + * + * @param columnIndex the column index + * @param x the x + * @throws SQLException the sql exception + */ + @Override + public void updateNCharacterStream(final int columnIndex, final Reader x) throws SQLException { + resultSet.updateNCharacterStream(columnIndex, x); + } + + /** + * Update n character stream. + * + * @param columnLabel the column label + * @param reader the reader + * @throws SQLException the sql exception + */ + @Override + public void updateNCharacterStream(final String columnLabel, final Reader reader) throws SQLException { + resultSet.updateNCharacterStream(columnLabel, reader); + } + + /** + * Update blob. + * + * @param columnIndex the column index + * @param inputStream the input stream + * @param length the length + * @throws SQLException the sql exception + */ + @Override + public void updateBlob(final int columnIndex, final InputStream inputStream, final long length) throws SQLException { + resultSet.updateBlob(columnIndex, inputStream, length); + } + + /** + * Update blob. + * + * @param columnLabel the column label + * @param inputStream the input stream + * @param length the length + * @throws SQLException the sql exception + */ + @Override + public void updateBlob(final String columnLabel, final InputStream inputStream, final long length) throws SQLException { + resultSet.updateBlob(columnLabel, inputStream, length); + } + + /** + * Update blob. + * + * @param columnIndex the column index + * @param inputStream the input stream + * @throws SQLException the sql exception + */ + @Override + public void updateBlob(final int columnIndex, final InputStream inputStream) throws SQLException { + resultSet.updateBlob(columnIndex, inputStream); + } + + /** + * Update blob. + * + * @param columnLabel the column label + * @param inputStream the input stream + * @throws SQLException the sql exception + */ + @Override + public void updateBlob(final String columnLabel, final InputStream inputStream) throws SQLException { + resultSet.updateBlob(columnLabel, inputStream); + } + + /** + * Update clob. + * + * @param columnIndex the column index + * @param reader the reader + * @param length the length + * @throws SQLException the sql exception + */ + @Override + public void updateClob(final int columnIndex, final Reader reader, final long length) throws SQLException { + resultSet.updateClob(columnIndex, reader, length); + } + + /** + * Update clob. + * + * @param columnLabel the column label + * @param reader the reader + * @param length the length + * @throws SQLException the sql exception + */ + @Override + public void updateClob(final String columnLabel, final Reader reader, final long length) throws SQLException { + resultSet.updateClob(columnLabel, reader, length); + } + + /** + * Update clob. + * + * @param columnIndex the column index + * @param reader the reader + * @throws SQLException the sql exception + */ + @Override + public void updateClob(final int columnIndex, final Reader reader) throws SQLException { + resultSet.updateClob(columnIndex, reader); + } + + /** + * Update clob. + * + * @param columnLabel the column label + * @param reader the reader + * @throws SQLException the sql exception + */ + @Override + public void updateClob(final String columnLabel, final Reader reader) throws SQLException { + resultSet.updateClob(columnLabel, reader); + } + + /** + * Update n clob. + * + * @param columnIndex the column index + * @param reader the reader + * @param length the length + * @throws SQLException the sql exception + */ + @Override + public void updateNClob(final int columnIndex, final Reader reader, final long length) throws SQLException { + resultSet.updateNClob(columnIndex, reader, length); + } + + /** + * Update n clob. + * + * @param columnLabel the column label + * @param reader the reader + * @param length the length + * @throws SQLException the sql exception + */ + @Override + public void updateNClob(final String columnLabel, final Reader reader, final long length) throws SQLException { + resultSet.updateNClob(columnLabel, reader, length); + } + + /** + * Update n clob. + * + * @param columnIndex the column index + * @param reader the reader + * @throws SQLException the sql exception + */ + @Override + public void updateNClob(final int columnIndex, final Reader reader) throws SQLException { + resultSet.updateNClob(columnIndex, reader); + } + + /** + * Update n clob. + * + * @param columnLabel the column label + * @param reader the reader + * @throws SQLException the sql exception + */ + @Override + public void updateNClob(final String columnLabel, final Reader reader) throws SQLException { + resultSet.updateNClob(columnLabel, reader); + } + + /** + * Gets object. + * + * @param the type parameter + * @param columnIndex the column index + * @param type the type + * @return the object + * @throws SQLException the sql exception + */ + @Override + public T getObject(final int columnIndex, final Class type) throws SQLException { + return resultSet.getObject(columnIndex, type); + } + + /** + * Gets object. + * + * @param the type parameter + * @param columnLabel the column label + * @param type the type + * @return the object + * @throws SQLException the sql exception + */ + @Override + public T getObject(final String columnLabel, final Class type) throws SQLException { + return resultSet.getObject(columnLabel, type); + } + + /** + * Update object. + * + * @param columnIndex the column index + * @param x the x + * @param targetSqlType the target sql type + * @param scaleOrLength the scale or length + * @throws SQLException the sql exception + */ + @Override + public void updateObject(final int columnIndex, final Object x, final SQLType targetSqlType, final int scaleOrLength) + throws SQLException { + resultSet.updateObject(columnIndex, x, targetSqlType, scaleOrLength); + } + + /** + * Update object. + * + * @param columnLabel the column label + * @param x the x + * @param targetSqlType the target sql type + * @param scaleOrLength the scale or length + * @throws SQLException the sql exception + */ + @Override + public void updateObject(final String columnLabel, final Object x, final SQLType targetSqlType, final int scaleOrLength) + throws SQLException { + resultSet.updateObject(columnLabel, x, targetSqlType, scaleOrLength); + } + + /** + * Update object. + * + * @param columnIndex the column index + * @param x the x + * @param targetSqlType the target sql type + * @throws SQLException the sql exception + */ + @Override + public void updateObject(final int columnIndex, final Object x, final SQLType targetSqlType) throws SQLException { + resultSet.updateObject(columnIndex, x, targetSqlType); + } + + /** + * Update object. + * + * @param columnLabel the column label + * @param x the x + * @param targetSqlType the target sql type + * @throws SQLException the sql exception + */ + @Override + public void updateObject(final String columnLabel, final Object x, final SQLType targetSqlType) throws SQLException { + resultSet.updateObject(columnLabel, x, targetSqlType); + } + + /** + * Update ascii stream. + * + * @param columnIndex the column index + * @param x the x + * @throws SQLException the sql exception + */ + @Override + public void updateAsciiStream(final int columnIndex, final InputStream x) throws SQLException { + resultSet.updateAsciiStream(columnIndex, x); + } + + /** + * Update binary stream. + * + * @param columnIndex the column index + * @param x the x + * @throws SQLException the sql exception + */ + @Override + public void updateBinaryStream(final int columnIndex, final InputStream x) throws SQLException { + resultSet.updateBinaryStream(columnIndex, x); + } + + /** + * Update character stream. + * + * @param columnIndex the column index + * @param x the x + * @throws SQLException the sql exception + */ + @Override + public void updateCharacterStream(final int columnIndex, final Reader x) throws SQLException { + resultSet.updateCharacterStream(columnIndex, x); + } + + /** + * Update ascii stream. + * + * @param columnLabel the column label + * @param x the x + * @throws SQLException the sql exception + */ + @Override + public void updateAsciiStream(final String columnLabel, final InputStream x) throws SQLException { + resultSet.updateAsciiStream(columnLabel, x); + } + + /** + * Update binary stream. + * + * @param columnLabel the column label + * @param x the x + * @throws SQLException the sql exception + */ + @Override + public void updateBinaryStream(final String columnLabel, final InputStream x) throws SQLException { + resultSet.updateBinaryStream(columnLabel, x); + } + + /** + * Update character stream. + * + * @param columnLabel the column label + * @param reader the reader + * @throws SQLException the sql exception + */ + @Override + public void updateCharacterStream(final String columnLabel, final Reader reader) throws SQLException { + resultSet.updateCharacterStream(columnLabel, reader); + } + + /** + * Gets url. + * + * @param columnIndex the column index + * @return the url + * @throws SQLException the sql exception + */ + @Override + public URL getURL(final int columnIndex) throws SQLException { + return resultSet.getURL(columnIndex); + } + + /** + * Gets url. + * + * @param columnLabel the column label + * @return the url + * @throws SQLException the sql exception + */ + @Override + public URL getURL(final String columnLabel) throws SQLException { + return resultSet.getURL(columnLabel); + } + + /** + * Update ref. + * + * @param columnIndex the column index + * @param x the x + * @throws SQLException the sql exception + */ + @Override + public void updateRef(final int columnIndex, final Ref x) throws SQLException { + resultSet.updateRef(columnIndex, x); + } + + /** + * Update ref. + * + * @param columnLabel the column label + * @param x the x + * @throws SQLException the sql exception + */ + @Override + public void updateRef(final String columnLabel, final Ref x) throws SQLException { + resultSet.updateRef(columnLabel, x); + } + + /** + * Is wrapper for boolean. + * + * @param iface the iface + * @return the boolean + * @throws SQLException the sql exception + */ + @Override + public boolean isWrapperFor(final Class iface) throws SQLException { + return resultSet.isWrapperFor(iface); + } + + /** + * Unwrap t. + * + * @param the type parameter + * @param iface the iface + * @return the t + * @throws SQLException the sql exception + */ + @Override + public T unwrap(final Class iface) throws SQLException { + return resultSet.unwrap(iface); + } +} + diff --git a/fx/src/test/java/de/neitzel/fx/injectfx/InjectableComponentScannerTest.java b/core/src/test/java/de/neitzel/core/inject/InjectableComponentScannerTest.java similarity index 76% rename from fx/src/test/java/de/neitzel/fx/injectfx/InjectableComponentScannerTest.java rename to core/src/test/java/de/neitzel/core/inject/InjectableComponentScannerTest.java index 6fa7a2f..49fd066 100644 --- a/fx/src/test/java/de/neitzel/fx/injectfx/InjectableComponentScannerTest.java +++ b/core/src/test/java/de/neitzel/core/inject/InjectableComponentScannerTest.java @@ -1,11 +1,10 @@ -package de.neitzel.fx.injectfx; +package de.neitzel.core.inject; -import de.neitzel.fx.injectfx.testcomponents.test1ok.SuperClass; -import de.neitzel.fx.injectfx.testcomponents.test1ok.TestComponent1_1; -import de.neitzel.fx.injectfx.testcomponents.test1ok.TestInterface1_1; -import de.neitzel.fx.injectfx.testcomponents.test1ok.TestInterface1_2; -import de.neitzel.fx.injectfx.testcomponents.test1ok.sub.TestComponent1_2; -import de.neitzel.inject.InjectableComponentScanner; +import de.neitzel.core.inject.testcomponents.test1ok.SuperClass; +import de.neitzel.core.inject.testcomponents.test1ok.TestComponent1_1; +import de.neitzel.core.inject.testcomponents.test1ok.TestInterface1_1; +import de.neitzel.core.inject.testcomponents.test1ok.TestInterface1_2; +import de.neitzel.core.inject.testcomponents.test1ok.sub.TestComponent1_2; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.*; @@ -17,7 +16,7 @@ class InjectableComponentScannerTest { */ @Test void testLoadComponents() { - InjectableComponentScanner scanner = new InjectableComponentScanner("de.neitzel.injectfx.testcomponents.test1ok"); + InjectableComponentScanner scanner = new InjectableComponentScanner("de.neitzel.core.inject.testcomponents.test1ok"); var instantiableComponents = scanner.getInstantiableComponents(); var nonUniqueTypes = scanner.getNotUniqueTypes(); @@ -38,7 +37,7 @@ class InjectableComponentScannerTest { */ @Test void testComponentsFailWithUnknownParameters() { - InjectableComponentScanner scanner = new InjectableComponentScanner("de.neitzel.injectfx.testcomponents.test2fail"); + InjectableComponentScanner scanner = new InjectableComponentScanner("de.neitzel.core.inject.testcomponents.test2fail"); var instantiableComponents = scanner.getInstantiableComponents(); var nonUniqueTypes = scanner.getNotUniqueTypes(); diff --git a/core/src/test/java/de/neitzel/core/inject/testcomponents/test1ok/SuperClass.java b/core/src/test/java/de/neitzel/core/inject/testcomponents/test1ok/SuperClass.java new file mode 100644 index 0000000..e9a56c8 --- /dev/null +++ b/core/src/test/java/de/neitzel/core/inject/testcomponents/test1ok/SuperClass.java @@ -0,0 +1,4 @@ +package de.neitzel.core.inject.testcomponents.test1ok; + +public class SuperClass { +} diff --git a/fx/src/test/java/de/neitzel/fx/injectfx/testcomponents/test1ok/TestComponent1_1.java b/core/src/test/java/de/neitzel/core/inject/testcomponents/test1ok/TestComponent1_1.java similarity index 55% rename from fx/src/test/java/de/neitzel/fx/injectfx/testcomponents/test1ok/TestComponent1_1.java rename to core/src/test/java/de/neitzel/core/inject/testcomponents/test1ok/TestComponent1_1.java index 4f2e7cb..7769a6e 100644 --- a/fx/src/test/java/de/neitzel/fx/injectfx/testcomponents/test1ok/TestComponent1_1.java +++ b/core/src/test/java/de/neitzel/core/inject/testcomponents/test1ok/TestComponent1_1.java @@ -1,6 +1,6 @@ -package de.neitzel.fx.injectfx.testcomponents.test1ok; +package de.neitzel.core.inject.testcomponents.test1ok; -import de.neitzel.inject.annotation.Component; +import de.neitzel.core.inject.annotation.Component; @Component public class TestComponent1_1 extends SuperClass implements TestInterface1_2 { diff --git a/core/src/test/java/de/neitzel/core/inject/testcomponents/test1ok/TestInterface1_1.java b/core/src/test/java/de/neitzel/core/inject/testcomponents/test1ok/TestInterface1_1.java new file mode 100644 index 0000000..6edec9d --- /dev/null +++ b/core/src/test/java/de/neitzel/core/inject/testcomponents/test1ok/TestInterface1_1.java @@ -0,0 +1,4 @@ +package de.neitzel.core.inject.testcomponents.test1ok; + +public interface TestInterface1_1 { +} diff --git a/core/src/test/java/de/neitzel/core/inject/testcomponents/test1ok/TestInterface1_2.java b/core/src/test/java/de/neitzel/core/inject/testcomponents/test1ok/TestInterface1_2.java new file mode 100644 index 0000000..70d1cbb --- /dev/null +++ b/core/src/test/java/de/neitzel/core/inject/testcomponents/test1ok/TestInterface1_2.java @@ -0,0 +1,4 @@ +package de.neitzel.core.inject.testcomponents.test1ok; + +public interface TestInterface1_2 { +} diff --git a/core/src/test/java/de/neitzel/core/inject/testcomponents/test1ok/sub/TestComponent1_2.java b/core/src/test/java/de/neitzel/core/inject/testcomponents/test1ok/sub/TestComponent1_2.java new file mode 100644 index 0000000..ff09e32 --- /dev/null +++ b/core/src/test/java/de/neitzel/core/inject/testcomponents/test1ok/sub/TestComponent1_2.java @@ -0,0 +1,12 @@ +package de.neitzel.core.inject.testcomponents.test1ok.sub; + +import de.neitzel.core.inject.testcomponents.test1ok.SuperClass; +import de.neitzel.core.inject.testcomponents.test1ok.TestInterface1_1; +import de.neitzel.core.inject.testcomponents.test1ok.TestInterface1_2; +import de.neitzel.core.inject.annotation.Component; + +@Component +public class TestComponent1_2 extends SuperClass implements TestInterface1_1, TestInterface1_2 { + public TestComponent1_2() { + } +} diff --git a/fx/src/test/java/de/neitzel/fx/injectfx/testcomponents/test2fail/TestComponent2_1.java b/core/src/test/java/de/neitzel/core/inject/testcomponents/test2fail/TestComponent2_1.java similarity index 56% rename from fx/src/test/java/de/neitzel/fx/injectfx/testcomponents/test2fail/TestComponent2_1.java rename to core/src/test/java/de/neitzel/core/inject/testcomponents/test2fail/TestComponent2_1.java index 4e477af..a2a041d 100644 --- a/fx/src/test/java/de/neitzel/fx/injectfx/testcomponents/test2fail/TestComponent2_1.java +++ b/core/src/test/java/de/neitzel/core/inject/testcomponents/test2fail/TestComponent2_1.java @@ -1,6 +1,6 @@ -package de.neitzel.fx.injectfx.testcomponents.test2fail; +package de.neitzel.core.inject.testcomponents.test2fail; -import de.neitzel.inject.annotation.Component; +import de.neitzel.core.inject.annotation.Component; /** * TestComponent1 that should fail. diff --git a/fx-example/pom.xml b/fx-example/pom.xml index f5b0b13..87e3dc5 100644 --- a/fx-example/pom.xml +++ b/fx-example/pom.xml @@ -16,7 +16,7 @@ ${project.artifactId} ${project.artifactId} ${project.artifactId} - de.neitzel.fx.injectfx.example.Main + de.neitzel.core.fx.injectfx.example.Main ${project.artifactId}-${project.version} diff --git a/fx-example/src/main/java/de/neitzel/fx/component/example/Address.java b/fx-example/src/main/java/de/neitzel/core/fx/component/example/Address.java similarity index 75% rename from fx-example/src/main/java/de/neitzel/fx/component/example/Address.java rename to fx-example/src/main/java/de/neitzel/core/fx/component/example/Address.java index 9166a04..b82b899 100644 --- a/fx-example/src/main/java/de/neitzel/fx/component/example/Address.java +++ b/fx-example/src/main/java/de/neitzel/core/fx/component/example/Address.java @@ -1,4 +1,4 @@ -package de.neitzel.fx.component.example; +package de.neitzel.core.fx.component.example; import lombok.Getter; import lombok.Setter; diff --git a/fx-example/src/main/java/de/neitzel/fx/component/example/ExampleApp.java b/fx-example/src/main/java/de/neitzel/core/fx/component/example/ExampleApp.java similarity index 90% rename from fx-example/src/main/java/de/neitzel/fx/component/example/ExampleApp.java rename to fx-example/src/main/java/de/neitzel/core/fx/component/example/ExampleApp.java index d4ef74e..d39f1f4 100644 --- a/fx-example/src/main/java/de/neitzel/fx/component/example/ExampleApp.java +++ b/fx-example/src/main/java/de/neitzel/core/fx/component/example/ExampleApp.java @@ -1,6 +1,6 @@ -package de.neitzel.fx.component.example; +package de.neitzel.core.fx.component.example; -import de.neitzel.fx.component.ComponentLoader; +import de.neitzel.core.fx.component.ComponentLoader; import javafx.application.Application; import javafx.scene.Parent; import javafx.scene.Scene; diff --git a/fx-example/src/main/java/de/neitzel/fx/component/example/Main.java b/fx-example/src/main/java/de/neitzel/core/fx/component/example/Main.java similarity index 89% rename from fx-example/src/main/java/de/neitzel/fx/component/example/Main.java rename to fx-example/src/main/java/de/neitzel/core/fx/component/example/Main.java index 80565bb..388db92 100644 --- a/fx-example/src/main/java/de/neitzel/fx/component/example/Main.java +++ b/fx-example/src/main/java/de/neitzel/core/fx/component/example/Main.java @@ -1,4 +1,4 @@ -package de.neitzel.fx.component.example; +package de.neitzel.core.fx.component.example; /** * Another Main class as workaround when the JavaFX Application ist started without diff --git a/fx-example/src/main/java/de/neitzel/fx/component/example/Person.java b/fx-example/src/main/java/de/neitzel/core/fx/component/example/Person.java similarity index 75% rename from fx-example/src/main/java/de/neitzel/fx/component/example/Person.java rename to fx-example/src/main/java/de/neitzel/core/fx/component/example/Person.java index 2078450..76971fa 100644 --- a/fx-example/src/main/java/de/neitzel/fx/component/example/Person.java +++ b/fx-example/src/main/java/de/neitzel/core/fx/component/example/Person.java @@ -1,4 +1,4 @@ -package de.neitzel.fx.component.example; +package de.neitzel.core.fx.component.example; import lombok.Getter; import lombok.Setter; diff --git a/fx-example/src/main/java/de/neitzel/fx/injectfx/example/JavaFXApp.java b/fx-example/src/main/java/de/neitzel/core/fx/injectfx/example/JavaFXApp.java similarity index 93% rename from fx-example/src/main/java/de/neitzel/fx/injectfx/example/JavaFXApp.java rename to fx-example/src/main/java/de/neitzel/core/fx/injectfx/example/JavaFXApp.java index 2020ead..2a8ceb9 100644 --- a/fx-example/src/main/java/de/neitzel/fx/injectfx/example/JavaFXApp.java +++ b/fx-example/src/main/java/de/neitzel/core/fx/injectfx/example/JavaFXApp.java @@ -1,4 +1,4 @@ -package de.neitzel.fx.injectfx.example; +package de.neitzel.core.fx.injectfx.example; import javafx.application.Application; import javafx.fxml.FXMLLoader; diff --git a/fx-example/src/main/java/de/neitzel/fx/injectfx/example/Main.java b/fx-example/src/main/java/de/neitzel/core/fx/injectfx/example/Main.java similarity index 90% rename from fx-example/src/main/java/de/neitzel/fx/injectfx/example/Main.java rename to fx-example/src/main/java/de/neitzel/core/fx/injectfx/example/Main.java index 63b5774..4dc8937 100644 --- a/fx-example/src/main/java/de/neitzel/fx/injectfx/example/Main.java +++ b/fx-example/src/main/java/de/neitzel/core/fx/injectfx/example/Main.java @@ -1,4 +1,4 @@ -package de.neitzel.fx.injectfx.example; +package de.neitzel.core.fx.injectfx.example; /** * Another Main class as workaround when the JavaFX Application ist started without diff --git a/fx-example/src/main/java/de/neitzel/fx/injectfx/example/MainWindow.java b/fx-example/src/main/java/de/neitzel/core/fx/injectfx/example/MainWindow.java similarity index 93% rename from fx-example/src/main/java/de/neitzel/fx/injectfx/example/MainWindow.java rename to fx-example/src/main/java/de/neitzel/core/fx/injectfx/example/MainWindow.java index 07fa5c2..e36126e 100644 --- a/fx-example/src/main/java/de/neitzel/fx/injectfx/example/MainWindow.java +++ b/fx-example/src/main/java/de/neitzel/core/fx/injectfx/example/MainWindow.java @@ -1,4 +1,4 @@ -package de.neitzel.fx.injectfx.example; +package de.neitzel.core.fx.injectfx.example; import javafx.event.ActionEvent; import javafx.fxml.FXML; diff --git a/fx-example/src/main/resources/address.fxml b/fx-example/src/main/resources/address.fxml index 2bc5a08..1839be7 100644 --- a/fx-example/src/main/resources/address.fxml +++ b/fx-example/src/main/resources/address.fxml @@ -6,7 +6,7 @@ - +