Revision 44058 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/spi/operations/AppendOperation.java
AppendOperation.java | ||
---|---|---|
13 | 13 |
import org.gvsig.fmap.dal.store.jdbc.exception.JDBCPreparingSQLException; |
14 | 14 |
import org.gvsig.fmap.dal.store.jdbc2.JDBCHelper; |
15 | 15 |
import org.gvsig.fmap.dal.store.jdbc2.JDBCUtils; |
16 |
import org.gvsig.fmap.dal.store.jdbc2.OperationsFactory; |
|
17 |
import org.gvsig.fmap.dal.store.jdbc2.OperationsFactory.TableReference; |
|
16 | 18 |
import org.gvsig.fmap.dal.store.jdbc2.spi.JDBCSQLBuilderBase; |
17 | 19 |
import org.gvsig.tools.dispose.Disposable; |
18 | 20 |
import org.gvsig.tools.dispose.DisposeUtils; |
... | ... | |
22 | 24 |
|
23 | 25 |
protected Connection connection = null; |
24 | 26 |
protected final JDBCHelper helper; |
25 |
protected final String database; |
|
26 |
protected final String schema; |
|
27 |
protected final String table; |
|
27 |
protected final TableReference table; |
|
28 | 28 |
protected final FeatureType type; |
29 | 29 |
|
30 | 30 |
protected JDBCSQLBuilderBase sqlbuilder = null; |
... | ... | |
33 | 33 |
|
34 | 34 |
public AppendOperation( |
35 | 35 |
JDBCHelper helper, |
36 |
String database, |
|
37 |
String schema, |
|
38 |
String table, |
|
36 |
TableReference table, |
|
39 | 37 |
FeatureType type |
40 | 38 |
) { |
41 | 39 |
this.helper = helper; |
42 |
this.database = database; |
|
43 |
this.schema = schema; |
|
44 | 40 |
this.table = table; |
45 | 41 |
this.type = type; |
46 | 42 |
} |
... | ... | |
55 | 51 |
|
56 | 52 |
this.sqlbuilder = this.helper.createSQLBuilder(); |
57 | 53 |
|
58 |
this.sqlbuilder.insert().table().database(this.database).schema(this.schema).name(this.table); |
|
54 |
this.sqlbuilder.insert().table() |
|
55 |
.database(this.table.getDatabase()) |
|
56 |
.schema(this.table.getSchema()) |
|
57 |
.name(this.table.getTable() |
|
58 |
); |
|
59 | 59 |
for (FeatureAttributeDescriptor attr : type) { |
60 | 60 |
if( attr.isAutomatic() ) { |
61 | 61 |
continue; |
Also available in: Unified diff