Package de.businesscode.bcdui.vfs.web
Class VFSServlet.JdbcFileDAO
- java.lang.Object
-
- de.businesscode.bcdui.vfs.web.VFSServlet.JdbcFileDAO
-
- All Implemented Interfaces:
VFSServlet.FileDAO
- Enclosing class:
- VFSServlet
public static class VFSServlet.JdbcFileDAO extends java.lang.Object implements VFSServlet.FileDAO
unfortunately we cant work with DatabaseFileSystem / DatabaseFileObject directly to store data, so we do here lowlevel BLOB handling, works with bcd_virtualFileSystem binding-set NOT THREADSAFE
-
-
Constructor Summary
Constructors Constructor Description JdbcFileDAO(javax.sql.DataSource ds)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
commit()
for implementations with transaction handlingvoid
delete(java.util.Collection<java.lang.String> uris)
deletes urisprotected java.sql.Connection
getConnection()
connection used, must not be closed, must not change autocommit flagjava.util.Collection<java.lang.String>
getWrittenFiles()
this method must not be called prior toVFSServlet.FileDAO.commit()
void
write(java.lang.String uri, java.io.InputStream inputStream)
writes file
-
-
-
Method Detail
-
getConnection
protected java.sql.Connection getConnection()
connection used, must not be closed, must not change autocommit flag- Returns:
-
write
public void write(java.lang.String uri, java.io.InputStream inputStream)
Description copied from interface:VFSServlet.FileDAO
writes file- Specified by:
write
in interfaceVFSServlet.FileDAO
-
commit
public void commit()
Description copied from interface:VFSServlet.FileDAO
for implementations with transaction handling- Specified by:
commit
in interfaceVFSServlet.FileDAO
-
getWrittenFiles
public java.util.Collection<java.lang.String> getWrittenFiles()
Description copied from interface:VFSServlet.FileDAO
this method must not be called prior toVFSServlet.FileDAO.commit()
- Specified by:
getWrittenFiles
in interfaceVFSServlet.FileDAO
- Returns:
- collection of finally written files into filesystem with their absolute path
-
delete
public void delete(java.util.Collection<java.lang.String> uris)
Description copied from interface:VFSServlet.FileDAO
deletes uris- Specified by:
delete
in interfaceVFSServlet.FileDAO
-
-