IDEMPIERE-5376 CConnection and DB clean up (#1457)

* IDEMPIERE-5376 CConnection and DB clean up

* IDEMPIERE-5376 CConnection and DB clean up

- More clean up

* IDEMPIERE-5376 CConnection and DB clean up

- Fix @Deprecated annotation
This commit is contained in:
hengsin 2022-08-30 03:36:50 +08:00 committed by GitHub
parent 527ccfcf35
commit c45005be41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 10 deletions

View File

@ -333,7 +333,6 @@ public final class DB
} }
/** /**
* @Deprecated (since="10", forRemoval=true)
* Replace by {@link #isConnected()} * Replace by {@link #isConnected()}
* *
* Is there a connection to the database ? * Is there a connection to the database ?
@ -341,6 +340,7 @@ public final class DB
* @return true, if connected to database * @return true, if connected to database
* @deprecated * @deprecated
*/ */
@Deprecated (since="10", forRemoval=true)
public static boolean isConnected(boolean createNew) public static boolean isConnected(boolean createNew)
{ {
return isConnected(); return isConnected();
@ -368,19 +368,18 @@ public final class DB
} }
/** /**
* @Deprecated (since="10", forRemoval=true)
* Replace by @{@link #getConnection()} * Replace by @{@link #getConnection()}
* *
* @return Connection (r/w) * @return Connection (r/w)
* @deprecated * @deprecated
*/ */
@Deprecated (since="10", forRemoval=true)
public static Connection getConnectionRW() public static Connection getConnectionRW()
{ {
return getConnection(); return getConnection();
} }
/** /**
* @Deprecated (since="10", forRemoval=true)
* Replace by @{@link #getConnection()} * Replace by @{@link #getConnection()}
* *
* Return (pooled) r/w AutoCommit, Serializable connection. * Return (pooled) r/w AutoCommit, Serializable connection.
@ -389,13 +388,13 @@ public final class DB
* @return Connection (r/w) * @return Connection (r/w)
* @deprecated * @deprecated
*/ */
@Deprecated (since="10", forRemoval=true)
public static Connection getConnectionRW (boolean createNew) public static Connection getConnectionRW (boolean createNew)
{ {
return getConnection(); return getConnection();
} // getConnectionRW } // getConnectionRW
/** /**
* @Deprecated (since="10", forRemoval=true)
* Replace by @{@link #getConnection(boolean)}. * Replace by @{@link #getConnection(boolean)}.
* Note that this is intended for internal use only from the beginning. * Note that this is intended for internal use only from the beginning.
* *
@ -404,19 +403,20 @@ public final class DB
* @return Connection (r/w) * @return Connection (r/w)
* @deprecated * @deprecated
*/ */
@Deprecated (since="10", forRemoval=true)
public static Connection getConnectionID () public static Connection getConnectionID ()
{ {
return getConnection(false); return getConnection(false);
} // getConnectionID } // getConnectionID
/** /**
* @Deprecated (since="10", forRemoval=true)
* Replace by @{@link #getConnection()}. Use {@link Trx} instead for readonly transaction. * Replace by @{@link #getConnection()}. Use {@link Trx} instead for readonly transaction.
* *
* Return read committed, read/only from pool. * Return read committed, read/only from pool.
* @return Connection (r/o) * @return Connection (r/o)
* @deprecated * @deprecated
*/ */
@Deprecated (since="10", forRemoval=true)
public static Connection getConnectionRO () public static Connection getConnectionRO ()
{ {
return getConnection(); return getConnection();
@ -463,7 +463,6 @@ public final class DB
} // createConnection } // createConnection
/** /**
* @Deprecated (since="10", forRemoval=true)
* Replace by {@link #createConnection(boolean, int)}. * Replace by {@link #createConnection(boolean, int)}.
* Use {@link Trx} instead for readonly transaction. * Use {@link Trx} instead for readonly transaction.
* *
@ -476,6 +475,7 @@ public final class DB
* @return Connection connection * @return Connection connection
* @deprecated * @deprecated
*/ */
@Deprecated (since="10", forRemoval=true)
public static Connection createConnection (boolean autoCommit, boolean readOnly, int trxLevel) public static Connection createConnection (boolean autoCommit, boolean readOnly, int trxLevel)
{ {
return createConnection(autoCommit, trxLevel); return createConnection(autoCommit, trxLevel);
@ -544,13 +544,12 @@ public final class DB
/************************************************************************** /**************************************************************************
* @Deprecated (since="10", forRemoval=true)
*
* Check database Version with Code version * Check database Version with Code version
* @param ctx context * @param ctx context
* @return true if Database version (date) is the same * @return true if Database version (date) is the same
* @deprecated * @deprecated
*/ */
@Deprecated (since="10", forRemoval=true)
public static boolean isDatabaseOK (Properties ctx) public static boolean isDatabaseOK (Properties ctx)
{ {
// Check Version // Check Version
@ -1957,26 +1956,26 @@ public final class DB
} // getDocumentNo } // getDocumentNo
/** /**
* @Deprecated (forRemoval=true)
* Is this a remote client connection. * Is this a remote client connection.
* *
* Deprecated, always return false. * Deprecated, always return false.
* @return true if client and RMI or Objects on Server * @return true if client and RMI or Objects on Server
* @deprecated * @deprecated
*/ */
@Deprecated (forRemoval=true)
public static boolean isRemoteObjects() public static boolean isRemoteObjects()
{ {
return false; return false;
} // isRemoteObjects } // isRemoteObjects
/** /**
* @Deprecated (forRemoval=true)
* Is this a remote client connection * Is this a remote client connection
* *
* Deprecated, always return false. * Deprecated, always return false.
* @return true if client and RMI or Process on Server * @return true if client and RMI or Process on Server
* @deprecated * @deprecated
*/ */
@Deprecated (forRemoval=true)
public static boolean isRemoteProcess() public static boolean isRemoteProcess()
{ {
return false; return false;