|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.loom.persistence.file.DatabaseFileManager
@Service public class DatabaseFileManager
Handles file upload and download
| Constructor Summary | |
|---|---|
DatabaseFileManager()
|
|
| Method Summary | |
|---|---|
PersistentFile |
find(java.lang.Integer id)
|
protected org.springframework.jdbc.support.lob.LobHandler |
getLobHandler()
|
PersistentFile |
merge(FileParameter parameter)
Stores a file in the database and return the persistent instance |
PersistentFile |
merge(PersistentFile file)
Stores a file in the database and return the persistent instance |
PersistentFile |
remove(java.lang.Integer id)
Removes a persistent file from the database |
protected BlobPersistentFileContents |
saveContents(PersistentFile file,
java.io.InputStream input,
boolean update)
Persist the file contents into the database |
void |
setContentsColumnName(java.lang.String contentsColumnName)
|
void |
setDataSource(javax.sql.DataSource dataSource)
|
void |
setEntityManager(ExtendedEntityManager entityManager)
|
void |
setFileTableName(java.lang.String fileTableName)
|
void |
setLobHandler(org.springframework.jdbc.support.lob.LobHandler lobHandler)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DatabaseFileManager()
| Method Detail |
|---|
@Transactional public PersistentFile merge(FileParameter parameter)
FileManager
merge in interface FileManagerparameter - the uploaded parameter file
@Transactional public PersistentFile merge(PersistentFile file)
FileManager
merge in interface FileManagerfile - the modified file to store
protected BlobPersistentFileContents saveContents(PersistentFile file,
java.io.InputStream input,
boolean update)
file - The PersistentFile instanceupdate - true to update an already existing file, false to insert a new onepublic PersistentFile find(java.lang.Integer id)
find in interface FileManagerid - the persistent file id
@Transactional public PersistentFile remove(java.lang.Integer id)
FileManager
remove in interface FileManagerid - the file id to remove
@Inject public void setDataSource(javax.sql.DataSource dataSource)
public void setContentsColumnName(java.lang.String contentsColumnName)
public void setFileTableName(java.lang.String fileTableName)
public void setLobHandler(org.springframework.jdbc.support.lob.LobHandler lobHandler)
protected org.springframework.jdbc.support.lob.LobHandler getLobHandler()
public void setEntityManager(ExtendedEntityManager entityManager)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||