Package com.logicaldoc.impex.application
Class Database
- java.lang.Object
- 
- com.logicaldoc.impex.application.Database
 
- 
 public class Database extends Object Singleton for in-memory database access.- Since:
- 4.5
- Author:
- Matteo Caruso - LogicalDOC
 
- 
- 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcollectLanguages()Collect all languages from current resultsvoidcollectTemplates()Collect all templates from current resultsintcountDocuments()Executes a query to determine the count of the entries.voidcreateSchema()Drops and creates the version database table.static DatabasegetInstance()Get a new instance of DatabaseMap<String,com.logicaldoc.core.i18n.Language>getLanguages()intgetMaxResults()List<IndexVersion>getResults()Map<String,com.logicaldoc.core.metadata.Template>getTemplates()voidinsert(Collection<com.logicaldoc.core.document.Version> versions)Inserts the rows values into the version database table.booleanisThereAreMoreResults()List<IndexVersion>search(String where)Executes a query with the given where clause.voidsetMaxResults(int maxResults)
 
- 
- 
- 
Method Detail- 
getInstancepublic static Database getInstance() Get a new instance of Database- Returns:
- the database instance
 
 - 
createSchemapublic void createSchema() Drops and creates the version database table.
 - 
insertpublic void insert(Collection<com.logicaldoc.core.document.Version> versions) Inserts the rows values into the version database table.- Parameters:
- versions- The versions from which will be retrieved the values to insert into the version database table.
 
 - 
searchpublic List<IndexVersion> search(String where) Executes a query with the given where clause.- Parameters:
- where- The where clause.
- Returns:
- The List of the versions that has been retrieves from the query result set.
 
 - 
countDocumentspublic int countDocuments() Executes a query to determine the count of the entries.- Returns:
- The count of the entries
 
 - 
getResultspublic List<IndexVersion> getResults() 
 - 
collectTemplatespublic void collectTemplates() Collect all templates from current results
 - 
collectLanguagespublic void collectLanguages() Collect all languages from current results
 - 
getMaxResultspublic int getMaxResults() 
 - 
setMaxResultspublic void setMaxResults(int maxResults) 
 - 
isThereAreMoreResultspublic boolean isThereAreMoreResults() 
 
- 
 
-