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 @ 44376
History | View | Annotate | Download (5.2 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.JDBCNewStoreParameters; |
14 |
import org.gvsig.fmap.dal.store.jdbc.JDBCServerExplorerParameters; |
15 |
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 |
import org.gvsig.fmap.dal.store.jdbc2.spi.operations.ExecuteOperation; |
30 |
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 |
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 |
String database,
|
48 |
String schema,
|
49 |
String table,
|
50 |
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 |
List<String> primaryKeys, |
60 |
String defaultGeometryField,
|
61 |
IProjection crs |
62 |
); |
63 |
|
64 |
public FetchFeatureProviderByReferenceOperation createFetchFeatureProviderByReference(
|
65 |
FeatureReferenceProviderServices reference, |
66 |
FeatureType featureType, |
67 |
TableReference table |
68 |
); |
69 |
|
70 |
public CalculateEnvelopeOfColumnOperation createCalculateEnvelopeOfColumn(
|
71 |
FeatureType featureType, |
72 |
TableReference table, |
73 |
String columnName,
|
74 |
String baseFilter,
|
75 |
Envelope workingArea, |
76 |
IProjection crs |
77 |
); |
78 |
|
79 |
public PerformChangesOperation createPerformChanges(
|
80 |
TableReference table, |
81 |
FeatureType type, |
82 |
Iterator deleteds,
|
83 |
Iterator inserteds,
|
84 |
Iterator updateds,
|
85 |
Iterator featureTypesChanged
|
86 |
); |
87 |
|
88 |
public AppendOperation createAppend(
|
89 |
TableReference table, |
90 |
FeatureType type |
91 |
); |
92 |
|
93 |
public CountOperation createCount(
|
94 |
FeatureType featureType, |
95 |
TableReference table, |
96 |
String baseFilter,
|
97 |
String filter
|
98 |
); |
99 |
|
100 |
public TableIsEmptyOperation createTableIsEmpty(
|
101 |
FeatureType featureType, |
102 |
TableReference table, |
103 |
String baseFilter,
|
104 |
String filtersql
|
105 |
); |
106 |
|
107 |
public ResultSetForSetProviderOperation createResultSetForSetProvider(
|
108 |
TableReference table, |
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 |
TableReference table |
127 |
); |
128 |
|
129 |
public CreateTableOperation createTable(
|
130 |
TableReference table, |
131 |
FeatureType type, |
132 |
List<Pair<String, SQLBuilder.Privilege>> userAndPrivileges, |
133 |
List<String> additionalSQLs |
134 |
) throws DataException;
|
135 |
|
136 |
public CanCreateTablesOperation createCanCreateTables();
|
137 |
|
138 |
public UpdateTableStatisticsOperation createUpdateTableStatistics(
|
139 |
TableReference table |
140 |
); |
141 |
|
142 |
public CanModifyTableOperation createCanModifyTableOperation(
|
143 |
TableReference table |
144 |
); |
145 |
|
146 |
public ExecuteOperation createExecute(String sql); |
147 |
|
148 |
} |