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 @ 43020
History | View | Annotate | Download (4.86 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 | import org.gvsig.fmap.dal.store.jdbc.JDBCStoreParameters; |
||
14 | import org.gvsig.fmap.dal.store.jdbc2.spi.operations.AppendOperation; |
||
15 | import org.gvsig.fmap.dal.store.jdbc2.spi.operations.CalculateEnvelopeOfColumnOperation; |
||
16 | import org.gvsig.fmap.dal.store.jdbc2.spi.operations.CanCreateTablesOperation; |
||
17 | import org.gvsig.fmap.dal.store.jdbc2.spi.operations.CanModifyTableOperation; |
||
18 | import org.gvsig.fmap.dal.store.jdbc2.spi.operations.CreateTableOperation; |
||
19 | import org.gvsig.fmap.dal.store.jdbc2.spi.operations.FetchFeatureProviderByReferenceOperation; |
||
20 | import org.gvsig.fmap.dal.store.jdbc2.spi.operations.FetchFeatureTypeOperation; |
||
21 | import org.gvsig.fmap.dal.store.jdbc2.spi.operations.TableIsEmptyOperation; |
||
22 | import org.gvsig.fmap.dal.store.jdbc2.spi.operations.ListTablesOperation; |
||
23 | import org.gvsig.fmap.dal.store.jdbc2.spi.operations.PerformChangesOperation; |
||
24 | import org.gvsig.fmap.dal.store.jdbc2.spi.operations.DropTableOperation; |
||
25 | import org.gvsig.fmap.dal.store.jdbc2.spi.operations.ResultSetForSetProviderOperation; |
||
26 | import org.gvsig.fmap.dal.store.jdbc2.spi.operations.CountOperation; |
||
27 | import org.gvsig.fmap.dal.store.jdbc2.spi.operations.UpdateTableStatisticsOperation; |
||
28 | import org.gvsig.fmap.geom.primitive.Envelope; |
||
29 | |||
30 | public interface OperationsFactory { |
||
31 | |||
32 | public FetchFeatureTypeOperation createFetchFeatureType(
|
||
33 | EditableFeatureType type, |
||
34 | String database,
|
||
35 | String schema,
|
||
36 | String table,
|
||
37 | List<String> primaryKeys, |
||
38 | String defaultGeometryField,
|
||
39 | IProjection crs |
||
40 | ); |
||
41 | |||
42 | public FetchFeatureProviderByReferenceOperation createFetchFeatureProviderByReference(
|
||
43 | FeatureReferenceProviderServices reference, |
||
44 | FeatureType featureType, |
||
45 | String database,
|
||
46 | String schema,
|
||
47 | String table
|
||
48 | ); |
||
49 | |||
50 | public CalculateEnvelopeOfColumnOperation createCalculateEnvelopeOfColumn(
|
||
51 | String subquery,
|
||
52 | String database,
|
||
53 | String schema,
|
||
54 | String table,
|
||
55 | String columnName,
|
||
56 | String baseFilter,
|
||
57 | Envelope workingArea, |
||
58 | IProjection crs |
||
59 | ); |
||
60 | |||
61 | public PerformChangesOperation createPerformChanges(
|
||
62 | String database,
|
||
63 | String schema,
|
||
64 | String table,
|
||
65 | FeatureType type, |
||
66 | Iterator deleteds,
|
||
67 | Iterator inserteds,
|
||
68 | Iterator updateds,
|
||
69 | Iterator featureTypesChanged
|
||
70 | ); |
||
71 | |||
72 | public AppendOperation createAppend(
|
||
73 | String database,
|
||
74 | String schema,
|
||
75 | String table,
|
||
76 | FeatureType type |
||
77 | ); |
||
78 | |||
79 | public CountOperation createCount(
|
||
80 | String database,
|
||
81 | String schema,
|
||
82 | String table,
|
||
83 | String sql,
|
||
84 | String baseFilter,
|
||
85 | String filter
|
||
86 | ); |
||
87 | |||
88 | public TableIsEmptyOperation createTableIsEmpty(
|
||
89 | String database,
|
||
90 | String schema,
|
||
91 | String table,
|
||
92 | String sql,
|
||
93 | String baseFilter,
|
||
94 | String filtersql
|
||
95 | ); |
||
96 | |||
97 | public ResultSetForSetProviderOperation createResultSetForSetProvider(
|
||
98 | String database,
|
||
99 | String schema,
|
||
100 | String table,
|
||
101 | String subquery,
|
||
102 | String baseFilter,
|
||
103 | String baseOrder,
|
||
104 | FeatureQuery query, |
||
105 | FeatureType storeType, |
||
106 | FeatureType setType, |
||
107 | long limit,
|
||
108 | long offset,
|
||
109 | int fetchSize
|
||
110 | ); |
||
111 | |||
112 | public ListTablesOperation createListTables(
|
||
113 | int mode,
|
||
114 | JDBCStoreParameters baseParameters, |
||
115 | boolean informationTables
|
||
116 | ); |
||
117 | |||
118 | public DropTableOperation createDropTable(
|
||
119 | String database,
|
||
120 | String schemaName,
|
||
121 | String tableName
|
||
122 | ); |
||
123 | |||
124 | public CreateTableOperation createTable(
|
||
125 | String database,
|
||
126 | String schemaName,
|
||
127 | String tableName,
|
||
128 | 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 | String database,
|
||
137 | String schemaName,
|
||
138 | String tableName
|
||
139 | ); |
||
140 | |||
141 | public CanModifyTableOperation createCanModifyTableOperation(
|
||
142 | String dbName,
|
||
143 | String schemaName,
|
||
144 | String tableName
|
||
145 | ); |
||
146 | } |