if (x instanceof String) setString(parameterIndex, (String)x); else if (x instanceof BigDecimal) setBigDecimal(parameterIndex, (BigDecimal)x); else if (x instanceof Short) setShort(parameterIndex, ((Short)x).shortValue()); else if (x instanceof Integer) setInt(parameterIndex, ((Integer)x).intValue()); else if (x instanceof Long) setLong(parameterIndex, ((Long)x).longValue()); else if (x instanceof Float) setFloat(parameterIndex, ((Float)x).floatValue()); else if (x instanceof Double) setDouble(parameterIndex, ((Double)x).doubleValue()); else if (x instanceof byte[]) setBytes(parameterIndex, (byte[])x); else if (x instanceof java.sql.Date) setDate(parameterIndex, (java.sql.Date)x); else if (x instanceof Time) setTime(parameterIndex, (Time)x); else if (x instanceof Timestamp) setTimestamp(parameterIndex, (Timestamp)x); else if (x instanceof Boolean) setBoolean(parameterIndex, ((Boolean)x).booleanValue()); else if (x instanceof PGobject) setString(parameterIndex, ((PGobject)x).getValue()); else setLong(parameterIndex, connection.putObject(x));
switch (targetSqlType) { case Types.TINYINT: case Types.SMALLINT: case Types.INTEGER: case Types.BIGINT: case Types.REAL: case Types.FLOAT: case Types.DOUBLE: case Types.DECIMAL: case Types.NUMERIC: if (x instanceof Boolean) set(parameterIndex, ((Boolean)x).booleanValue() ? "1" : "0"); else set(parameterIndex, x.toString()); break; case Types.CHAR: case Types.VARCHAR: case Types.LONGVARCHAR: setString(parameterIndex, x.toString()); break; case Types.DATE: setDate(parameterIndex, (java.sql.Date)x); break; case Types.TIME: setTime(parameterIndex, (Time)x); break; case Types.TIMESTAMP: setTimestamp(parameterIndex, (Timestamp)x); break; case Types.OTHER: setString(parameterIndex, ((PGobject)x).getValue()); break; default: throw new PSQLException("postgresql.prep.type"); }
	public void setObject(int parameterIndex, Object x) throws SQLException	{		if (x instanceof String)			setString(parameterIndex, (String)x);		else if (x instanceof BigDecimal)			setBigDecimal(parameterIndex, (BigDecimal)x);		else if (x instanceof Short)			setShort(parameterIndex, ((Short)x).shortValue());		else if (x instanceof Integer)			setInt(parameterIndex, ((Integer)x).intValue());		else if (x instanceof Long)			setLong(parameterIndex, ((Long)x).longValue());		else if (x instanceof Float)			setFloat(parameterIndex, ((Float)x).floatValue());		else if (x instanceof Double)			setDouble(parameterIndex, ((Double)x).doubleValue());		else if (x instanceof byte[])			setBytes(parameterIndex, (byte[])x);		else if (x instanceof java.sql.Date)			setDate(parameterIndex, (java.sql.Date)x);		else if (x instanceof Time)			setTime(parameterIndex, (Time)x);		else if (x instanceof Timestamp)			setTimestamp(parameterIndex, (Timestamp)x);		else if (x instanceof Boolean)			setBoolean(parameterIndex, ((Boolean)x).booleanValue());		else if (x instanceof PGobject)			setString(parameterIndex, ((PGobject)x).getValue());		else			setLong(parameterIndex, connection.putObject(x));	}