Package org.apache.gora.sql.store.SqlTypeInterface

Examples of org.apache.gora.sql.store.SqlTypeInterface.JdbcType


      , Schema schema, Column column) throws SQLException, IOException {

    InputStream is = null;
    byte[] bytes = null;

    JdbcType type = JdbcType.get(resultSet.getMetaData().getColumnType(columnIndex));

    switch(type) {
      case BLOB          : Blob blob = resultSet.getBlob(columnIndex);
                           if (blob != null) is = blob.getBinaryStream(); break;
      case BINARY        :
View Full Code Here


  throws IOException, SQLException {

    OutputStream os = null;
    Blob blob = null;

    JdbcType type = column.getJdbcType();

    switch(type) {
      case BLOB          : blob = connection.createBlob();
                           os = blob.setBinaryStream(1); break;
      case BINARY        :
View Full Code Here

      ResultSet rs = metadata.getTypeInfo();
      dbTypeMap = new HashMap<String, JdbcType>();

      while(rs.next()) {
        JdbcType type = JdbcType.get(rs.getInt("DATA_TYPE"));
        dbTypeMap.put(rs.getString("TYPE_NAME"), type);
      }
      rs.close();

    } catch (SQLException ex) {
View Full Code Here

      String jdbcTypeStr = ele.getAttributeValue("jdbc-type");

      int length = StringUtils.parseInt(ele.getAttributeValue("length"), -1);
      int scale = StringUtils.parseInt(ele.getAttributeValue("scale"), -1);

      JdbcType jdbcType;
      if (jdbcTypeStr != null) {
        jdbcType = dbTypeMap.get(jdbcTypeStr);
        if(jdbcType == null)
          jdbcType = SqlTypeInterface.stringToJdbcType(jdbcTypeStr);
      } else if (fieldName == null) { // fieldName == null implies primary key
View Full Code Here

TOP

Related Classes of org.apache.gora.sql.store.SqlTypeInterface.JdbcType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.