svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.compat.cdc / org.gvsig.fmap.dal / org.gvsig.fmap.dal.db / org.gvsig.fmap.dal.db.jdbc / src / main / java / org / gvsig / fmap / dal / store / jdbc2 / OperationsFactory.java @ 44058
History | View | Annotate | Download (5.09 KB)
1 | 43020 | jjdelcerro | package org.gvsig.fmap.dal.store.jdbc2; |
---|---|---|---|
2 | |||
3 | import java.util.Iterator; |
||
4 | import java.util.List; |
||
5 | import org.apache.commons.lang3.tuple.Pair; |
||
6 | import org.cresques.cts.IProjection; |
||
7 | import org.gvsig.fmap.dal.exception.DataException; |
||
8 | import org.gvsig.fmap.dal.feature.EditableFeatureType; |
||
9 | import org.gvsig.fmap.dal.feature.FeatureQuery; |
||
10 | import org.gvsig.fmap.dal.feature.FeatureType; |
||
11 | import org.gvsig.fmap.dal.SQLBuilder; |
||
12 | import org.gvsig.fmap.dal.feature.spi.FeatureReferenceProviderServices; |
||
13 | 44058 | jjdelcerro | import org.gvsig.fmap.dal.store.jdbc.JDBCNewStoreParameters; |
14 | import org.gvsig.fmap.dal.store.jdbc.JDBCServerExplorerParameters; |
||
15 | 43020 | jjdelcerro | import org.gvsig.fmap.dal.store.jdbc.JDBCStoreParameters; |
16 | import org.gvsig.fmap.dal.store.jdbc2.spi.operations.AppendOperation; |
||
17 | import org.gvsig.fmap.dal.store.jdbc2.spi.operations.CalculateEnvelopeOfColumnOperation; |
||
18 | import org.gvsig.fmap.dal.store.jdbc2.spi.operations.CanCreateTablesOperation; |
||
19 | import org.gvsig.fmap.dal.store.jdbc2.spi.operations.CanModifyTableOperation; |
||
20 | import org.gvsig.fmap.dal.store.jdbc2.spi.operations.CreateTableOperation; |
||
21 | import org.gvsig.fmap.dal.store.jdbc2.spi.operations.FetchFeatureProviderByReferenceOperation; |
||
22 | import org.gvsig.fmap.dal.store.jdbc2.spi.operations.FetchFeatureTypeOperation; |
||
23 | import org.gvsig.fmap.dal.store.jdbc2.spi.operations.TableIsEmptyOperation; |
||
24 | import org.gvsig.fmap.dal.store.jdbc2.spi.operations.ListTablesOperation; |
||
25 | import org.gvsig.fmap.dal.store.jdbc2.spi.operations.PerformChangesOperation; |
||
26 | import org.gvsig.fmap.dal.store.jdbc2.spi.operations.DropTableOperation; |
||
27 | import org.gvsig.fmap.dal.store.jdbc2.spi.operations.ResultSetForSetProviderOperation; |
||
28 | import org.gvsig.fmap.dal.store.jdbc2.spi.operations.CountOperation; |
||
29 | 43377 | jjdelcerro | import org.gvsig.fmap.dal.store.jdbc2.spi.operations.ExecuteOperation; |
30 | 43020 | jjdelcerro | import org.gvsig.fmap.dal.store.jdbc2.spi.operations.UpdateTableStatisticsOperation; |
31 | import org.gvsig.fmap.geom.primitive.Envelope; |
||
32 | |||
33 | public interface OperationsFactory { |
||
34 | |||
35 | 44058 | jjdelcerro | public interface TableReference { |
36 | public String getDatabase(); |
||
37 | public String getSchema(); |
||
38 | public String getTable(); |
||
39 | public String getSubquery(); |
||
40 | public boolean hasDatabase(); |
||
41 | public boolean hasSchema(); |
||
42 | public boolean hasTable(); |
||
43 | public boolean hasSubquery(); |
||
44 | } |
||
45 | |||
46 | public TableReference createTableReference(
|
||
47 | 43020 | jjdelcerro | String database,
|
48 | String schema,
|
||
49 | String table,
|
||
50 | 44058 | jjdelcerro | String subquery
|
51 | ); |
||
52 | |||
53 | public TableReference createTableReference(JDBCStoreParameters params);
|
||
54 | public TableReference createTableReference(JDBCNewStoreParameters params);
|
||
55 | |||
56 | public FetchFeatureTypeOperation createFetchFeatureType(
|
||
57 | EditableFeatureType type, |
||
58 | TableReference table, |
||
59 | 43020 | jjdelcerro | List<String> primaryKeys, |
60 | String defaultGeometryField,
|
||
61 | IProjection crs |
||
62 | ); |
||
63 | 43377 | jjdelcerro | |
64 | 43020 | jjdelcerro | public FetchFeatureProviderByReferenceOperation createFetchFeatureProviderByReference(
|
65 | FeatureReferenceProviderServices reference, |
||
66 | FeatureType featureType, |
||
67 | 44058 | jjdelcerro | TableReference table |
68 | 43020 | jjdelcerro | ); |
69 | |||
70 | public CalculateEnvelopeOfColumnOperation createCalculateEnvelopeOfColumn(
|
||
71 | 44058 | jjdelcerro | TableReference table, |
72 | 43020 | jjdelcerro | String columnName,
|
73 | String baseFilter,
|
||
74 | Envelope workingArea, |
||
75 | IProjection crs |
||
76 | ); |
||
77 | |||
78 | public PerformChangesOperation createPerformChanges(
|
||
79 | 44058 | jjdelcerro | TableReference table, |
80 | 43020 | jjdelcerro | FeatureType type, |
81 | Iterator deleteds,
|
||
82 | Iterator inserteds,
|
||
83 | Iterator updateds,
|
||
84 | Iterator featureTypesChanged
|
||
85 | ); |
||
86 | |||
87 | public AppendOperation createAppend(
|
||
88 | 44058 | jjdelcerro | TableReference table, |
89 | 43020 | jjdelcerro | FeatureType type |
90 | ); |
||
91 | |||
92 | public CountOperation createCount(
|
||
93 | 44058 | jjdelcerro | TableReference table, |
94 | 43020 | jjdelcerro | String baseFilter,
|
95 | String filter
|
||
96 | ); |
||
97 | |||
98 | public TableIsEmptyOperation createTableIsEmpty(
|
||
99 | 44058 | jjdelcerro | TableReference table, |
100 | 43020 | jjdelcerro | String baseFilter,
|
101 | String filtersql
|
||
102 | ); |
||
103 | |||
104 | public ResultSetForSetProviderOperation createResultSetForSetProvider(
|
||
105 | 44058 | jjdelcerro | TableReference table, |
106 | 43020 | jjdelcerro | String baseFilter,
|
107 | String baseOrder,
|
||
108 | FeatureQuery query, |
||
109 | FeatureType storeType, |
||
110 | FeatureType setType, |
||
111 | long limit,
|
||
112 | long offset,
|
||
113 | int fetchSize
|
||
114 | ); |
||
115 | |||
116 | public ListTablesOperation createListTables(
|
||
117 | int mode,
|
||
118 | JDBCStoreParameters baseParameters, |
||
119 | boolean informationTables
|
||
120 | ); |
||
121 | |||
122 | public DropTableOperation createDropTable(
|
||
123 | 44058 | jjdelcerro | TableReference table |
124 | 43020 | jjdelcerro | ); |
125 | |||
126 | public CreateTableOperation createTable(
|
||
127 | 44058 | jjdelcerro | TableReference table, |
128 | 43020 | jjdelcerro | FeatureType type, |
129 | List<Pair<String, SQLBuilder.Privilege>> userAndPrivileges, |
||
130 | List<String> additionalSQLs |
||
131 | ) throws DataException;
|
||
132 | |||
133 | public CanCreateTablesOperation createCanCreateTables();
|
||
134 | |||
135 | public UpdateTableStatisticsOperation createUpdateTableStatistics(
|
||
136 | 44058 | jjdelcerro | TableReference table |
137 | 43020 | jjdelcerro | ); |
138 | |||
139 | public CanModifyTableOperation createCanModifyTableOperation(
|
||
140 | 44058 | jjdelcerro | TableReference table |
141 | 43020 | jjdelcerro | ); |
142 | 43377 | jjdelcerro | |
143 | public ExecuteOperation createExecute(String sql); |
||
144 | |||
145 | 43020 | jjdelcerro | } |