T
- The Type of the Object you want to load/storepublic abstract class AbstractStorageService<T> extends Object
Modifier | Constructor and Description |
---|---|
protected |
AbstractStorageService() |
Modifier and Type | Method and Description |
---|---|
protected abstract T |
createObject()
Override this function to create a blank object
|
List<T> |
getAll(String viewName)
Loads all objects from a view
|
List<T> |
getAllFrom(String viewName,
lotus.domino.Database sourceDatabase)
Loads all objects form a view from the source database
|
List<T> |
getAllMyObjects(String viewName,
List<String> fieldsToCheck)
Loads all object where my user, group or role occurs in one of the fields
|
List<T> |
getAllMyObjectsFrom(String viewName,
List<String> fieldsToCheck,
lotus.domino.Database sourceDatabase)
Loads all object where my user, group or role occurs in one of the fields
form the source database
|
List<T> |
getAllMyObjectsFromDocumentCollection(lotus.domino.DocumentCollection collection,
List<String> fieldsToCheck)
Loads all object where my user, group or role occurs in one of the fields
in the document collection
|
List<T> |
getAllMyObjectsFromDocumentList(List<lotus.domino.Document> documents,
List<String> fieldsToCheck)
Loads all object where my user, group or role occurs in one of the fields
in the list of documents (the documents are not recycled!)
|
List<T> |
getAllObjectFor(String userName,
String viewName,
List<String> fieldsToCheck)
Loads all object where the user, group or role occurs in one of the
fields
|
List<T> |
getAllObjectsForFrom(String userName,
String viewName,
List<String> fieldsToCheck,
lotus.domino.Database sourceDatabase)
Loads all object where the user, group or role occurs in one of the
fields form the source database
|
List<T> |
getAllObjectsFromDocumentCollectionFor(String userName,
lotus.domino.DocumentCollection collection,
List<String> fieldsToCheck,
lotus.domino.Database sourceDatabase)
Loads all object where the user, group or role occurs in one of the
fields in the document collection
|
List<T> |
getAllObjectsFromDocumentListFor(String userName,
List<lotus.domino.Document> documents,
List<String> fieldsToCheck,
lotus.domino.Database sourceDatabase)
Loads all object where the user, group or role occurs in one of the
fields in the list of documents (the documents are not recycled!)
|
T |
getById(String id)
Loads an object from the current database
|
T |
getByIdFrom(String id,
lotus.domino.Database sourceDatabase)
Load an object form the source database
|
List<ChangeLogEntry> |
getChangeLog(T objCurrent) |
List<ChangeLogEntry> |
getChangeLog(T objCurrent,
List<String> myRoles)
Get the ChangeLog entries for an object.
|
List<T> |
getObjectsByForeignId(String foreignId,
String viewName)
Loads all object by a foreign id from a view
|
List<T> |
getObjectsByForeignIdFrom(String foreignId,
String viewName,
lotus.domino.Database sourceDatabase)
Load all objects by a foreign id form a view from the source database
|
ISoftDeletionProvider<T> |
getSoftDeletionProvider()
Override this method with your implementation of the SoftDeleteProvider
|
boolean |
hardDelete(T objDelete,
boolean direct)
Deletes an object from the current database.
|
boolean |
hardDelete(T objDelete,
lotus.domino.Database targetDatabase,
boolean direct)
Deletes an object from the target database.
|
T |
prepareNewObject() |
boolean |
save(T obj)
Stores the object in the current database.
|
boolean |
saveTo(T obj,
lotus.domino.Database targetDatabase)
Stores the objec in the target database.
|
List<T> |
search(String search)
Search for documents containing the search term in the current database,
using the fulltext search capability.
|
List<T> |
searchFrom(String search,
lotus.domino.Database db)
Search for documents containing the search term in the database db, using
the fulltext search capability.
|
List<T> |
searchInView(String search,
String viewName)
Search for documents containing the search term in the view of the
current database, using the fulltext search capability.
|
List<T> |
searchInViewFrom(String search,
String viewName,
lotus.domino.Database db)
Search for documents containing the search term in the view of the
database db, using the fulltext search capability.
|
boolean |
softDelete(T objDelete)
Try's to softDelete the object from the current database.
|
boolean |
softDelete(T objDelete,
lotus.domino.Database targetDatabase)
Try's to softDelete the object from the current database.
|
boolean |
undelete(T objDelete)
Undelet's an object from the current database using the
SoftDeleteProvider
|
boolean |
undelete(T objDelete,
lotus.domino.Database targetDatabase)
Undelet's an object from the target database using the SoftDeleteProvider
|
public boolean save(T obj)
obj
- The object to storepublic boolean saveTo(T obj, lotus.domino.Database targetDatabase)
obj
- the object to storetargetDatabase
- the target databasepublic T getById(String id)
id
- public T getByIdFrom(String id, lotus.domino.Database sourceDatabase)
id
- sourceDatabase
- public List<T> getAll(String viewName)
viewName
- public List<T> getAllFrom(String viewName, lotus.domino.Database sourceDatabase)
viewName
- sourceDatabase
- public List<T> getObjectsByForeignId(String foreignId, String viewName)
foreignId
- viewName
- public List<T> getObjectsByForeignIdFrom(String foreignId, String viewName, lotus.domino.Database sourceDatabase)
foreignId
- viewName
- sourceDatabase
- public List<T> getAllMyObjects(String viewName, List<String> fieldsToCheck)
viewName
- fieldsToCheck
- public List<T> getAllMyObjectsFrom(String viewName, List<String> fieldsToCheck, lotus.domino.Database sourceDatabase)
viewName
- fieldsToCheck
- sourceDatabase
- public List<T> getAllMyObjectsFromDocumentList(List<lotus.domino.Document> documents, List<String> fieldsToCheck)
documents
- fieldsToCheck
- public List<T> getAllMyObjectsFromDocumentCollection(lotus.domino.DocumentCollection collection, List<String> fieldsToCheck)
collection
- fieldsToCheck
- public List<T> getAllObjectFor(String userName, String viewName, List<String> fieldsToCheck)
userName
- Name of the userviewName
- fieldsToCheck
- public List<T> getAllObjectsForFrom(String userName, String viewName, List<String> fieldsToCheck, lotus.domino.Database sourceDatabase)
userName
- viewName
- fieldsToCheck
- sourceDatabase
- public List<T> getAllObjectsFromDocumentListFor(String userName, List<lotus.domino.Document> documents, List<String> fieldsToCheck, lotus.domino.Database sourceDatabase)
userName
- documents
- fieldsToCheck
- sourceDatabase
- public List<T> getAllObjectsFromDocumentCollectionFor(String userName, lotus.domino.DocumentCollection collection, List<String> fieldsToCheck, lotus.domino.Database sourceDatabase)
userName
- collection
- fieldsToCheck
- sourceDatabase
- public ISoftDeletionProvider<T> getSoftDeletionProvider()
public boolean softDelete(T objDelete) throws DSSException
objDelete
- DSSException
public boolean softDelete(T objDelete, lotus.domino.Database targetDatabase) throws DSSException
objDelete
- targetDatabase
- DSSException
public boolean hardDelete(T objDelete, boolean direct) throws DSSException
objDelete
- direct
- DSSException
public boolean hardDelete(T objDelete, lotus.domino.Database targetDatabase, boolean direct) throws DSSException
objDelete
- targetDatabase
- direct
- DSSException
public boolean undelete(T objDelete) throws DSSException
objDelete
- DSSException
public boolean undelete(T objDelete, lotus.domino.Database targetDatabase) throws DSSException
objDelete
- targetDatabase
- DSSException
protected abstract T createObject()
public T prepareNewObject()
public List<ChangeLogEntry> getChangeLog(T objCurrent)
public List<ChangeLogEntry> getChangeLog(T objCurrent, List<String> myRoles)
objCurrent
- myRoles
- public List<T> search(String search)
search
- public List<T> searchFrom(String search, lotus.domino.Database db)
search
- public List<T> searchInView(String search, String viewName)
search
- viewName
- Copyright © 2021. All Rights Reserved.