01: /*
02: * Copyright Aduna (http://www.aduna-software.com/) (c) 2008.
03: *
04: * Licensed under the Aduna BSD-style license.
05: */
06: package org.openrdf.sail.rdbms.postgresql;
07:
08: import org.openrdf.sail.rdbms.RdbmsConnectionFactory;
09: import org.openrdf.sail.rdbms.evaluation.QueryBuilderFactory;
10: import org.openrdf.sail.rdbms.managers.TransTableManager;
11: import org.openrdf.sail.rdbms.optimizers.RdbmsQueryOptimizer;
12: import org.openrdf.sail.rdbms.schema.TableFactory;
13: import org.openrdf.sail.rdbms.schema.ValueTableFactory;
14:
15: /**
16: * Overrides {@link ValueTableFactory}, {@link QueryBuilderFactory}, and
17: * {@link RdbmsQueryOptimizer}. This class also indicates that PostgreSQL does
18: * not require a FROM clause.
19: *
20: * @author James Leigh
21: *
22: */
23: public class PgSqlConnectionFactory extends RdbmsConnectionFactory {
24:
25: @Override
26: protected ValueTableFactory createValueTableFactory() {
27: return new PgSqlValueTableFactory();
28: }
29:
30: @Override
31: protected TableFactory createTableFactory() {
32: return new PgSqlTableFactory();
33: }
34:
35: @Override
36: protected QueryBuilderFactory createQueryBuilderFactory() {
37: return new PgQueryBuilderFactory();
38: }
39:
40: @Override
41: protected String getFromDummyTable() {
42: return "";
43: }
44:
45: @Override
46: protected RdbmsQueryOptimizer createOptimizer() {
47: return new PgSqlQueryOptimizer();
48: }
49:
50: @Override
51: protected TransTableManager createTransTableManager() {
52: return new PgSqlTransTableManager();
53: }
54: }
|