Remove deprecated methods in ebean-api - meta, metric, plugin. Migrate getFoo() -> foo()

These methods are deprecated getters, migrate to the associated accessor method.
This commit is contained in:
Rob Bygrave
2022-04-06 18:32:52 +12:00
parent a87897dd46
commit e7dd5570a5
11 changed files with 8 additions and 225 deletions
@@ -10,11 +10,4 @@ public interface MetaCountMetric extends MetaMetric {
*/
long count();
/**
* Migrate to count()
*/
@Deprecated
default long getCount() {
return count();
}
}
@@ -10,11 +10,4 @@ public interface MetaMetric {
*/
String name();
/**
* Migrate to name().
*/
@Deprecated
default String getName() {
return name();
}
}
@@ -10,40 +10,16 @@ public interface MetaQueryMetric extends MetaTimedMetric {
*/
Class<?> type();
/**
* Migrate to type().
*/
@Deprecated
default Class<?> getType() {
return type();
}
/**
* The label for the query (can be null).
*/
String label();
/**
* Migrate to label().
*/
@Deprecated
default String getLabel() {
return label();
}
/**
* The actual SQL of the query.
*/
String sql();
/**
* Migrate to sql().
*/
@Deprecated
default String getSql() {
return sql();
}
/**
* Return the hash of the plan.
*/
@@ -11,67 +11,26 @@ public interface MetaTimedMetric extends MetaMetric {
*/
String location();
/**
* Migrate to location()
*/
@Deprecated
default String getLocation() {
return location();
}
/**
* Return the total count.
*/
long count();
/**
* Migrate to count()
*/
@Deprecated
default long getCount() {
return count();
}
/**
* Return the total execution time in micros.
*/
long total();
/**
* Migrate to total()
*/
@Deprecated
default long getTotal() {
return total();
}
/**
* Return the max execution time in micros.
*/
long max();
/**
* Migrate to max()
*/
@Deprecated
default long getMax() {
return max();
}
/**
* Return the mean execution time in micros.
*/
long mean();
/**
* Migrate to mean()
*/
@Deprecated
default long getMean() {
return mean();
}
/**
* Return true if this is the first metrics collection for this query.
* <p>
@@ -12,37 +12,14 @@ public interface ServerMetrics {
*/
List<MetaTimedMetric> timedMetrics();
/**
* Migrate to timedMetrics().
*/
@Deprecated
default List<MetaTimedMetric> getTimedMetrics() {
return timedMetrics();
}
/**
* Return the query metrics.
*/
List<MetaQueryMetric> queryMetrics();
/**
* Migrate to queryMetrics().
*/
@Deprecated
default List<MetaQueryMetric> getQueryMetrics() {
return queryMetrics();
}
/**
* Return the Counter metrics.
*/
List<MetaCountMetric> countMetrics();
/**
* Migrate to countMetrics().
*/
@Deprecated
default List<MetaCountMetric> getCountMetrics() {
return countMetrics();
}
}
@@ -12,14 +12,6 @@ public interface QueryPlanMetric {
*/
TimedMetric metric();
/**
* Deprecated migrate to metric().
*/
@Deprecated
default TimedMetric getMetric() {
return metric();
}
/**
* Visit the underlying metric.
*/
@@ -16,28 +16,12 @@ public interface BeanDocType<T> {
/**
* Return the doc store index type for this bean type.
*/
default String indexType() {
return getIndexType();
}
/**
* Deprecated migrate to indexType().
*/
@Deprecated
String getIndexType();
String indexType();
/**
* Return the doc store index name for this bean type.
*/
default String indexName() {
return getIndexName();
}
/**
* Deprecated migrate to indexName().
*/
@Deprecated
String getIndexName();
String indexName();
/**
* Apply the appropriate fetch path to the query such that the query returns beans matching
@@ -62,15 +46,7 @@ public interface BeanDocType<T> {
* For embedded 'many' properties we need a FetchPath relative to the root which is used to
* build and replace the embedded list.
*/
default FetchPath embeddedManyRoot(String path) {
return getEmbeddedManyRoot(path);
}
/**
* Deprecated migrate to embeddedManyRoot().
*/
@Deprecated
FetchPath getEmbeddedManyRoot(String path);
FetchPath embeddedManyRoot(String path);
/**
* Return a 'raw' property mapped for the given property.
@@ -39,14 +39,6 @@ public interface ExpressionPath {
*/
StringParser stringParser();
/**
* Deprecated migrate to stringParser().
*/
@Deprecated
default StringParser getStringParser() {
return stringParser();
}
/**
* For DateTime capable scalar types convert the long systemTimeMillis into
* an appropriate java time (Date,Timestamp,Time,Calendar, JODA type etc).
@@ -64,14 +56,6 @@ public interface ExpressionPath {
*/
int jdbcType();
/**
* Deprecated migrate to jdbcType().
*/
@Deprecated
default int getJdbcType() {
return jdbcType();
}
/**
* Return true if this is an ManyToOne or OneToOne associated bean property.
*/
@@ -85,50 +69,19 @@ public interface ExpressionPath {
*/
String assocIdExpression(String propName, String bindOperator);
/**
* Deprecated migrate to assocIdExpression().
*/
@Deprecated
default String getAssocIdExpression(String propName, String bindOperator) {
return assocIdExpression(propName, bindOperator);
}
/**
* Return the Id values for the given bean value.
*/
Object[] assocIdValues(EntityBean bean);
/**
* Deprecated migrate to assocIdValues().
*/
@Deprecated
default Object[] getAssocIdValues(EntityBean bean) {
return assocIdValues(bean);
}
/**
* Return the underlying bean property.
*/
Property property();
/**
* Deprecated migrate to property().
*/
@Deprecated
default Property getProperty() {
return property();
}
/**
* The ElPrefix plus name.
*/
String elName();
/**
* Deprecated migrate to elName().
*/
@Deprecated
default String getElName() {
return elName();
}
}
@@ -10,40 +10,16 @@ public interface Property {
*/
String name();
/**
* Deprecated migrate to name().
*/
@Deprecated
default String getName() {
return name();
}
/**
* Return the type of the property.
*/
Class<?> type();
/**
* Deprecated migrate to type().
*/
@Deprecated
default Class<?> getPropertyType() {
return type();
}
/**
* Return the value of the property on the given bean.
*/
Object value(Object bean);
/**
* Deprecated migrate to value().
*/
@Deprecated
default Object getVal(Object bean) {
return value(bean);
}
/**
* Return true if this is a OneToMany or ManyToMany property.
*/