Renamed AttachableInternal.getConfiguration() to configuration() for
consistency
This commit is contained in:
parent
c753d70bb1
commit
68db0cf354
@ -61,7 +61,7 @@ public class UAuthorTypeRecord extends org.jooq.impl.UDTRecordImpl<org.jooq.test
|
||||
org.jooq.test.oracle.generatedclasses.test.udt.u_author_type.CountBooks f = new org.jooq.test.oracle.generatedclasses.test.udt.u_author_type.CountBooks();
|
||||
f.setSelf(this);
|
||||
|
||||
f.execute(getConfiguration());
|
||||
f.execute(configuration());
|
||||
return f.getReturnValue();
|
||||
}
|
||||
|
||||
@ -83,7 +83,7 @@ public class UAuthorTypeRecord extends org.jooq.impl.UDTRecordImpl<org.jooq.test
|
||||
org.jooq.test.oracle.generatedclasses.test.udt.u_author_type.GetBooks p = new org.jooq.test.oracle.generatedclasses.test.udt.u_author_type.GetBooks();
|
||||
p.setSelf(this);
|
||||
|
||||
p.execute(getConfiguration());
|
||||
p.execute(configuration());
|
||||
from(p.getSelf());
|
||||
return p;
|
||||
}
|
||||
@ -95,7 +95,7 @@ public class UAuthorTypeRecord extends org.jooq.impl.UDTRecordImpl<org.jooq.test
|
||||
org.jooq.test.oracle.generatedclasses.test.udt.u_author_type.Load p = new org.jooq.test.oracle.generatedclasses.test.udt.u_author_type.Load();
|
||||
p.setSelf(this);
|
||||
|
||||
p.execute(getConfiguration());
|
||||
p.execute(configuration());
|
||||
from(p.getSelf());
|
||||
return p.getSelf();
|
||||
}
|
||||
|
||||
@ -61,7 +61,7 @@ public class U_AUTHOR_TYPE extends org.jooq.impl.UDTRecordImpl<org.jooq.test.ora
|
||||
org.jooq.test.oracle3.generatedclasses.udt.u_author_type.COUNT_BOOKS f = new org.jooq.test.oracle3.generatedclasses.udt.u_author_type.COUNT_BOOKS();
|
||||
f.setSELF(this);
|
||||
|
||||
f.execute(getConfiguration());
|
||||
f.execute(configuration());
|
||||
return f.getReturnValue();
|
||||
}
|
||||
|
||||
@ -83,7 +83,7 @@ public class U_AUTHOR_TYPE extends org.jooq.impl.UDTRecordImpl<org.jooq.test.ora
|
||||
org.jooq.test.oracle3.generatedclasses.udt.u_author_type.GET_BOOKS p = new org.jooq.test.oracle3.generatedclasses.udt.u_author_type.GET_BOOKS();
|
||||
p.setSELF(this);
|
||||
|
||||
p.execute(getConfiguration());
|
||||
p.execute(configuration());
|
||||
from(p.getSELF());
|
||||
return p;
|
||||
}
|
||||
@ -95,7 +95,7 @@ public class U_AUTHOR_TYPE extends org.jooq.impl.UDTRecordImpl<org.jooq.test.ora
|
||||
org.jooq.test.oracle3.generatedclasses.udt.u_author_type.LOAD p = new org.jooq.test.oracle3.generatedclasses.udt.u_author_type.LOAD();
|
||||
p.setSELF(this);
|
||||
|
||||
p.execute(getConfiguration());
|
||||
p.execute(configuration());
|
||||
from(p.getSELF());
|
||||
return p.getSELF();
|
||||
}
|
||||
|
||||
@ -188,7 +188,7 @@ class InsertDSL extends Generators {
|
||||
|
||||
@Override
|
||||
public final Insert<R> select(Select select) {
|
||||
Configuration configuration = ((AttachableInternal) getDelegate()).getConfiguration();
|
||||
Configuration configuration = ((AttachableInternal) getDelegate()).configuration();
|
||||
return new InsertSelectQueryImpl<R>(configuration, into, fields, select);
|
||||
}
|
||||
«FOR degree : (1..Constants::MAX_ROW_DEGREE)»
|
||||
|
||||
@ -48,6 +48,6 @@ public interface AttachableInternal extends Attachable {
|
||||
/**
|
||||
* Get the underlying configuration
|
||||
*/
|
||||
Configuration getConfiguration();
|
||||
Configuration configuration();
|
||||
|
||||
}
|
||||
|
||||
@ -61,12 +61,12 @@ abstract class AbstractDelegatingQuery<Q extends Query> extends AbstractQueryPar
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Configuration getConfiguration() {
|
||||
public final Configuration configuration() {
|
||||
if (delegate instanceof AttachableInternal) {
|
||||
return ((AttachableInternal) delegate).getConfiguration();
|
||||
return ((AttachableInternal) delegate).configuration();
|
||||
}
|
||||
|
||||
return super.getConfiguration();
|
||||
return super.configuration();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -83,7 +83,7 @@ abstract class AbstractQuery extends AbstractQueryPart implements Query, Attacha
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Configuration getConfiguration() {
|
||||
public final Configuration configuration() {
|
||||
return configuration;
|
||||
}
|
||||
|
||||
@ -171,7 +171,7 @@ abstract class AbstractQuery extends AbstractQueryPart implements Query, Attacha
|
||||
|
||||
// If all params are inlined, the previous statement always has to
|
||||
// be closed
|
||||
else if (SettingsTools.executeStaticStatements(getConfiguration().settings())) {
|
||||
else if (SettingsTools.executeStaticStatements(configuration().settings())) {
|
||||
close();
|
||||
}
|
||||
}
|
||||
@ -233,7 +233,7 @@ abstract class AbstractQuery extends AbstractQueryPart implements Query, Attacha
|
||||
if (isExecutable()) {
|
||||
|
||||
// Get the attached configuration of this query
|
||||
Configuration c = getConfiguration();
|
||||
Configuration c = configuration();
|
||||
|
||||
// [#1191] The following triggers a start event on all listeners.
|
||||
// This may be used to provide jOOQ with a JDBC connection, in case
|
||||
@ -360,7 +360,7 @@ abstract class AbstractQuery extends AbstractQueryPart implements Query, Attacha
|
||||
*/
|
||||
@Override
|
||||
public final String getSQL() {
|
||||
if (executePreparedStatements(getConfiguration().settings())) {
|
||||
if (executePreparedStatements(configuration().settings())) {
|
||||
return getSQL(false);
|
||||
}
|
||||
else {
|
||||
|
||||
@ -58,7 +58,7 @@ abstract class AbstractQueryPart implements QueryPartInternal {
|
||||
// [#1544] The deprecated Attachable and Attachable internal API
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
Configuration getConfiguration() {
|
||||
Configuration configuration() {
|
||||
return new DefaultConfiguration();
|
||||
}
|
||||
|
||||
@ -130,7 +130,7 @@ abstract class AbstractQueryPart implements QueryPartInternal {
|
||||
* Internal convenience method
|
||||
*/
|
||||
protected final DSLContext create() {
|
||||
return create(getConfiguration());
|
||||
return create(configuration());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -324,7 +324,7 @@ abstract class AbstractRecord extends AbstractStore implements Record {
|
||||
*/
|
||||
@Override
|
||||
public Record original() {
|
||||
AbstractRecord result = Utils.newRecord(getClass(), fields.fields.fields, getConfiguration());
|
||||
AbstractRecord result = Utils.newRecord(getClass(), fields.fields.fields, configuration());
|
||||
Value<?>[] v = getValues();
|
||||
|
||||
for (int i = 0; i < v.length; i++) {
|
||||
@ -471,7 +471,7 @@ abstract class AbstractRecord extends AbstractStore implements Record {
|
||||
@Override
|
||||
public final <R extends Record> R into(Table<R> table) {
|
||||
try {
|
||||
R result = Utils.newRecord(table, getConfiguration());
|
||||
R result = Utils.newRecord(table, configuration());
|
||||
|
||||
for (Field<?> targetField : table.fields()) {
|
||||
Field<?> sourceField = field(targetField);
|
||||
@ -511,7 +511,7 @@ abstract class AbstractRecord extends AbstractStore implements Record {
|
||||
|
||||
@Override
|
||||
public final ResultSet intoResultSet() {
|
||||
ResultImpl<Record> result = new ResultImpl<Record>(getConfiguration(), fields.fields.fields);
|
||||
ResultImpl<Record> result = new ResultImpl<Record>(configuration(), fields.fields.fields);
|
||||
result.add(this);
|
||||
return result.intoResultSet();
|
||||
}
|
||||
@ -654,7 +654,7 @@ abstract class AbstractRecord extends AbstractStore implements Record {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
Result<AbstractRecord> result = new ResultImpl<AbstractRecord>(getConfiguration(), fields.fields.fields);
|
||||
Result<AbstractRecord> result = new ResultImpl<AbstractRecord>(configuration(), fields.fields.fields);
|
||||
result.add(this);
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
@ -185,7 +185,7 @@ public abstract class AbstractRoutine<T> extends AbstractQueryPart implements Ro
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Configuration getConfiguration() {
|
||||
public final Configuration configuration() {
|
||||
return configuration;
|
||||
}
|
||||
|
||||
|
||||
@ -65,27 +65,27 @@ abstract class AbstractSelect<R extends Record> extends AbstractResultQuery<R> i
|
||||
|
||||
@Override
|
||||
public final int fetchCount() throws DataAccessException {
|
||||
return DSL.using(getConfiguration()).fetchCount(this);
|
||||
return DSL.using(configuration()).fetchCount(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Select<R> union(Select<? extends R> select) {
|
||||
return new Union<R>(getConfiguration(), this, select, CombineOperator.UNION);
|
||||
return new Union<R>(configuration(), this, select, CombineOperator.UNION);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Select<R> unionAll(Select<? extends R> select) {
|
||||
return new Union<R>(getConfiguration(), this, select, CombineOperator.UNION_ALL);
|
||||
return new Union<R>(configuration(), this, select, CombineOperator.UNION_ALL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Select<R> except(Select<? extends R> select) {
|
||||
return new Union<R>(getConfiguration(), this, select, CombineOperator.EXCEPT);
|
||||
return new Union<R>(configuration(), this, select, CombineOperator.EXCEPT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Select<R> intersect(Select<? extends R> select) {
|
||||
return new Union<R>(getConfiguration(), this, select, CombineOperator.INTERSECT);
|
||||
return new Union<R>(configuration(), this, select, CombineOperator.INTERSECT);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@ -155,7 +155,7 @@ abstract class AbstractSelect<R extends Record> extends AbstractResultQuery<R> i
|
||||
// If no projection was specified explicitly, create fields from result
|
||||
// set meta data instead. This is typically the case for SELECT * ...
|
||||
if (fields.isEmpty()) {
|
||||
Configuration configuration = getConfiguration();
|
||||
Configuration configuration = configuration();
|
||||
return new MetaDataFieldProvider(configuration, meta).getFields();
|
||||
}
|
||||
|
||||
|
||||
@ -86,7 +86,7 @@ abstract class AbstractStore implements AttachableInternal {
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Configuration getConfiguration() {
|
||||
public final Configuration configuration() {
|
||||
return configuration;
|
||||
}
|
||||
|
||||
@ -94,7 +94,7 @@ abstract class AbstractStore implements AttachableInternal {
|
||||
* This method is used in generated code!
|
||||
*/
|
||||
protected final DSLContext create() {
|
||||
return DSL.using(getConfiguration());
|
||||
return DSL.using(configuration());
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@ -142,7 +142,7 @@ abstract class AbstractStoreQuery<R extends Record> extends AbstractQuery implem
|
||||
@Override
|
||||
public final Result<R> getReturnedRecords() {
|
||||
if (returned == null) {
|
||||
returned = new ResultImpl<R>(getConfiguration(), returning);
|
||||
returned = new ResultImpl<R>(configuration(), returning);
|
||||
}
|
||||
|
||||
return returned;
|
||||
|
||||
@ -110,7 +110,7 @@ class BatchCRUD implements Batch {
|
||||
local.settings().setExecuteLogging(false);
|
||||
|
||||
for (int i = 0; i < records.length; i++) {
|
||||
Configuration previous = ((AttachableInternal) records[i]).getConfiguration();
|
||||
Configuration previous = ((AttachableInternal) records[i]).configuration();
|
||||
|
||||
try {
|
||||
records[i].attach(local);
|
||||
@ -172,7 +172,7 @@ class BatchCRUD implements Batch {
|
||||
Configuration local = configuration.derive(new DefaultExecuteListenerProvider(listeners));
|
||||
|
||||
for (int i = 0; i < records.length; i++) {
|
||||
Configuration previous = ((AttachableInternal) records[i]).getConfiguration();
|
||||
Configuration previous = ((AttachableInternal) records[i]).configuration();
|
||||
|
||||
try {
|
||||
records[i].attach(local);
|
||||
|
||||
@ -138,7 +138,7 @@ class InsertImpl<R extends Record, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
|
||||
|
||||
@Override
|
||||
public final Insert<R> select(Select select) {
|
||||
Configuration configuration = ((AttachableInternal) getDelegate()).getConfiguration();
|
||||
Configuration configuration = ((AttachableInternal) getDelegate()).configuration();
|
||||
return new InsertSelectQueryImpl<R>(configuration, into, fields, select);
|
||||
}
|
||||
|
||||
|
||||
@ -189,7 +189,7 @@ class ReferenceImpl<R extends Record, O extends Record> extends AbstractKey<R> i
|
||||
R first = first(records);
|
||||
|
||||
if (first instanceof AttachableInternal) {
|
||||
return DSL.using(((AttachableInternal) first).getConfiguration());
|
||||
return DSL.using(((AttachableInternal) first).configuration());
|
||||
}
|
||||
else {
|
||||
throw new DetachedException("Supply at least one attachable record");
|
||||
|
||||
@ -124,7 +124,7 @@ class ResultImpl<R extends Record> implements Result<R>, AttachableInternal {
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Configuration getConfiguration() {
|
||||
public final Configuration configuration() {
|
||||
return configuration;
|
||||
}
|
||||
|
||||
@ -857,7 +857,7 @@ class ResultImpl<R extends Record> implements Result<R>, AttachableInternal {
|
||||
|
||||
Result<R> result = map.get(key);
|
||||
if (result == null) {
|
||||
result = new ResultImpl<R>(getConfiguration(), this.fields);
|
||||
result = new ResultImpl<R>(configuration(), this.fields);
|
||||
map.put(key, result);
|
||||
}
|
||||
|
||||
@ -1001,7 +1001,7 @@ class ResultImpl<R extends Record> implements Result<R>, AttachableInternal {
|
||||
|
||||
@Override
|
||||
public final <Z extends Record> Result<Z> into(Table<Z> table) {
|
||||
Result<Z> list = new ResultImpl<Z>(getConfiguration(), table.fields());
|
||||
Result<Z> list = new ResultImpl<Z>(configuration(), table.fields());
|
||||
|
||||
for (R record : this) {
|
||||
list.add(record.into(table));
|
||||
|
||||
@ -88,7 +88,7 @@ class SQLResultQuery extends AbstractResultQuery<Record> {
|
||||
|
||||
@Override
|
||||
protected final Field<?>[] getFields(ResultSetMetaData meta) {
|
||||
Configuration configuration = getConfiguration();
|
||||
Configuration configuration = configuration();
|
||||
return new MetaDataFieldProvider(configuration, meta).getFields();
|
||||
}
|
||||
|
||||
|
||||
@ -399,7 +399,7 @@ public class UpdatableRecordImpl<R extends UpdatableRecord<R>> extends TableReco
|
||||
}
|
||||
|
||||
private final boolean isExecuteWithOptimisticLocking() {
|
||||
Configuration configuration = getConfiguration();
|
||||
Configuration configuration = configuration();
|
||||
|
||||
// This can be null when the current record is detached
|
||||
if (configuration != null) {
|
||||
|
||||
@ -1196,7 +1196,7 @@ final class Utils {
|
||||
*/
|
||||
static final Configuration getConfiguration(Attachable attachable) {
|
||||
if (attachable instanceof AttachableInternal) {
|
||||
return ((AttachableInternal) attachable).getConfiguration();
|
||||
return ((AttachableInternal) attachable).configuration();
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@ -165,7 +165,7 @@ public class MockResultSetMetaData implements ResultSetMetaData, Serializable {
|
||||
Schema schema = table.getSchema();
|
||||
|
||||
if (schema != null) {
|
||||
Configuration configuration = ((AttachableInternal) rs.result).getConfiguration();
|
||||
Configuration configuration = ((AttachableInternal) rs.result).configuration();
|
||||
Schema mapped = null;
|
||||
|
||||
if (configuration != null) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user