/** * Write trace information in the form objectName.text. * * @param text the trace text */ protected void debugCode(String text) { if (trace.isDebugEnabled()) { trace.debugCode(getTraceObjectName() + "." + text); } }
/** * Get a SQL exception meaning this feature is not supported. * * @param message the message * @return the SQL exception */ protected SQLException unsupported(String message) { try { throw DbException.getUnsupportedException(message); } catch (Exception e) { return logAndConvert(e); } }
@Override public int readLob(long lobId, byte[] hmac, long offset, byte[] buff, int off, int length) { throw DbException.throwInternalError(); }
/** * [Not supported] Checks if unwrap can return an object of this class. * * @param iface the class */ @Override public boolean isWrapperFor(Class<?> iface) throws SQLException { throw DbException.getUnsupportedException("isWrapperFor"); }
/** * Check if the trace level is equal or higher than INFO. * * @return true if it is */ public boolean isInfoEnabled() { return isEnabled(TraceSystem.INFO); }
public Rownum(Prepared prepared) { if (prepared == null) { throw DbException.throwInternalError(); } this.prepared = prepared; }
/** * Write trace information as a method call in the form * objectName.methodName(). * * @param methodName the method name */ protected void debugCodeCall(String methodName) { if (trace.isDebugEnabled()) { trace.debugCode(getTraceObjectName() + "." + methodName + "();"); } }
private static JdbcSavepoint convertSavepoint(Savepoint savepoint) { if (!(savepoint instanceof JdbcSavepoint)) { throw DbException.get(ErrorCode.SAVEPOINT_IS_INVALID_1, "" + savepoint); } return (JdbcSavepoint) savepoint; }
/** * Check if the trace level is equal or higher than DEBUG. * * @return true if it is */ public boolean isDebugEnabled() { return isEnabled(TraceSystem.DEBUG); }
private void removeFromLinkedList(CacheObject rec) { if (SysProperties.CHECK && rec == head) { DbException.throwInternalError("try to remove head"); } rec.cachePrevious.cacheNext = rec.cacheNext; rec.cacheNext.cachePrevious = rec.cachePrevious; // TODO cache: mystery: why is this required? needs more memory if we // don't do this rec.cacheNext = null; rec.cachePrevious = null; }
/** * Gets a SQL exception meaning this feature is not supported. * * @param message what exactly is not supported * @return the exception */ public static DbException getUnsupportedException(String message) { return get(ErrorCode.FEATURE_NOT_SUPPORTED_1, message); }
public ConditionAndOr(int andOrType, Expression left, Expression right) { this.andOrType = andOrType; this.left = left; this.right = right; if (SysProperties.CHECK && (left == null || right == null)) { DbException.throwInternalError(left + " " + right); } }