public static InputStreamFactory getInputStreamFactory(Streamable<?> s) { if (s.getReference() instanceof Streamable<?>) { return getInputStreamFactory((Streamable<?>) s.getReference()); } if (s.getReference() instanceof BaseLob) { BaseLob bl = (BaseLob) s.getReference(); try { InputStreamFactory isf = bl.getStreamFactory(); if (isf != null) { return isf; } } catch (SQLException e) { } } if (s instanceof BaseClobType) { return new InputStreamFactory.ClobInputStreamFactory((Clob)s.getReference()); } else if (s instanceof BlobType){ return new InputStreamFactory.BlobInputStreamFactory((Blob)s.getReference()); } return new InputStreamFactory.SQLXMLInputStreamFactory((SQLXML)s.getReference()); }
if (lob.getReference() == null) { if (lobHolder == null) { throw new TeiidComponentException(QueryPlugin.Event.TEIID30033, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30033)); lob.setReference(lobHolder.lob.getReference()); if (lob.getReference() == null) { throw new TeiidComponentException(QueryPlugin.Event.TEIID30034, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30034));
public static InputStreamFactory getInputStreamFactory(Streamable<?> s) { if (s.getReference() instanceof Streamable<?>) { return getInputStreamFactory((Streamable<?>) s.getReference()); } if (s.getReference() instanceof BaseLob) { BaseLob bl = (BaseLob) s.getReference(); try { InputStreamFactory isf = bl.getStreamFactory(); if (isf != null) { return isf; } } catch (SQLException e) { } } if (s instanceof ClobType) { return new InputStreamFactory.ClobInputStreamFactory((Clob)s.getReference()); } else if (s instanceof BlobType){ return new InputStreamFactory.BlobInputStreamFactory((Blob)s.getReference()); } return new InputStreamFactory.SQLXMLInputStreamFactory((SQLXML)s.getReference()); }
if (lob.getReference() == null) { if (lobHolder == null) { throw new TeiidComponentException(QueryPlugin.Event.TEIID30033, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30033)); lob.setReference(lobHolder.lob.getReference()); if (lob.getReference() == null) { throw new TeiidComponentException(QueryPlugin.Event.TEIID30034, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30034));
public static InputStreamFactory getInputStreamFactory(Streamable<?> s) { if (s.getReference() instanceof Streamable<?>) { return getInputStreamFactory((Streamable<?>) s.getReference()); } if (s.getReference() instanceof BaseLob) { BaseLob bl = (BaseLob) s.getReference(); try { InputStreamFactory isf = bl.getStreamFactory(); if (isf != null) { return isf; } } catch (SQLException e) { } } if (s instanceof BaseClobType) { return new InputStreamFactory.ClobInputStreamFactory((Clob)s.getReference()); } else if (s instanceof BlobType){ return new InputStreamFactory.BlobInputStreamFactory((Blob)s.getReference()); } return new InputStreamFactory.SQLXMLInputStreamFactory((SQLXML)s.getReference()); }
if (lob.getReference() == null) { if (lobHolder == null) { throw new TeiidComponentException(QueryPlugin.Event.TEIID30033, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30033)); lob.setReference(lobHolder.lob.getReference()); if (lob.getReference() == null) { throw new TeiidComponentException(QueryPlugin.Event.TEIID30034, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30034));
@Override public InputStream getInputStream() throws IOException { List<InputStream> streams = new ArrayList<InputStream>(ew.includes.size() * 2 + 1); long last = 0; for (int i = 0; i < ew.includes.size(); i++) { Include include = ew.includes.get(i); streams.add(fsisf.getInputStream(last, include.start - last)); last = include.start; try { streams.add(((BaseLob)include.streamable.getReference()).getBinaryStream()); } catch (SQLException e) { throw new IOException(e); } } streams.add(fsisf.getInputStream(last, -1)); return new SequenceInputStream(Collections.enumeration(streams)); }
@Override public InputStream getInputStream() throws IOException { List<InputStream> streams = new ArrayList<InputStream>(ew.includes.size() * 2 + 1); long last = 0; for (int i = 0; i < ew.includes.size(); i++) { Include include = ew.includes.get(i); streams.add(fsisf.getInputStream(last, include.start - last)); last = include.start; try { streams.add(((BaseLob)include.streamable.getReference()).getBinaryStream()); } catch (SQLException e) { throw new IOException(e); } } streams.add(fsisf.getInputStream(last, -1)); return new SequenceInputStream(Collections.enumeration(streams)); }
@Override public InputStream getInputStream() throws IOException { List<InputStream> streams = new ArrayList<InputStream>(ew.includes.size() * 2 + 1); long last = 0; for (int i = 0; i < ew.includes.size(); i++) { Include include = ew.includes.get(i); streams.add(fsisf.getInputStream(last, include.start - last)); last = include.start; try { streams.add(((BaseLob)include.streamable.getReference()).getBinaryStream()); } catch (SQLException e) { throw new IOException(e); } } streams.add(fsisf.getInputStream(last, -1)); return new SequenceInputStream(Collections.enumeration(streams)); }
public static void setTemporary(Object lob, boolean temp) { if (lob instanceof Streamable<?>) { setTemporary(((Streamable<?>)lob).getReference(), temp); } if (lob instanceof BaseLob) { BaseLob baseLob = (BaseLob)lob; try { baseLob.getStreamFactory().setTemporary(temp); } catch (SQLException e) { } } }
public static void setTemporary(Object lob, boolean temp) { if (lob instanceof Streamable<?>) { setTemporary(((Streamable<?>)lob).getReference(), temp); } if (lob instanceof BaseLob) { BaseLob baseLob = (BaseLob)lob; try { baseLob.getStreamFactory().setTemporary(temp); } catch (SQLException e) { } } }
public static StorageMode getStorageMode(Object lob) { if (lob instanceof Streamable<?>) { return getStorageMode(((Streamable<?>)lob).getReference()); } if (lob instanceof SerialClob) { return StorageMode.MEMORY; } if (lob instanceof SerialBlob) { return StorageMode.MEMORY; } if (lob instanceof BaseLob) { BaseLob baseLob = (BaseLob)lob; try { return baseLob.getStreamFactory().getStorageMode(); } catch (SQLException e) { return StorageMode.FREE; } } return StorageMode.OTHER; }
public static StorageMode getStorageMode(Object lob) { if (lob instanceof Streamable<?>) { return getStorageMode(((Streamable<?>)lob).getReference()); } if (lob instanceof SerialClob) { return StorageMode.MEMORY; } if (lob instanceof SerialBlob) { return StorageMode.MEMORY; } if (lob instanceof BaseLob) { BaseLob baseLob = (BaseLob)lob; try { return baseLob.getStreamFactory().getStorageMode(); } catch (SQLException e) { return StorageMode.FREE; } } return StorageMode.OTHER; }
try { Streamable<?> s = (Streamable)obj; Object o = s.getReference(); if (o instanceof BaseLob) { InputStreamFactory isf = ((BaseLob)o).getStreamFactory();
try { Streamable<?> s = (Streamable)obj; Object o = s.getReference(); if (o instanceof BaseLob) { InputStreamFactory isf = ((BaseLob)o).getStreamFactory();
try { Streamable<?> s = (Streamable)obj; Object o = s.getReference(); if (o instanceof BaseLob) { InputStreamFactory isf = ((BaseLob)o).getStreamFactory();
Object reference = ((Streamable<?>)currentValue).getReference(); if (reference != null) { return reference;
Object reference = ((Streamable<?>)currentValue).getReference(); if (reference != null) { return reference;