/** * If my underlying {@link Connection} is not a * <tt>DelegatingConnection</tt>, returns it, * otherwise recursively invokes this method on * my delegate. * <p> * Hence this method will return the first * delegate that is not a <tt>DelegatingConnection</tt>, * or <tt>null</tt> when no non-<tt>DelegatingConnection</tt> * delegate can be found by traversing this chain. * <p> * This method is useful when you may have nested * <tt>DelegatingConnection</tt>s, and you want to make * sure to obtain a "genuine" {@link Connection}. */ public Connection getInnermostDelegate() { return getInnermostDelegateInternal(); }
/** * If my underlying {@link Connection} is not a * <tt>DelegatingConnection</tt>, returns it, * otherwise recursively invokes this method on * my delegate. * <p> * Hence this method will return the first * delegate that is not a <tt>DelegatingConnection</tt>, * or <tt>null</tt> when no non-<tt>DelegatingConnection</tt> * delegate can be found by traversing this chain. * <p> * This method is useful when you may have nested * <tt>DelegatingConnection</tt>s, and you want to make * sure to obtain a "genuine" {@link Connection}. */ public Connection getInnermostDelegate() { return getInnermostDelegateInternal(); }
public int hashCode() { Object obj = getInnermostDelegateInternal(); if (obj == null) { return 0; } return obj.hashCode(); }
public int hashCode() { Object obj = getInnermostDelegateInternal(); if (obj == null) { return 0; } return obj.hashCode(); }
/** * Compares innermost delegate to the given connection. * * @param c connection to compare innermost delegate with * @return true if innermost delegate equals <code>c</code> * @since 1.2.2 */ public boolean innermostDelegateEquals(Connection c) { Connection innerCon = getInnermostDelegateInternal(); if (innerCon == null) { return c == null; } else { return innerCon.equals(c); } }
/** * Compares innermost delegate to the given connection. * * @param c connection to compare innermost delegate with * @return true if innermost delegate equals <code>c</code> * @since 1.2.2 */ public boolean innermostDelegateEquals(Connection c) { Connection innerCon = getInnermostDelegateInternal(); if (innerCon == null) { return c == null; } else { return innerCon.equals(c); } }
public Connection getInnermostDelegate() { if (isAccessToUnderlyingConnectionAllowed()) { return super.getInnermostDelegateInternal(); } else { return null; } } }
/** * Get the innermost connection, if allowed. * @return the innermost internal connection, or null if access is not allowed. * @see #isAccessToUnderlyingConnectionAllowed() */ public Connection getInnermostDelegate() { if (isAccessToUnderlyingConnectionAllowed()) { return super.getInnermostDelegateInternal(); } else { return null; } }
public Connection getInnermostDelegate() { if (isAccessToUnderlyingConnectionAllowed()) { return super.getInnermostDelegateInternal(); } else { return null; } } }
/** * Get the innermost connection, if allowed. * @return the innermost internal connection, or null if access is not allowed. * @see #isAccessToUnderlyingConnectionAllowed() */ public Connection getInnermostDelegate() { if (isAccessToUnderlyingConnectionAllowed()) { return super.getInnermostDelegateInternal(); } else { return null; } }
/** * This method considers two objects to be equal * if the underlying jdbc objects are equal. */ public boolean equals(Object obj) { if (obj == null) { return false; } if (obj == this) { return true; } Connection delegate = getInnermostDelegateInternal(); if (delegate == null) { return false; } if (obj instanceof DelegatingConnection) { DelegatingConnection c = (DelegatingConnection) obj; return c.innermostDelegateEquals(delegate); } else { return delegate.equals(obj); } }
/** * This method considers two objects to be equal * if the underlying jdbc objects are equal. */ public boolean equals(Object obj) { if (obj == null) { return false; } if (obj == this) { return true; } Connection delegate = getInnermostDelegateInternal(); if (delegate == null) { return false; } if (obj instanceof DelegatingConnection) { DelegatingConnection c = (DelegatingConnection) obj; return c.innermostDelegateEquals(delegate); } else { return delegate.equals(obj); } }
String s = null; Connection c = this.getInnermostDelegateInternal(); if (c != null) { try {
String s = null; Connection c = this.getInnermostDelegateInternal(); if (c != null) { try {