public String toString() { return "=> " + getOutputField().getNameDelimited(dbplatform); } }
/** * INTERNAL: * Return 1-based index of out cursor parameter, or -1. */ public int getCursorOutIndex() { int size = getParameters().size(); for (int i = 0; i < size; i++) { Object parameter = this.parameters.get(i); if (parameter instanceof OutputParameterForCallableStatement) { if (((OutputParameterForCallableStatement)parameter).isCursor()) { return i + 1; } } } return -1; }
public OutputParameterForCallableStatement(DatabaseField field, AbstractSession session, boolean isCursor) { this(field); this.isCursor = isCursor; prepare(session); }
public void prepare(AbstractSession session) { dbplatform = session.getPlatform(); if (isCursor()) { jdbcType = dbplatform.getCursorCode();// Oracle code for cursors } else { jdbcType = dbplatform.getJDBCType(getOutputField()); if (obj instanceof ObjectRelationalDatabaseField) { isTypeNameRequired = true; typeName = ((ObjectRelationalDatabaseField)obj).getSqlTypeName(); } else { isTypeNameRequired = dbplatform.requiresTypeNameToRegisterOutputParameter(); if (isTypeNameRequired) { typeName = dbplatform.getJdbcTypeName(jdbcType); } } } }
public String toString() { String strIn; if (inParameter instanceof DatabaseField) { strIn = "null"; } else { strIn = inParameter.toString(); } return strIn + " " + super.toString(); } }
public void set(DatabasePlatform platform, PreparedStatement statement, int index, AbstractSession session) throws SQLException { platform.setParameterValueInDatabaseCall(inParameter, statement, index, session); super.set(platform, statement, index, session); }
OutputParameterForCallableStatement outParameter = new OutputParameterForCallableStatement(outField, session); ((Object[])parameter)[1] = outParameter; OutputParameterForCallableStatement outParameter = new OutputParameterForCallableStatement(outField, session, isCursor); getParameters().setElementAt(outParameter, i);
public void prepare(AbstractSession session) { dbplatform = session.getPlatform(); if (isCursor()) { jdbcType = dbplatform.getCursorCode();// Oracle code for cursors } else { jdbcType = dbplatform.getJDBCType(getOutputField()); if (obj instanceof ObjectRelationalDatabaseField) { isTypeNameRequired = true; typeName = ((ObjectRelationalDatabaseField)obj).getSqlTypeName(); } else { isTypeNameRequired = dbplatform.requiresTypeNameToRegisterOutputParameter(); if (isTypeNameRequired) { typeName = dbplatform.getJdbcTypeName(jdbcType); } } } }
public String toString() { String strIn; if (inParameter instanceof DatabaseField) { strIn = "null"; } else { strIn = inParameter.toString(); } return strIn + " " + super.toString(); } }
public void set(DatabasePlatform platform, PreparedStatement statement, int index, AbstractSession session) throws SQLException { platform.setParameterValueInDatabaseCall(inParameter, statement, index, session); super.set(platform, statement, index, session); }
OutputParameterForCallableStatement outParameter = new OutputParameterForCallableStatement(outField, session); ((Object[])parameter)[1] = outParameter; OutputParameterForCallableStatement outParameter = new OutputParameterForCallableStatement(outField, session, isCursor); this.parameters.set(i, outParameter);
public void prepare(AbstractSession session) { dbplatform = session.getPlatform(); if (isCursor()) { jdbcType = dbplatform.getCursorCode();// Oracle code for cursors } else { jdbcType = dbplatform.getJDBCType(getOutputField()); if (obj instanceof ObjectRelationalDatabaseField) { isTypeNameRequired = true; typeName = ((ObjectRelationalDatabaseField)obj).getSqlTypeName(); } else { isTypeNameRequired = dbplatform.requiresTypeNameToRegisterOutputParameter(); if (isTypeNameRequired) { typeName = dbplatform.getJdbcTypeName(jdbcType); } } } }
public String toString() { return "=> " + getOutputField().getNameDelimited(dbplatform); } }
public OutputParameterForCallableStatement(DatabaseField field, AbstractSession session, boolean isCursor) { this(field); this.isCursor = isCursor; prepare(session); }
public String toString() { String strIn; if (inParameter instanceof DatabaseField) { strIn = "null"; } else { strIn = inParameter.toString(); } return strIn + " " + super.toString(); } }
public void set(DatabasePlatform platform, PreparedStatement statement, int index, AbstractSession session) throws SQLException { platform.setParameterValueInDatabaseCall(inParameter, statement, index, session); super.set(platform, statement, index, session); }
/** * INTERNAL: * Return 1-based index of out cursor parameter, or -1. */ public int getCursorOutIndex() { int size = getParameters().size(); for (int i = 0; i < size; i++) { Object parameter = this.parameters.get(i); if (parameter instanceof OutputParameterForCallableStatement) { if (((OutputParameterForCallableStatement)parameter).isCursor()) { return i + 1; } } } return -1; }
OutputParameterForCallableStatement outParameter = new OutputParameterForCallableStatement(outField, session); ((Object[])parameter)[1] = outParameter; OutputParameterForCallableStatement outParameter = new OutputParameterForCallableStatement(outField, session, isCursor); this.parameters.set(i, outParameter);
if (parameter instanceof OutputParameterForCallableStatement) { OutputParameterForCallableStatement outParameter = (OutputParameterForCallableStatement)parameter; if (!outParameter.isCursor()) { Object value = statement.getObject(index + 1); DatabaseField field = outParameter.getOutputField(); if (value instanceof Struct){ ClassDescriptor descriptor = this.getQuery().getSession().getDescriptor(field.getType());
public String toString() { return "=> " + getOutputField().getNameDelimited(dbplatform); } }