FileDocCategorySizeDatePackage
OutputParameterForCallableStatement.javaAPI DocGlassfish v2 API4737Tue May 22 16:54:22 BST 2007oracle.toplink.essentials.internal.databaseaccess

OutputParameterForCallableStatement

public class OutputParameterForCallableStatement extends BindCallCustomParameter

Fields Summary
protected boolean
isCursor
protected int
jdbcType
protected String
typeName
protected boolean
isTypeNameRequired
Constructors Summary
public OutputParameterForCallableStatement(DatabaseField field)

        super(field);
    
public OutputParameterForCallableStatement(DatabaseField field, DatabasePlatform platform)

        this(field, platform, false);
    
public OutputParameterForCallableStatement(DatabaseField field, DatabasePlatform platform, boolean isCursor)

        this(field);
        this.isCursor = isCursor;
        prepare(platform);
    
public OutputParameterForCallableStatement(OutputParameterForCallableStatement outParameter)

        super(outParameter.obj);
        this.isCursor = outParameter.isCursor;
        this.jdbcType = outParameter.jdbcType;
        this.typeName = outParameter.typeName;
        this.isTypeNameRequired = outParameter.isTypeNameRequired;
    
protected OutputParameterForCallableStatement()

    
Methods Summary
public intgetJdbcType()

        return jdbcType;
    
public oracle.toplink.essentials.internal.helper.DatabaseFieldgetOutputField()

        return (DatabaseField)obj;
    
public java.lang.StringgetTypeName()

        return typeName;
    
public booleanisCursor()

        return isCursor;
    
public booleanisTypeNameRequired()

        return isTypeNameRequired;
    
public voidprepare(oracle.toplink.essentials.internal.databaseaccess.DatabasePlatform platform)

        if (isCursor()) {
            jdbcType = platform.getCursorCode();// Oracle code for cursors
        } else {
            jdbcType = platform.getJDBCType(getOutputField());
            isTypeNameRequired = platform.requiresTypeNameToRegisterOutputParameter();
            if (isTypeNameRequired) {
                typeName = platform.getJdbcTypeName(jdbcType);
            }
        }
    
public voidset(oracle.toplink.essentials.internal.databaseaccess.DatabasePlatform platform, java.sql.PreparedStatement statement, int index, oracle.toplink.essentials.internal.sessions.AbstractSession session)

        if (isTypeNameRequired) {
            ((CallableStatement)statement).registerOutParameter(index, jdbcType, typeName);
        } else {
            ((CallableStatement)statement).registerOutParameter(index, jdbcType);
        }
    
public voidsetIsCursor(boolean isCursor)

        this.isCursor = isCursor;
    
public java.lang.StringtoString()

        return "=> " + getOutputField().getName();