org.shiftone.memento.store
Class StoreManager
java.lang.Object
org.shiftone.memento.store.StoreManager
- public class StoreManager
- extends java.lang.Object
Field Summary |
static org.apache.log4j.Logger |
LOG
|
Constructor Summary |
(package private) |
StoreManager(java.sql.Connection connection)
|
Method Summary |
void |
commit()
|
java.util.List |
executePhotoQuery(java.lang.String query)
|
int |
insertAlbum(java.lang.String albumName)
|
void |
insertAlbumPhoto(int albumId,
int photoId)
|
int |
insertPhoto(int storageId,
java.lang.String storageName,
java.io.File photoFile,
java.util.Date creationDt,
java.lang.String description)
|
int |
insertSource(java.lang.String name,
java.lang.String location,
boolean isRemovable)
|
int |
insertStorage(java.lang.String name,
java.lang.String location)
|
int |
insertTag(java.lang.Integer albumId,
java.lang.String tagName)
|
void |
insertTagPhoto(int photoId,
int tagId)
|
DataMap |
queryAlbum(int albumId)
|
DataMap |
queryAlbumPhoto(int photoId)
|
java.util.List |
queryAlbumPhotos(int albumId)
|
java.util.List |
queryAlbums()
|
java.util.List |
queryGlobalTags()
|
java.util.List |
queryPhoto(java.lang.String hashCode)
|
java.util.List |
queryPhoto(java.lang.String fileName,
java.util.Date timestamp)
|
java.util.List |
queryPhotoTags(int photoId)
|
java.util.List |
querySource()
|
java.util.List |
queryStorage()
|
java.util.List |
queryTagPhotos(int tagId)
|
java.util.List |
queryTags()
|
java.util.List |
queryTags(int albumId,
boolean includeGlobal)
|
java.util.List |
queryUnsortedPhotos()
|
void |
removeAlbumPhoto(int photoId)
|
void |
removeAlbumTags(int photoId)
|
void |
removeSource(int sourceId)
|
void |
removeTag(int tagId)
|
void |
removeTagPhoto(int photoId,
int tagId)
|
void |
rollback()
|
void |
setTransaction(boolean transaction)
|
void |
shutdown()
|
void |
updateAlbumDescription(int albumId,
java.lang.String description)
|
void |
updateAlbumName(int albumId,
java.lang.String name)
|
void |
updatePhotoDescription(int photoId,
java.lang.String description)
|
void |
updateSource(int id,
java.lang.String name,
java.lang.String location,
boolean isRemovable)
|
void |
updateStorage(int id,
java.lang.String name,
java.lang.String location)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOG
public static final org.apache.log4j.Logger LOG
StoreManager
StoreManager(java.sql.Connection connection)
throws StoreException
setTransaction
public void setTransaction(boolean transaction)
throws StoreException
- Throws:
StoreException
rollback
public void rollback()
throws StoreException
- Throws:
StoreException
commit
public void commit()
throws StoreException
- Throws:
StoreException
insertTag
public int insertTag(java.lang.Integer albumId,
java.lang.String tagName)
throws StoreException
- Throws:
StoreException
removeTag
public void removeTag(int tagId)
throws StoreException
- Throws:
StoreException
insertTagPhoto
public void insertTagPhoto(int photoId,
int tagId)
throws StoreException
- Throws:
StoreException
removeTagPhoto
public void removeTagPhoto(int photoId,
int tagId)
throws StoreException
- Throws:
StoreException
removeAlbumTags
public void removeAlbumTags(int photoId)
throws StoreException
- Throws:
StoreException
insertAlbum
public int insertAlbum(java.lang.String albumName)
throws StoreException
- Throws:
StoreException
updateAlbumName
public void updateAlbumName(int albumId,
java.lang.String name)
throws StoreException
- Throws:
StoreException
updateAlbumDescription
public void updateAlbumDescription(int albumId,
java.lang.String description)
throws StoreException
- Throws:
StoreException
insertAlbumPhoto
public void insertAlbumPhoto(int albumId,
int photoId)
throws StoreException
- Throws:
StoreException
removeAlbumPhoto
public void removeAlbumPhoto(int photoId)
throws StoreException
- Throws:
StoreException
insertPhoto
public int insertPhoto(int storageId,
java.lang.String storageName,
java.io.File photoFile,
java.util.Date creationDt,
java.lang.String description)
throws StoreException
- Throws:
StoreException
updatePhotoDescription
public void updatePhotoDescription(int photoId,
java.lang.String description)
throws StoreException
- Throws:
StoreException
insertStorage
public int insertStorage(java.lang.String name,
java.lang.String location)
throws StoreException
- Throws:
StoreException
updateStorage
public void updateStorage(int id,
java.lang.String name,
java.lang.String location)
throws StoreException
- Throws:
StoreException
insertSource
public int insertSource(java.lang.String name,
java.lang.String location,
boolean isRemovable)
throws StoreException
- Throws:
StoreException
updateSource
public void updateSource(int id,
java.lang.String name,
java.lang.String location,
boolean isRemovable)
throws StoreException
- Throws:
StoreException
removeSource
public void removeSource(int sourceId)
throws StoreException
- Throws:
StoreException
queryPhoto
public java.util.List queryPhoto(java.lang.String hashCode)
throws StoreException
- Throws:
StoreException
queryPhoto
public java.util.List queryPhoto(java.lang.String fileName,
java.util.Date timestamp)
throws StoreException
- Throws:
StoreException
queryPhotoTags
public java.util.List queryPhotoTags(int photoId)
throws StoreException
- Throws:
StoreException
queryAlbumPhotos
public java.util.List queryAlbumPhotos(int albumId)
throws StoreException
- Throws:
StoreException
queryUnsortedPhotos
public java.util.List queryUnsortedPhotos()
throws StoreException
- Throws:
StoreException
queryAlbumPhoto
public DataMap queryAlbumPhoto(int photoId)
throws StoreException
- Throws:
StoreException
queryTagPhotos
public java.util.List queryTagPhotos(int tagId)
throws StoreException
- Throws:
StoreException
queryTags
public java.util.List queryTags()
throws StoreException
- Throws:
StoreException
queryGlobalTags
public java.util.List queryGlobalTags()
throws StoreException
- Throws:
StoreException
queryTags
public java.util.List queryTags(int albumId,
boolean includeGlobal)
throws StoreException
- Throws:
StoreException
queryAlbums
public java.util.List queryAlbums()
throws StoreException
- Throws:
StoreException
queryAlbum
public DataMap queryAlbum(int albumId)
throws StoreException
- Throws:
StoreException
queryStorage
public java.util.List queryStorage()
throws StoreException
- Throws:
StoreException
executePhotoQuery
public java.util.List executePhotoQuery(java.lang.String query)
throws StoreException
- Throws:
StoreException
querySource
public java.util.List querySource()
throws StoreException
- Throws:
StoreException
shutdown
public void shutdown()
throws StoreException
- Throws:
StoreException