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 |
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 |
TableReference table, |
72 |
String columnName,
|
73 |
String baseFilter,
|
74 |
Envelope workingArea, |
75 |
IProjection crs |
76 |
); |
77 |
|
78 |
public PerformChangesOperation createPerformChanges(
|
79 |
TableReference table, |
80 |
FeatureType type, |
81 |
Iterator deleteds,
|
82 |
Iterator inserteds,
|
83 |
Iterator updateds,
|
84 |
Iterator featureTypesChanged
|
85 |
); |
86 |
|
87 |
public AppendOperation createAppend(
|
88 |
TableReference table, |
89 |
FeatureType type |
90 |
); |
91 |
|
92 |
public CountOperation createCount(
|
93 |
TableReference table, |
94 |
String baseFilter,
|
95 |
String filter
|
96 |
); |
97 |
|
98 |
public TableIsEmptyOperation createTableIsEmpty(
|
99 |
TableReference table, |
100 |
String baseFilter,
|
101 |
String filtersql
|
102 |
); |
103 |
|
104 |
public ResultSetForSetProviderOperation createResultSetForSetProvider(
|
105 |
TableReference table, |
106 |
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 |
TableReference table |
124 |
); |
125 |
|
126 |
public CreateTableOperation createTable(
|
127 |
TableReference table, |
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 |
TableReference table |
137 |
); |
138 |
|
139 |
public CanModifyTableOperation createCanModifyTableOperation(
|
140 |
TableReference table |
141 |
); |
142 |
|
143 |
public ExecuteOperation createExecute(String sql); |
144 |
|
145 |
} |