mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#2347 - Rename Database.getPlatform() to platform() with deprecation
This commit is contained in:
@@ -1254,7 +1254,7 @@ public final class DB {
|
||||
* queries.
|
||||
*/
|
||||
public static BackgroundExecutor getBackgroundExecutor() {
|
||||
return getDefault().getBackgroundExecutor();
|
||||
return getDefault().backgroundExecutor();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user