@Override public void readSQL(SQLInput stream, String typeName) throws SQLException { sqlType = typeName; types[stringPos] = stream.readString(); types[datePos] = stream.readDate(); types[timePos] = stream.readTime(); types[timestampPos] = stream.readTimestamp(); types[intPos] = stream.readInt(); types[longPos] = stream.readLong(); types[shortPos] = stream.readShort(); types[bigDecimalPos] = stream.readBigDecimal(); types[doublePos] = stream.readDouble(); types[booleanPos] = stream.readBoolean(); types[floatPos] = stream.readFloat(); types[bytePos] = stream.readByte(); types[bytesPos] = stream.readBytes(); }
@Override public void readSQL(SQLInput stream, String typeName) throws SQLException { first = stream.readString(); last = stream.readString(); firstYear = stream.readInt(); secretIdentity = stream.readString(); }
@Override public void readSQL(SQLInput stream, String typeName) throws SQLException { this.typeName= typeName; this.tableName=stream.readString(); this.columnName= stream.readString(); this.columnValue=stream.readObject(); }
public void readSQL( SQLInput stream, String typname) throws SQLException { this.typname = typname; int i = 0; for ( ;; ++i ) try { stream.readByte(); } catch ( SQLException sqle ) { if ( "22P03".equals( sqle.getSQLState()) ) break; throw sqle; } apop = i; }
@Override public void readSQL(SQLInput stream, String typeName) throws SQLException { m_typeName = typeName; m_x = stream.readDouble(); m_y = stream.readDouble(); s_logger.info(typeName + " from SQLInput"); }
@Function(effects=IMMUTABLE, onNullInput=RETURNS_NULL) @Override public void readSQL(SQLInput stream, String typeName) throws SQLException { s_logger.info(typeName + " from SQLInput"); m_x = stream.readDouble(); m_y = stream.readDouble(); m_typeName = typeName; }
@Override public void readSQL(SQLInput stream, String typeName) throws SQLException { s_logger.info(typeName + " from SQLInput"); m_x = stream.readDouble(); m_y = stream.readDouble(); m_typeName = typeName; }
/** * This is the position offset for different child types. The types are * broken into {@link SQLInputStep}s, {@link MungeResultStep}s, and the rest * of the munge steps. */ public int mungeProcessChildPositionOffset(Class<? extends SPObject> childType) { if (MungeResultStep.class.isAssignableFrom(childType)) { return 0; } if (SQLInput.class.isAssignableFrom(childType)) return (resultStep == null? 0 : 1); if (MungeStep.class.isAssignableFrom(childType)) { return getInputSteps().size() + (resultStep == null? 0 : 1); } throw new IllegalArgumentException(childType.getName() + " is not a valid child type of " + getClass().getName()); }
/** * Test method for {@link java.sql.SQLData#readSQL(java.sql.SQLInput, java.lang.String)}. */ @TestTargetNew( level = TestLevel.NOT_FEASIBLE, notes = "", method = "readSQL", args = {SQLInput.class, String.class} ) public void testReadSQL() { fail("Not yet implemented"); }
/** * Read object from SQLInput stream. */ public void readSQL(SQLInput stream, String typeName) throws SQLException { long n = stream.readLong(); long d = stream.readLong(); this.value = new Rational(n, d); this.typeName = typeName; }
/** * Read object from SQLInput stream. */ public void readSQL(SQLInput stream, String typeName) throws SQLException { double re = stream.readDouble(); double im = stream.readDouble(); this.value = new Complex(re, im); this.typeName = typeName; }
public void readSQL(SQLInput stream, String typeName) throws SQLException { firstAttribute = stream.readString(); secondAttribute = stream.readBoolean(); thirdAttribute = stream.readString(); fourthAttribute = stream.readInt(); }
public void readSQL( SQLInput in, String typeName ) throws SQLException { _data = in.readBytes(); }
@Function(effects=IMMUTABLE, onNullInput=RETURNS_NULL) @Override public void readSQL(SQLInput stream, String typeName) throws SQLException { m_typeName = typeName; if ( ! s_bigdec.equals(stream.readBigDecimal()) ) throw new SQLException("BigDecimal mismatch"); ByteArrayOutputStream baos = new ByteArrayOutputStream(); InputStream is = stream.readBinaryStream(); try { for ( int b ; -1 != (b = is.read()) ; ) baos.write(b); } catch ( IOException e ) { throw new SQLException("Reading binary stream", "58030", e); } if ( ! Arrays.equals(s_utfgedicht, baos.toByteArray()) ) throw new SQLException("binaryStream mismatch"); if ( s_bool != stream.readBoolean() ) throw new SQLException("boolean mismatch"); if ( s_byte != stream.readByte() ) throw new SQLException("byte mismatch"); if ( ! Arrays.equals(s_utfgedicht, stream.readBytes()) ) throw new SQLException("bytes mismatch"); String charstream = new Scanner(stream.readCharacterStream()) .useDelimiter("\\A").next(); if ( ! s_gedicht.equals(charstream) ) throw new SQLException("characterStream mismatch"); if ( ! s_date.equals(stream.readDate()) ) throw new SQLException("date mismatch"); if ( s_double != stream.readDouble() ) throw new SQLException("double mismatch"); if ( s_float != stream.readFloat() ) throw new SQLException("float mismatch"); if ( s_int != stream.readInt() ) throw new SQLException("int mismatch"); if ( s_long != stream.readLong() ) throw new SQLException("long mismatch"); if ( s_short != stream.readShort() ) throw new SQLException("short mismatch"); if ( ! s_gedicht.equals(stream.readString()) ) throw new SQLException("string mismatch"); if ( ! s_time.equals(stream.readTime()) ) throw new SQLException("time mismatch"); if ( ! s_timestamp.equals(stream.readTimestamp()) ) throw new SQLException("timestamp mismatch"); if ( ! s_url.equals(stream.readURL()) ) throw new SQLException("url mismatch"); }
@Function(effects=IMMUTABLE, onNullInput=RETURNS_NULL) @Override public void readSQL(SQLInput stream, String typeName) throws SQLException { m_value = stream.readInt(); m_typeName = typeName; }
DDRProcessorImpl( ProcessingEnvironment processingEnv) { elmu = processingEnv.getElementUtils(); filr = processingEnv.getFiler(); loca = processingEnv.getLocale(); msgr = processingEnv.getMessager(); opts = processingEnv.getOptions(); srcv = processingEnv.getSourceVersion(); typu = processingEnv.getTypeUtils(); tmpr = new TypeMapper(); String optv; optv = opts.get( "ddr.name.trusted"); if ( null != optv ) nameTrusted = optv; else nameTrusted = "java"; optv = opts.get( "ddr.name.untrusted"); if ( null != optv ) nameUntrusted = optv; else nameUntrusted = "javaU"; optv = opts.get( "ddr.implementor"); if ( null != optv ) defaultImplementor = "-".equals( optv) ? null : optv; else defaultImplementor = "PostgreSQL"; optv = opts.get( "ddr.output"); if ( null != optv ) output = optv; else output = "pljava.ddr"; TY_ITERATOR = typu.getDeclaredType( elmu.getTypeElement( java.util.Iterator.class.getName())); TY_OBJECT = typu.getDeclaredType( elmu.getTypeElement( Object.class.getName())); TY_RESULTSET = typu.getDeclaredType( elmu.getTypeElement( java.sql.ResultSet.class.getName())); TY_RESULTSETPROVIDER = typu.getDeclaredType( elmu.getTypeElement( ResultSetProvider.class.getName())); TY_RESULTSETHANDLE = typu.getDeclaredType( elmu.getTypeElement( ResultSetHandle.class.getName())); TY_SQLDATA = typu.getDeclaredType( elmu.getTypeElement( SQLData.class.getName())); TY_SQLINPUT = typu.getDeclaredType( elmu.getTypeElement( SQLInput.class.getName())); TY_SQLOUTPUT = typu.getDeclaredType( elmu.getTypeElement( SQLOutput.class.getName())); TY_STRING = typu.getDeclaredType( elmu.getTypeElement( String.class.getName())); TY_TRIGGERDATA = typu.getDeclaredType( elmu.getTypeElement( TriggerData.class.getName())); TY_VOID = typu.getNoType( TypeKind.VOID); AN_FUNCTION = elmu.getTypeElement( Function.class.getName()); AN_SQLACTION = elmu.getTypeElement( SQLAction.class.getName()); AN_SQLACTIONS = elmu.getTypeElement( SQLActions.class.getName()); AN_SQLTYPE = elmu.getTypeElement( SQLType.class.getName()); AN_TRIGGER = elmu.getTypeElement( Trigger.class.getName()); AN_BASEUDT = elmu.getTypeElement( BaseUDT.class.getName()); AN_MAPPEDUDT = elmu.getTypeElement( MappedUDT.class.getName()); }
public static final <T> T wasNull(SQLInput stream, T value) throws SQLException { return stream.wasNull() ? null : value; }
public void readSQL(SQLInput stream, String type) throws SQLException { sql_type = type; first = stream.readString(); last = stream.readString(); }
public void readSQL(SQLInput stream, String type) throws SQLException { sql_type = type; id = stream.readInt(); name = (Name) stream.readObject(); }
public void readSQL(SQLInput stream, String typeName) throws SQLException { return; }
public void readSQL(SQLInput stream, String typeName) throws SQLException { sql_type = typeName; key = stream.readBigDecimal(); }