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