Java 8 SQLInput - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 SQLInput class.

This code example shows how to use the following methods:readInt, readString
    public String getSQLTypeName()  {
        return m_typeName;
    } 
    @Override 
    public void readSQL(SQLInput stream, String typeName) throws SQLException {
        name = stream.readString();
        value = stream.readInt();
        m_typeName = typeName;
    } 
     
    @Override 
    public void writeSQL(SQLOutput stream) throws SQLException {
        stream.writeString(name);
        stream.writeInt(value);
    } 
} 
5
CodeRank
This code example shows how to use the following methods:readInt
 
    public void readSQL(SQLInput stream, String typeName) throws SQLException {
        checkType(typeName);
         
        // skip length marker 
        stream.readInt();
         
        // read the Geometry         
        this.geom = parser.parseGeometry(stream);
    } 
     
    /** Check whether our given type is actually the one we can handle */ 
    private static void checkType(String typeName) throws SQLException {
        if (!m_typeName.equalsIgnoreCase(typeName)) {
                throw new SQLException("parser for "+m_typeName+" cannot parse type "+typeName+"!");
        } 
    } 
 
 
    public void writeSQL(SQLOutput stream) throws SQLException {
5
CodeRank
This code example shows how to use the following methods:readInt, readString
 
 
 
 
    public void readSQL(SQLInput stream, String typeName) throws SQLException {
        this.setId_usuario(stream.readInt());
        this.setNome(stream.readString());
        this.setSobrenome(stream.readString());
        this.setGrupo(stream.readString());
    } 
 
 
    public void writeSQL(SQLOutput stream) throws SQLException {
        stream.writeInt(this.getId_usuario());
        stream.writeString(this.getNome());
        stream.writeString(this.getSobrenome());
        stream.writeString(this.getGrupo());
    } 
 
 
4
CodeRank
This code example shows how to use the following methods:readInt, readLong, readString
    public String getSQLTypeName() throws SQLException {
        return "ACTOR_TYPE"; 
    } 
 
    public void readSQL(SQLInput sqlInput, String string) throws SQLException {
        setId(Long.valueOf(sqlInput.readLong()));
        setName(sqlInput.readString());
        setAge(sqlInput.readInt());
    } 
 
    public void writeSQL(SQLOutput sqlOutput) throws SQLException {
        sqlOutput.writeLong(getId().longValue());
        sqlOutput.writeString(getName());
        sqlOutput.writeInt(getAge());
    } 
 
} 
4
CodeRank
This code example shows how to use the following methods:readString
		return "COUNTRY_T"; 
	} 
 
	@Override 
	public void readSQL(SQLInput stream, String typeName) throws SQLException {
		code = stream.readString();
		country = stream.readString();
	} 
 
	@Override 
	public void writeSQL(SQLOutput stream) throws SQLException {
		stream.writeString(code);
		stream.writeString(country);
	} 
} 
4
CodeRank
This code example shows how to use the following methods:readString
		return "LANGUAGE_T"; 
	} 
 
	@Override 
	public void readSQL(SQLInput stream, String arg1) throws SQLException {
		code = stream.readString();
		language = stream.readString();
	} 
 
	@Override 
	public void writeSQL(SQLOutput stream) throws SQLException {
		stream.writeString(code);
		stream.writeString(language);
	} 
} 
4
CodeRank
This code example shows how to use the following methods:readDouble
	} 
 
	@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 String toString() {
		s_logger.info(m_typeName + " toString");
		StringBuffer sb = new StringBuffer();
		sb.append('(');
		sb.append(m_x);
		sb.append(',');
		sb.append(m_y);
		sb.append(')');
		return sb.toString();
4
CodeRank
This code example shows how to use the following methods:readBytes
        out.writeBytes( _data );
    } 
 
    public void readSQL( SQLInput in, String typeName ) throws SQLException_data = in.readBytes();
    } 
 
    /////////////////////////////////////////////////////////////////////////////////// 
    // 
    // OTHER Object OVERRIDES 
    // 
    /////////////////////////////////////////////////////////////////////////////////// 
 
    public String toString()
    { 
        return "SampleSQLData( " + _data.length + " )";
    } 
} 
4
CodeRank
This code example shows how to use the following methods:readString
		return "COUNTRY_T"; 
	} 
 
	@Override 
	public void readSQL(SQLInput stream, String typeName) throws SQLException {
		code = stream.readString();
		country = stream.readString();
	} 
 
	@Override 
	public void writeSQL(SQLOutput stream) throws SQLException {
		stream.writeString(code);
		stream.writeString(country);
	} 
} 
4
CodeRank
This code example shows how to use the following methods:readDouble
	} 
 
	@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");
	} 
 
	@Override 
	public void writeSQL(SQLOutput stream) throws SQLException {
		stream.writeDouble(m_x);
		stream.writeDouble(m_y);
		s_logger.info(m_typeName + " to SQLOutput");
	} 
} 
4
CodeRank
See Code Examples for Java 8 SQLInput Methods: