Examples of ClobImpl


Examples of org.teiid.core.types.ClobImpl

  private Object serialize(XMLSerialize xs, XMLType value) throws TransformationException {
    if (xs.getType() == DataTypeManager.DefaultDataClasses.STRING) {
      return DataTypeManager.transformValue(value, xs.getType());
    }
    InputStreamFactory isf = getInputStreamFactory(value);
    return new ClobType(new ClobImpl(isf, -1));
  }
View Full Code Here

Examples of org.teiid.core.types.ClobImpl

    throw SqlUtil.createFeatureNotSupportedException();
  }

  public void setAsciiStream(int parameterIndex, final InputStream x)
      throws SQLException {
    this.setObject(parameterIndex, new ClobImpl(new InputStreamFactory() {
      @Override
      public InputStream getInputStream() throws IOException {
        return x;
      }
    }, -1));
View Full Code Here

Examples of org.teiid.core.types.ClobImpl

  public void setClob(int parameterIndex, final Reader reader) throws SQLException {
    if (reader == null) {
      this.setObject(parameterIndex, null);
      return;
    }
    this.setObject(parameterIndex, new ClobImpl(new InputStreamFactory() {
     
      @Override
      public InputStream getInputStream() throws IOException {
        return new ReaderInputStream(reader, Charset.forName(Streamable.ENCODING));
      }
View Full Code Here

Examples of org.teiid.core.types.ClobImpl

          if (reference != null) {
            currentValue = reference;
            return currentValue;
          }
            if(currentValue instanceof ClobType){
              currentValue = new ClobImpl(createInputStreamFactory((ClobType)currentValue), ((ClobType)currentValue).getLength());
            }
            else if (currentValue instanceof BlobType) {
              InputStreamFactory isf = createInputStreamFactory((BlobType)currentValue);
              isf.setLength(((BlobType)currentValue).getLength());
              currentValue = new BlobImpl(isf);
View Full Code Here

Examples of org.teiid.core.types.ClobImpl

      ProcessorPlan plan = helpGetPlan(helpParse(sql), FakeMetadataFactory.example1Cached());
        helpProcess(plan, createCommandContext(), dataManager, expectedResults);
    }
 
  public static ClobType clobFromFile(final String file) {
    return new ClobType(new ClobImpl(new InputStreamFactory.FileInputStreamFactory(UnitTestUtil.getTestDataFile(file)), -1));
  }
View Full Code Here

Examples of org.teiid.core.types.ClobImpl

      final File file = files[index++];
      FileInputStreamFactory isf = new FileInputStreamFactory(file);
      isf.setLength(file.length());
      Object value = null;
      if (isText) {
        ClobImpl clob = new ClobImpl(isf, -1);
        clob.setEncoding(encoding.name());
        value = new ClobType(clob);
      } else {
        value = new BlobType(new BlobImpl(isf));
      }
      result.add(value);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.