871be11a95d4a75c1e855ba833d649b76052296a
[utils] /
1 package org.wamblee.support.persistence;
2
3 import java.util.Arrays;
4 import java.util.List;
5
6 public class ExternalDatabaseProvider extends AbstractDatabaseProvider {
7
8         /**
9          * Capabilities of this type of database.
10          */
11         public static final List<String> CAPABILIITIES = Arrays
12                         .asList(CAPABILITY_EXTERNAL);
13
14         @Override
15         protected List<String> getCapabilities() {
16                 return CAPABILIITIES;
17         }
18
19         public Database create() {
20                 return new ExternalDatabase();
21         }
22
23         public DatabaseDescription getDescription() {
24                 return new DatabaseDescription(
25                                 CAPABILIITIES.toArray(new String[0]),
26                                 "External Database",
27                                 "Any database as described by the JDBC URL: requires system properties or environment variables: "
28                                                 + ExternalDatabase.DB_URL_PROP
29                                                 + ", "
30                                                 + ExternalDatabase.DB_USER_PROP
31                                                 + ", and "
32                                                 + ExternalDatabase.DB_PASSWORD_PROP);
33         }
34
35 }