01: /*
02: * Copyright 2006 Le Duc Bao, Ralf Joachim
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License"); you may not
05: * use this file except in compliance with the License. You may obtain a copy of
06: * the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12: * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13: * License for the specific language governing permissions and limitations under
14: * the License.
15: */
16: package org.castor.ddlgen.engine.postgresql;
17:
18: import org.castor.ddlgen.SchemaFactory;
19: import org.castor.ddlgen.schemaobject.DefaultForeignKey;
20: import org.castor.ddlgen.schemaobject.DefaultIndex;
21: import org.castor.ddlgen.schemaobject.DefaultPrimaryKey;
22: import org.castor.ddlgen.schemaobject.DefaultSchema;
23: import org.castor.ddlgen.schemaobject.DefaultTable;
24: import org.castor.ddlgen.schemaobject.Field;
25: import org.castor.ddlgen.schemaobject.ForeignKey;
26: import org.castor.ddlgen.schemaobject.Index;
27: import org.castor.ddlgen.schemaobject.PrimaryKey;
28: import org.castor.ddlgen.schemaobject.Schema;
29: import org.castor.ddlgen.schemaobject.Table;
30:
31: /**
32: * PostgreSQL schema factory.
33: *
34: * @author <a href="mailto:leducbao AT gmail DOT com">Le Duc Bao</a>
35: * @author <a href="mailto:ralf DOT joachim AT syscon DOT eu">Ralf Joachim</a>
36: * @version $Revision: 5951 $ $Date: 2006-04-25 16:09:10 -0600 (Tue, 25 Apr 2006) $
37: * @since 1.1
38: */
39: public final class PostgresqlSchemaFactory implements SchemaFactory {
40: //--------------------------------------------------------------------------
41:
42: /**
43: * {@inheritDoc}
44: */
45: public Schema createSchema() {
46: return new DefaultSchema();
47: }
48:
49: /**
50: * {@inheritDoc}
51: */
52: public Table createTable() {
53: return new DefaultTable();
54: }
55:
56: /**
57: * {@inheritDoc}
58: */
59: public Field createField() {
60: return new PostgresqlField();
61: }
62:
63: /**
64: * {@inheritDoc}
65: */
66: public ForeignKey createForeignKey() {
67: return new DefaultForeignKey();
68: }
69:
70: /**
71: * {@inheritDoc}
72: */
73: public Index createIndex() {
74: return new DefaultIndex();
75: }
76:
77: /**
78: * {@inheritDoc}
79: */
80: public PrimaryKey createPrimaryKey() {
81: return new DefaultPrimaryKey();
82: }
83:
84: //--------------------------------------------------------------------------
85: }
|