#2347 - Rename Database.getPlatform() to platform() with deprecation

This commit is contained in:
Rob Bygrave
2021-09-02 23:04:57 +12:00
parent 7fba9adc43
commit fe67abce83
35 changed files with 76 additions and 53 deletions
+1 -1
View File
@@ -1254,7 +1254,7 @@ public final class DB {
* queries.
*/
public static BackgroundExecutor getBackgroundExecutor() {
return getDefault().getBackgroundExecutor();
return getDefault().backgroundExecutor();
}
/**
+27 -3
View File
@@ -214,12 +214,28 @@ public interface Database {
*
* @return platform for this database instance
*/
Platform getPlatform();
Platform platform();
/**
* Deprecated migrate to platform().
*/
@Deprecated
default Platform getPlatform() {
return platform();
}
/**
* Return the extended API intended for use by plugins.
*/
SpiServer getPluginApi();
SpiServer pluginApi();
/**
* Deprecated migrate to pluginApi().
*/
@Deprecated
default SpiServer getPluginApi() {
return pluginApi();
}
/**
* Return the BeanState for a given entity bean.
@@ -1485,7 +1501,15 @@ public interface Database {
* Return the BackgroundExecutor service for asynchronous processing of
* queries.
*/
BackgroundExecutor getBackgroundExecutor();
BackgroundExecutor backgroundExecutor();
/**
* Deprecated migrate to backgroundExecutor().
*/
@Deprecated
default BackgroundExecutor getBackgroundExecutor() {
return backgroundExecutor();
}
/**
* Return the JsonContext for reading/writing JSON.
+1 -1
View File
@@ -1216,7 +1216,7 @@ public final class Ebean {
* queries.
*/
public static BackgroundExecutor getBackgroundExecutor() {
return getDefault().getBackgroundExecutor();
return getDefault().backgroundExecutor();
}
/**
@@ -843,7 +843,7 @@ public final class EntityBeanIntercept implements Serializable {
}
// For stand alone reference bean or after deserialisation lazy load
// using the ebeanServer. Synchronise only on the bean.
loadBeanInternal(loadProperty, database.getPluginApi().beanLoader());
loadBeanInternal(loadProperty, database.pluginApi().beanLoader());
return;
}
} finally {
@@ -39,7 +39,7 @@ public abstract class SingleBeanLoader implements BeanLoader {
@Override
public void loadBean(EntityBeanIntercept ebi) {
database.getPluginApi().loadBeanL2(ebi);
database.pluginApi().loadBeanL2(ebi);
}
}
@@ -53,7 +53,7 @@ public abstract class SingleBeanLoader implements BeanLoader {
@Override
public void loadBean(EntityBeanIntercept ebi) {
database.getPluginApi().loadBeanRef(ebi);
database.pluginApi().loadBeanRef(ebi);
}
}
@@ -67,7 +67,7 @@ public abstract class SingleBeanLoader implements BeanLoader {
@Override
public void loadBean(EntityBeanIntercept ebi) {
database.getPluginApi().loadBean(ebi);
database.pluginApi().loadBean(ebi);
}
}
}