mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-22 15:10:02 +00:00
Merge pull request #2635 from ebean-orm/feature/deprecated_Database
Remove deprecated methods in ebean-api - Database
This commit is contained in:
1 file changed
-128
@@ -123,81 +123,33 @@ public interface Database {
|
|||||||
*/
|
*/
|
||||||
AutoTune autoTune();
|
AutoTune autoTune();
|
||||||
|
|
||||||
/**
|
|
||||||
* Deprecated migrate to autoTune().
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
default AutoTune getAutoTune() {
|
|
||||||
return autoTune();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the associated DataSource for this Database instance.
|
* Return the associated DataSource for this Database instance.
|
||||||
*/
|
*/
|
||||||
DataSource dataSource();
|
DataSource dataSource();
|
||||||
|
|
||||||
/**
|
|
||||||
* Deprecated migrate to dataSource().
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
default DataSource getDataSource() {
|
|
||||||
return dataSource();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the associated read only DataSource for this Database instance (can be null).
|
* Return the associated read only DataSource for this Database instance (can be null).
|
||||||
*/
|
*/
|
||||||
DataSource readOnlyDataSource();
|
DataSource readOnlyDataSource();
|
||||||
|
|
||||||
/**
|
|
||||||
* Deprecated migrate to readOnlyDataSource().
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
default DataSource getReadOnlyDataSource() {
|
|
||||||
return readOnlyDataSource();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the name. This is used with {@link DB#byName(String)} to get a
|
* Return the name. This is used with {@link DB#byName(String)} to get a
|
||||||
* Database that was registered with the DB singleton.
|
* Database that was registered with the DB singleton.
|
||||||
*/
|
*/
|
||||||
String name();
|
String name();
|
||||||
|
|
||||||
/**
|
|
||||||
* Deprecated migrate to name().
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
default String getName() {
|
|
||||||
return name();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the ExpressionFactory for this database.
|
* Return the ExpressionFactory for this database.
|
||||||
*/
|
*/
|
||||||
ExpressionFactory expressionFactory();
|
ExpressionFactory expressionFactory();
|
||||||
|
|
||||||
/**
|
|
||||||
* Deprecated migrate to expressionFactory().
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
default ExpressionFactory getExpressionFactory() {
|
|
||||||
return expressionFactory();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the MetaInfoManager which is used to get meta data from the Database
|
* Return the MetaInfoManager which is used to get meta data from the Database
|
||||||
* such as query execution statistics.
|
* such as query execution statistics.
|
||||||
*/
|
*/
|
||||||
MetaInfoManager metaInfo();
|
MetaInfoManager metaInfo();
|
||||||
|
|
||||||
/**
|
|
||||||
* Deprecated migrate to metaInfo().
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
default MetaInfoManager getMetaInfoManager() {
|
|
||||||
return metaInfo();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the platform used for this database instance.
|
* Return the platform used for this database instance.
|
||||||
* <p>
|
* <p>
|
||||||
@@ -217,27 +169,11 @@ public interface Database {
|
|||||||
*/
|
*/
|
||||||
Platform platform();
|
Platform platform();
|
||||||
|
|
||||||
/**
|
|
||||||
* Deprecated migrate to platform().
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
default Platform getPlatform() {
|
|
||||||
return platform();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the extended API intended for use by plugins.
|
* Return the extended API intended for use by plugins.
|
||||||
*/
|
*/
|
||||||
SpiServer pluginApi();
|
SpiServer pluginApi();
|
||||||
|
|
||||||
/**
|
|
||||||
* Deprecated migrate to pluginApi().
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
default SpiServer getPluginApi() {
|
|
||||||
return pluginApi();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the BeanState for a given entity bean.
|
* Return the BeanState for a given entity bean.
|
||||||
* <p>
|
* <p>
|
||||||
@@ -246,27 +182,11 @@ public interface Database {
|
|||||||
*/
|
*/
|
||||||
BeanState beanState(Object bean);
|
BeanState beanState(Object bean);
|
||||||
|
|
||||||
/**
|
|
||||||
* Deprecated migrate to beanState().
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
default BeanState getBeanState(Object bean) {
|
|
||||||
return beanState(bean);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the value of the Id property for a given bean.
|
* Return the value of the Id property for a given bean.
|
||||||
*/
|
*/
|
||||||
Object beanId(Object bean);
|
Object beanId(Object bean);
|
||||||
|
|
||||||
/**
|
|
||||||
* Deprecated migrate to beanId().
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
default Object getBeanId(Object bean) {
|
|
||||||
return beanId(bean);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the Id value onto the bean converting the type of the id value if necessary.
|
* Set the Id value onto the bean converting the type of the id value if necessary.
|
||||||
* <p>
|
* <p>
|
||||||
@@ -279,14 +199,6 @@ public interface Database {
|
|||||||
*/
|
*/
|
||||||
Object beanId(Object bean, Object id);
|
Object beanId(Object bean, Object id);
|
||||||
|
|
||||||
/**
|
|
||||||
* Deprecated migrate to beanId().
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
default Object setBeanId(Object bean, Object id) {
|
|
||||||
return beanId(bean, id);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a map of the differences between two objects of the same type.
|
* Return a map of the differences between two objects of the same type.
|
||||||
* <p>
|
* <p>
|
||||||
@@ -588,14 +500,6 @@ public interface Database {
|
|||||||
*/
|
*/
|
||||||
SqlQuery sqlQuery(String sql);
|
SqlQuery sqlQuery(String sql);
|
||||||
|
|
||||||
/**
|
|
||||||
* Deprecated - migrate to sqlQuery().
|
|
||||||
* <p>
|
|
||||||
* This is an alias for {@link #sqlQuery(String)}.
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
SqlQuery createSqlQuery(String sql);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Look to execute a native sql insert update or delete statement.
|
* Look to execute a native sql insert update or delete statement.
|
||||||
* <p>
|
* <p>
|
||||||
@@ -611,14 +515,6 @@ public interface Database {
|
|||||||
*/
|
*/
|
||||||
SqlUpdate sqlUpdate(String sql);
|
SqlUpdate sqlUpdate(String sql);
|
||||||
|
|
||||||
/**
|
|
||||||
* Deprecated - migrate to sqlUpdate().
|
|
||||||
* <p>
|
|
||||||
* This is an alias for {@link #sqlUpdate(String)}.
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
SqlUpdate createSqlUpdate(String sql);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a CallableSql to execute a given stored procedure.
|
* Create a CallableSql to execute a given stored procedure.
|
||||||
*/
|
*/
|
||||||
@@ -952,14 +848,6 @@ public interface Database {
|
|||||||
*/
|
*/
|
||||||
<T> T reference(Class<T> beanType, Object id);
|
<T> T reference(Class<T> beanType, Object id);
|
||||||
|
|
||||||
/**
|
|
||||||
* Deprecated migrate to reference().
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
default <T> T getReference(Class<T> beanType, Object id) {
|
|
||||||
return reference(beanType, id);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the extended API for Database.
|
* Return the extended API for Database.
|
||||||
* <p>
|
* <p>
|
||||||
@@ -1528,28 +1416,12 @@ public interface Database {
|
|||||||
*/
|
*/
|
||||||
ServerCacheManager cacheManager();
|
ServerCacheManager cacheManager();
|
||||||
|
|
||||||
/**
|
|
||||||
* Deprecated migrate to cacheManager().
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
default ServerCacheManager getServerCacheManager() {
|
|
||||||
return cacheManager();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the BackgroundExecutor service for asynchronous processing of
|
* Return the BackgroundExecutor service for asynchronous processing of
|
||||||
* queries.
|
* queries.
|
||||||
*/
|
*/
|
||||||
BackgroundExecutor backgroundExecutor();
|
BackgroundExecutor backgroundExecutor();
|
||||||
|
|
||||||
/**
|
|
||||||
* Deprecated migrate to backgroundExecutor().
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
default BackgroundExecutor getBackgroundExecutor() {
|
|
||||||
return backgroundExecutor();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the JsonContext for reading/writing JSON.
|
* Return the JsonContext for reading/writing JSON.
|
||||||
* <p>
|
* <p>
|
||||||
|
|||||||
Reference in new issue
Block a user