#2344 - Rename Database.getDataSource() to dataSource() with deprecation

This commit is contained in:
Rob Bygrave
2021-09-02 22:48:09 +12:00
parent 239a444d4c
commit 12c5e9ea5d
12 changed files with 33 additions and 18 deletions
+18 -2
View File
@@ -133,12 +133,28 @@ public interface Database {
/**
* Return the associated DataSource for this Database instance.
*/
DataSource getDataSource();
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).
*/
DataSource getReadOnlyDataSource();
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