Package com.logicaldoc.impex.application
Class Database
java.lang.Object
com.logicaldoc.impex.application.Database
Singleton for in-memory database access.
- Since:
- 4.5
- Author:
- Matteo Caruso - LogicalDOC
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Collect all languages from current resultsvoid
Collect all templates from current resultsint
Executes a query to determine the count of the entries.void
Drops and creates the version database table.static Database
Get a new instance of Databaseint
void
insert
(Collection<com.logicaldoc.core.document.Version> versions) Inserts the rows values into the version database table.boolean
Executes a query with the given where clause.void
setMaxResults
(int maxResults)
-
Method Details
-
getInstance
Get a new instance of Database- Returns:
- the database instance
-
createSchema
public void createSchema()Drops and creates the version database table. -
insert
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.
-
search
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.
-
countDocuments
public int countDocuments()Executes a query to determine the count of the entries.- Returns:
- The count of the entries
-
getResults
-
collectTemplates
public void collectTemplates()Collect all templates from current results -
collectLanguages
public void collectLanguages()Collect all languages from current results -
getMaxResults
public int getMaxResults() -
setMaxResults
public void setMaxResults(int maxResults) -
isThereAreMoreResults
public boolean isThereAreMoreResults() -
getTemplates
-
getLanguages
-