Removed DOCUMENT ME comments that were generated and applied source code
[utils] / test / enterprise / src / main / java / org / wamblee / support / persistence / DatabaseProvider.java
1 package org.wamblee.support.persistence;
2
3 /**
4  * Database provider. This database provider represents a particular type of
5  * database such as its capabilities and the ability to create an instance
6  * representing a running database.
7  * 
8  * Since the {@link DatabaseBuilder} uses a first match algorithm and the order
9  * of databaseproviders is not guaranteed, it is recommended for each database
10  * provider to also provide a unique capability that no other database has.
11  */
12 public interface DatabaseProvider {
13
14     /**
15      * Capability that all databases that run inmemory have.
16      */
17     String CAPABILITY_IN_MEMORY = "INMEMORY";
18
19     /**
20      * Capability that all databases that are external have.
21      */
22     String CAPABILITY_EXTERNAL = "EXTERNAL";
23
24     /**
25      * Determines if the database has all capabilities that are requested.
26      * 
27      * @param aCapabilities
28      *            Capabilities it must ahve
29      * @return True if it has all capabilities.
30      */
31     boolean supportsCapabilities(String[] aCapabilities);
32
33     /**
34      * Gets the description for the database.
35      * 
36      * @return Description.
37      */
38     DatabaseDescription getDescription();
39
40     /**
41      * Creates a database instance that represents a running instance of that
42      * database.
43      * 
44      * @return Database.
45      */
46     Database create();
47 }