diff --git a/citydb-database-postgres/src/main/resources/org/citydb/database/postgres/query_feature_hierarchy.sql b/citydb-database-postgres/src/main/resources/org/citydb/database/postgres/query_feature_hierarchy.sql index 6d327203..5e6b3e47 100644 --- a/citydb-database-postgres/src/main/resources/org/citydb/database/postgres/query_feature_hierarchy.sql +++ b/citydb-database-postgres/src/main/resources/org/citydb/database/postgres/query_feature_hierarchy.sql @@ -2,7 +2,6 @@ WITH RECURSIVE FEATURE_HIERARCHY AS (SELECT NULL::bigint AS ID, ID AS FEATURE_ID, NULL::bigint AS PARENT_ID, - NULL::bigint AS ROOT_ID, NULL::int AS DATATYPE_ID, NULL::int AS NAMESPACE_ID, NULL AS NAME, @@ -32,7 +31,6 @@ WITH RECURSIVE FEATURE_HIERARCHY AS P.ID, P.FEATURE_ID, P.PARENT_ID, - P.ROOT_ID, P.DATATYPE_ID, P.NAMESPACE_ID, P.NAME, @@ -62,7 +60,6 @@ SELECT H.ID, H.FEATURE_ID, H.PARENT_ID, - H.ROOT_ID, H.DATATYPE_ID, H.NAMESPACE_ID, H.NAME, diff --git a/citydb-model/src/main/java/org/citydb/model/property/PropertyDescriptor.java b/citydb-model/src/main/java/org/citydb/model/property/PropertyDescriptor.java index 87a80eb0..73afc8a5 100644 --- a/citydb-model/src/main/java/org/citydb/model/property/PropertyDescriptor.java +++ b/citydb-model/src/main/java/org/citydb/model/property/PropertyDescriptor.java @@ -26,7 +26,6 @@ public class PropertyDescriptor extends DatabaseDescriptor { private final long featureId; private long parentId; - private long rootId; private PropertyDescriptor(long id, long featureId) { super(id); @@ -49,13 +48,4 @@ public PropertyDescriptor setParentId(long parentId) { public long getParentId() { return parentId; } - - public PropertyDescriptor setRootId(long rootId) { - this.rootId = rootId; - return this; - } - - public long getRootId() { - return rootId; - } } diff --git a/citydb-operation/src/main/java/org/citydb/operation/exporter/property/PropertyExporter.java b/citydb-operation/src/main/java/org/citydb/operation/exporter/property/PropertyExporter.java index 8349a993..4360e852 100644 --- a/citydb-operation/src/main/java/org/citydb/operation/exporter/property/PropertyExporter.java +++ b/citydb-operation/src/main/java/org/citydb/operation/exporter/property/PropertyExporter.java @@ -63,8 +63,7 @@ public PropertyStub doExport(long featureId, ResultSet rs) throws ExportExceptio .setGenericContent(rs.getString("val_content")) .setGenericContentMimeType(rs.getString("val_content_mime_type")) .setDescriptor(PropertyDescriptor.of(rs.getLong("id"), featureId) - .setParentId(rs.getLong("parent_id")) - .setRootId(rs.getLong("root_id"))); + .setParentId(rs.getLong("parent_id"))); } else { return null; } diff --git a/citydb-operation/src/main/java/org/citydb/operation/importer/property/AddressPropertyImporter.java b/citydb-operation/src/main/java/org/citydb/operation/importer/property/AddressPropertyImporter.java index 3d4258b0..ceaef6f8 100644 --- a/citydb-operation/src/main/java/org/citydb/operation/importer/property/AddressPropertyImporter.java +++ b/citydb-operation/src/main/java/org/citydb/operation/importer/property/AddressPropertyImporter.java @@ -44,34 +44,34 @@ public AddressPropertyImporter(ImportHelper helper) throws SQLException { @Override protected String getInsertStatement() { return "insert into " + tableHelper.getPrefixedTableName(table) + - "(id, feature_id, parent_id, root_id, datatype_id, namespace_id, name, " + + "(id, feature_id, parent_id, datatype_id, namespace_id, name, " + "val_address_id, val_reference_type) " + - "values (" + String.join(",", Collections.nCopies(9, "?")) + ")"; + "values (" + String.join(",", Collections.nCopies(8, "?")) + ")"; } public PropertyDescriptor doImport(AddressProperty property, long featureId) throws ImportException, SQLException { long propertyId = nextSequenceValue(Sequence.PROPERTY); - return doImport(property, propertyId, propertyId, propertyId, featureId); + return doImport(property, propertyId, propertyId, featureId); } - PropertyDescriptor doImport(AddressProperty property, long parentId, long rootId, long featureId) throws ImportException, SQLException { - return doImport(property, nextSequenceValue(Sequence.PROPERTY), parentId, rootId, featureId); + PropertyDescriptor doImport(AddressProperty property, long parentId, long featureId) throws ImportException, SQLException { + return doImport(property, nextSequenceValue(Sequence.PROPERTY), parentId, featureId); } - PropertyDescriptor doImport(AddressProperty property, long propertyId, long parentId, long rootId, long featureId) throws ImportException, SQLException { + PropertyDescriptor doImport(AddressProperty property, long propertyId, long parentId, long featureId) throws ImportException, SQLException { Address address = property.getObject().orElse(null); if (address != null) { - stmt.setLong(8, tableHelper.getOrCreateImporter(AddressImporter.class) + stmt.setLong(7, tableHelper.getOrCreateImporter(AddressImporter.class) .doImport(address) .getId()); - stmt.setNull(9, Types.INTEGER); + stmt.setNull(8, Types.INTEGER); } else if (property.getReference().isPresent()) { Reference reference = property.getReference().get(); cacheReference(CacheType.ADDRESS, reference, propertyId); - stmt.setNull(8, Types.BIGINT); - stmt.setInt(9, reference.getType().getDatabaseValue()); + stmt.setNull(7, Types.BIGINT); + stmt.setInt(8, reference.getType().getDatabaseValue()); } - return super.doImport(property, propertyId, parentId, rootId, featureId); + return super.doImport(property, propertyId, parentId, featureId); } } diff --git a/citydb-operation/src/main/java/org/citydb/operation/importer/property/AppearancePropertyImporter.java b/citydb-operation/src/main/java/org/citydb/operation/importer/property/AppearancePropertyImporter.java index 0859165c..3c9f75f2 100644 --- a/citydb-operation/src/main/java/org/citydb/operation/importer/property/AppearancePropertyImporter.java +++ b/citydb-operation/src/main/java/org/citydb/operation/importer/property/AppearancePropertyImporter.java @@ -40,25 +40,25 @@ public AppearancePropertyImporter(ImportHelper helper) throws SQLException { @Override protected String getInsertStatement() { return "insert into " + tableHelper.getPrefixedTableName(table) + - "(id, feature_id, parent_id, root_id, datatype_id, namespace_id, name, " + + "(id, feature_id, parent_id, datatype_id, namespace_id, name, " + "val_appearance_id) " + - "values (" + String.join(",", Collections.nCopies(8, "?")) + ")"; + "values (" + String.join(",", Collections.nCopies(7, "?")) + ")"; } public PropertyDescriptor doImport(AppearanceProperty property, long featureId) throws ImportException, SQLException { long propertyId = nextSequenceValue(Sequence.PROPERTY); - return doImport(property, propertyId, propertyId, propertyId, featureId); + return doImport(property, propertyId, propertyId, featureId); } - PropertyDescriptor doImport(AppearanceProperty property, long parentId, long rootId, long featureId) throws ImportException, SQLException { - return doImport(property, nextSequenceValue(Sequence.PROPERTY), parentId, rootId, featureId); + PropertyDescriptor doImport(AppearanceProperty property, long parentId, long featureId) throws ImportException, SQLException { + return doImport(property, nextSequenceValue(Sequence.PROPERTY), parentId, featureId); } - PropertyDescriptor doImport(AppearanceProperty property, long propertyId, long parentId, long rootId, long featureId) throws ImportException, SQLException { - stmt.setLong(8, tableHelper.getOrCreateImporter(AppearanceImporter.class) + PropertyDescriptor doImport(AppearanceProperty property, long propertyId, long parentId, long featureId) throws ImportException, SQLException { + stmt.setLong(7, tableHelper.getOrCreateImporter(AppearanceImporter.class) .doImport(property.getObject(), featureId, AppearanceImporter.Type.FEATURE) .getId()); - return super.doImport(property, propertyId, parentId, rootId, featureId); + return super.doImport(property, propertyId, parentId, featureId); } } diff --git a/citydb-operation/src/main/java/org/citydb/operation/importer/property/AttributeImporter.java b/citydb-operation/src/main/java/org/citydb/operation/importer/property/AttributeImporter.java index abe71d6d..57329bba 100644 --- a/citydb-operation/src/main/java/org/citydb/operation/importer/property/AttributeImporter.java +++ b/citydb-operation/src/main/java/org/citydb/operation/importer/property/AttributeImporter.java @@ -42,48 +42,48 @@ public AttributeImporter(ImportHelper helper) throws SQLException { @Override protected String getInsertStatement() { return "insert into " + tableHelper.getPrefixedTableName(table) + - "(id, feature_id, parent_id, root_id, datatype_id, namespace_id, name, " + + "(id, feature_id, parent_id, datatype_id, namespace_id, name, " + "val_int, val_double, val_string, val_timestamp, val_uri, val_codespace, val_uom, val_array, " + "val_content, val_content_mime_type) " + - "values (" + String.join(",", Collections.nCopies(17, "?")) + ")"; + "values (" + String.join(",", Collections.nCopies(16, "?")) + ")"; } public PropertyDescriptor doImport(Attribute attribute, long featureId) throws ImportException, SQLException { long propertyId = nextSequenceValue(Sequence.PROPERTY); - return doImport(attribute, propertyId, propertyId, propertyId, featureId); + return doImport(attribute, propertyId, propertyId, featureId); } - PropertyDescriptor doImport(Attribute attribute, long parentId, long rootId, long featureId) throws ImportException, SQLException { - return doImport(attribute, nextSequenceValue(Sequence.PROPERTY), parentId, rootId, featureId); + PropertyDescriptor doImport(Attribute attribute, long parentId, long featureId) throws ImportException, SQLException { + return doImport(attribute, nextSequenceValue(Sequence.PROPERTY), parentId, featureId); } - private PropertyDescriptor doImport(Attribute attribute, long propertyId, long parentId, long rootId, long featureId) throws ImportException, SQLException { + private PropertyDescriptor doImport(Attribute attribute, long propertyId, long parentId, long featureId) throws ImportException, SQLException { Long intValue = attribute.getIntValue().orElse(null); if (intValue != null) { - stmt.setLong(8, intValue); + stmt.setLong(7, intValue); } else { - stmt.setNull(8, Types.BIGINT); + stmt.setNull(7, Types.BIGINT); } Double doubleValue = attribute.getDoubleValue().orElse(null); if (doubleValue != null) { - stmt.setDouble(9, doubleValue); + stmt.setDouble(8, doubleValue); } else { - stmt.setNull(9, Types.DOUBLE); + stmt.setNull(8, Types.DOUBLE); } - stmt.setString(10, attribute.getStringValue().orElse(null)); + stmt.setString(9, attribute.getStringValue().orElse(null)); OffsetDateTime timestamp = attribute.getTimeStamp().orElse(null); if (timestamp != null) { - stmt.setObject(11, timestamp); + stmt.setObject(10, timestamp); } else { - stmt.setNull(11, Types.TIMESTAMP); + stmt.setNull(10, Types.TIMESTAMP); } - stmt.setString(12, attribute.getURI().orElse(null)); - stmt.setString(13, attribute.getCodeSpace().orElse(null)); - stmt.setString(14, attribute.getUom().orElse(null)); + stmt.setString(11, attribute.getURI().orElse(null)); + stmt.setString(12, attribute.getCodeSpace().orElse(null)); + stmt.setString(13, attribute.getUom().orElse(null)); String arrayValue = attribute.getArrayValue() .map(array -> JSONArray.copyOf(array.getValues().stream() @@ -91,35 +91,35 @@ private PropertyDescriptor doImport(Attribute attribute, long propertyId, long p .collect(Collectors.toList())).toString()) .orElse(null); if (arrayValue != null) { - stmt.setObject(15, arrayValue, Types.OTHER); + stmt.setObject(14, arrayValue, Types.OTHER); } else { - stmt.setNull(15, Types.OTHER); + stmt.setNull(14, Types.OTHER); } - stmt.setString(16, attribute.getGenericContent().orElse(null)); - stmt.setString(17, attribute.getGenericContentMimeType().orElse(null)); + stmt.setString(15, attribute.getGenericContent().orElse(null)); + stmt.setString(16, attribute.getGenericContentMimeType().orElse(null)); - PropertyDescriptor descriptor = super.doImport(attribute, propertyId, parentId, rootId, featureId); + PropertyDescriptor descriptor = super.doImport(attribute, propertyId, parentId, featureId); if (attribute.hasProperties()) { for (Property property : attribute.getProperties().getAll()) { if (property instanceof Attribute) { - doImport((Attribute) property, parentId, rootId, featureId); + doImport((Attribute) property, parentId, featureId); } else if (property instanceof FeatureProperty) { tableHelper.getOrCreateImporter(FeaturePropertyImporter.class) - .doImport((FeatureProperty) property, parentId, rootId, featureId); + .doImport((FeatureProperty) property, parentId, featureId); } else if (property instanceof GeometryProperty) { tableHelper.getOrCreateImporter(GeometryPropertyImporter.class) - .doImport((GeometryProperty) property, parentId, rootId, featureId); + .doImport((GeometryProperty) property, parentId, featureId); } else if (property instanceof ImplicitGeometryProperty) { tableHelper.getOrCreateImporter(ImplicitGeometryPropertyImporter.class) - .doImport((ImplicitGeometryProperty) property, parentId, rootId, featureId); + .doImport((ImplicitGeometryProperty) property, parentId, featureId); } else if (property instanceof AppearanceProperty) { tableHelper.getOrCreateImporter(AppearancePropertyImporter.class) - .doImport((AppearanceProperty) property, parentId, rootId, featureId); + .doImport((AppearanceProperty) property, parentId, featureId); } else if (property instanceof AddressProperty) { tableHelper.getOrCreateImporter(AddressPropertyImporter.class) - .doImport((AddressProperty) property, parentId, rootId, featureId); + .doImport((AddressProperty) property, parentId, featureId); } } } diff --git a/citydb-operation/src/main/java/org/citydb/operation/importer/property/FeaturePropertyImporter.java b/citydb-operation/src/main/java/org/citydb/operation/importer/property/FeaturePropertyImporter.java index 1bd98433..1a05d74f 100644 --- a/citydb-operation/src/main/java/org/citydb/operation/importer/property/FeaturePropertyImporter.java +++ b/citydb-operation/src/main/java/org/citydb/operation/importer/property/FeaturePropertyImporter.java @@ -44,34 +44,34 @@ public FeaturePropertyImporter(ImportHelper helper) throws SQLException { @Override protected String getInsertStatement() { return "insert into " + tableHelper.getPrefixedTableName(table) + - "(id, feature_id, parent_id, root_id, datatype_id, namespace_id, name, " + + "(id, feature_id, parent_id, datatype_id, namespace_id, name, " + "val_feature_id, val_reference_type) " + - "values (" + String.join(",", Collections.nCopies(9, "?")) + ")"; + "values (" + String.join(",", Collections.nCopies(8, "?")) + ")"; } public PropertyDescriptor doImport(FeatureProperty property, long featureId) throws ImportException, SQLException { long propertyId = nextSequenceValue(Sequence.PROPERTY); - return doImport(property, propertyId, propertyId, propertyId, featureId); + return doImport(property, propertyId, propertyId, featureId); } - PropertyDescriptor doImport(FeatureProperty property, long parentId, long rootId, long featureId) throws ImportException, SQLException { - return doImport(property, nextSequenceValue(Sequence.PROPERTY), parentId, rootId, featureId); + PropertyDescriptor doImport(FeatureProperty property, long parentId, long featureId) throws ImportException, SQLException { + return doImport(property, nextSequenceValue(Sequence.PROPERTY), parentId, featureId); } - private PropertyDescriptor doImport(FeatureProperty property, long propertyId, long parentId, long rootId, long featureId) throws ImportException, SQLException { + private PropertyDescriptor doImport(FeatureProperty property, long propertyId, long parentId, long featureId) throws ImportException, SQLException { Feature feature = property.getObject().orElse(null); if (feature != null) { - stmt.setLong(8, tableHelper.getOrCreateImporter(FeatureImporter.class) + stmt.setLong(7, tableHelper.getOrCreateImporter(FeatureImporter.class) .doImport(feature) .getId()); - stmt.setNull(9, Types.INTEGER); + stmt.setNull(8, Types.INTEGER); } else if (property.getReference().isPresent()) { Reference reference = property.getReference().get(); cacheReference(CacheType.FEATURE, reference, propertyId); - stmt.setNull(8, Types.BIGINT); - stmt.setInt(9, reference.getType().getDatabaseValue()); + stmt.setNull(7, Types.BIGINT); + stmt.setInt(8, reference.getType().getDatabaseValue()); } - return super.doImport(property, propertyId, parentId, rootId, featureId); + return super.doImport(property, propertyId, parentId, featureId); } } diff --git a/citydb-operation/src/main/java/org/citydb/operation/importer/property/GeometryPropertyImporter.java b/citydb-operation/src/main/java/org/citydb/operation/importer/property/GeometryPropertyImporter.java index 39b0ee23..95b3cd4c 100644 --- a/citydb-operation/src/main/java/org/citydb/operation/importer/property/GeometryPropertyImporter.java +++ b/citydb-operation/src/main/java/org/citydb/operation/importer/property/GeometryPropertyImporter.java @@ -40,26 +40,26 @@ public GeometryPropertyImporter(ImportHelper helper) throws SQLException { @Override protected String getInsertStatement() { return "insert into " + tableHelper.getPrefixedTableName(table) + - "(id, feature_id, parent_id, root_id, datatype_id, namespace_id, name, " + + "(id, feature_id, parent_id, datatype_id, namespace_id, name, " + "val_lod, val_geometry_id) " + - "values (" + String.join(",", Collections.nCopies(9, "?")) + ")"; + "values (" + String.join(",", Collections.nCopies(8, "?")) + ")"; } public PropertyDescriptor doImport(GeometryProperty property, long featureId) throws ImportException, SQLException { long propertyId = nextSequenceValue(Sequence.PROPERTY); - return doImport(property, propertyId, propertyId, propertyId, featureId); + return doImport(property, propertyId, propertyId, featureId); } - PropertyDescriptor doImport(GeometryProperty property, long parentId, long rootId, long featureId) throws ImportException, SQLException { - return doImport(property, nextSequenceValue(Sequence.PROPERTY), parentId, rootId, featureId); + PropertyDescriptor doImport(GeometryProperty property, long parentId, long featureId) throws ImportException, SQLException { + return doImport(property, nextSequenceValue(Sequence.PROPERTY), parentId, featureId); } - PropertyDescriptor doImport(GeometryProperty property, long propertyId, long parentId, long rootId, long featureId) throws ImportException, SQLException { - stmt.setString(8, property.getLod().orElse(null)); - stmt.setLong(9, tableHelper.getOrCreateImporter(GeometryImporter.class) + PropertyDescriptor doImport(GeometryProperty property, long propertyId, long parentId, long featureId) throws ImportException, SQLException { + stmt.setString(7, property.getLod().orElse(null)); + stmt.setLong(8, tableHelper.getOrCreateImporter(GeometryImporter.class) .doImport(property.getObject(), false, featureId) .getId()); - return super.doImport(property, propertyId, parentId, rootId, featureId); + return super.doImport(property, propertyId, parentId, featureId); } } diff --git a/citydb-operation/src/main/java/org/citydb/operation/importer/property/ImplicitGeometryPropertyImporter.java b/citydb-operation/src/main/java/org/citydb/operation/importer/property/ImplicitGeometryPropertyImporter.java index e788a95d..073c7ad6 100644 --- a/citydb-operation/src/main/java/org/citydb/operation/importer/property/ImplicitGeometryPropertyImporter.java +++ b/citydb-operation/src/main/java/org/citydb/operation/importer/property/ImplicitGeometryPropertyImporter.java @@ -45,41 +45,41 @@ public ImplicitGeometryPropertyImporter(ImportHelper helper) throws SQLException @Override protected String getInsertStatement() { return "insert into " + tableHelper.getPrefixedTableName(table) + - "(id, feature_id, parent_id, root_id, datatype_id, namespace_id, name, " + + "(id, feature_id, parent_id, datatype_id, namespace_id, name, " + "val_lod, val_implicitgeom_id, val_implicitgeom_refpoint, val_array, " + "val_reference_type) " + - "values (" + String.join(",", Collections.nCopies(12, "?")) + ")"; + "values (" + String.join(",", Collections.nCopies(11, "?")) + ")"; } public PropertyDescriptor doImport(ImplicitGeometryProperty property, long featureId) throws ImportException, SQLException { long propertyId = nextSequenceValue(Sequence.PROPERTY); - return doImport(property, propertyId, propertyId, propertyId, featureId); + return doImport(property, propertyId, propertyId, featureId); } - PropertyDescriptor doImport(ImplicitGeometryProperty property, long parentId, long rootId, long featureId) throws ImportException, SQLException { - return doImport(property, nextSequenceValue(Sequence.PROPERTY), parentId, rootId, featureId); + PropertyDescriptor doImport(ImplicitGeometryProperty property, long parentId, long featureId) throws ImportException, SQLException { + return doImport(property, nextSequenceValue(Sequence.PROPERTY), parentId, featureId); } - PropertyDescriptor doImport(ImplicitGeometryProperty property, long propertyId, long parentId, long rootId, long featureId) throws ImportException, SQLException { - stmt.setString(8, property.getLod().orElse(null)); + PropertyDescriptor doImport(ImplicitGeometryProperty property, long propertyId, long parentId, long featureId) throws ImportException, SQLException { + stmt.setString(7, property.getLod().orElse(null)); ImplicitGeometry implicitGeometry = property.getObject().orElse(null); if (implicitGeometry != null) { - stmt.setLong(9, tableHelper.getOrCreateImporter(ImplicitGeometryImporter.class) + stmt.setLong(8, tableHelper.getOrCreateImporter(ImplicitGeometryImporter.class) .doImport(implicitGeometry, featureId)); - stmt.setNull(12, Types.INTEGER); + stmt.setNull(11, Types.INTEGER); } else if (property.getReference().isPresent()) { Reference reference = property.getReference().get(); cacheReference(CacheType.IMPLICIT_GEOMETRY, reference, propertyId); - stmt.setNull(9, Types.BIGINT); - stmt.setInt(12, reference.getType().getDatabaseValue()); + stmt.setNull(8, Types.BIGINT); + stmt.setInt(11, reference.getType().getDatabaseValue()); } Object referencePoint = getGeometry(property.getReferencePoint().orElse(null), true); if (referencePoint != null) { - stmt.setObject(10, referencePoint, adapter.getGeometryAdapter().getGeometrySQLType()); + stmt.setObject(9, referencePoint, adapter.getGeometryAdapter().getGeometrySQLType()); } else { - stmt.setNull(10, adapter.getGeometryAdapter().getGeometrySQLType(), + stmt.setNull(9, adapter.getGeometryAdapter().getGeometrySQLType(), adapter.getGeometryAdapter().getGeometryTypeName()); } @@ -88,11 +88,11 @@ PropertyDescriptor doImport(ImplicitGeometryProperty property, long propertyId, .map(JSONArray::toString) .orElse(null); if (transformationMatrix != null) { - stmt.setObject(11, transformationMatrix, Types.OTHER); + stmt.setObject(10, transformationMatrix, Types.OTHER); } else { - stmt.setNull(11, Types.OTHER); + stmt.setNull(10, Types.OTHER); } - return super.doImport(property, propertyId, parentId, rootId, featureId); + return super.doImport(property, propertyId, parentId, featureId); } } diff --git a/citydb-operation/src/main/java/org/citydb/operation/importer/property/PropertyImporter.java b/citydb-operation/src/main/java/org/citydb/operation/importer/property/PropertyImporter.java index f6922a9e..55b00c79 100644 --- a/citydb-operation/src/main/java/org/citydb/operation/importer/property/PropertyImporter.java +++ b/citydb-operation/src/main/java/org/citydb/operation/importer/property/PropertyImporter.java @@ -37,7 +37,7 @@ public PropertyImporter(ImportHelper helper) throws SQLException { super(Table.PROPERTY, helper); } - PropertyDescriptor doImport(Property property, long propertyId, long parentId, long rootId, long featureId) throws ImportException, SQLException { + PropertyDescriptor doImport(Property property, long propertyId, long parentId, long featureId) throws ImportException, SQLException { stmt.setLong(1, propertyId); stmt.setLong(2, featureId); @@ -47,29 +47,26 @@ PropertyDescriptor doImport(Property property, long propertyId, long parentId stmt.setNull(3, Types.BIGINT); } - stmt.setLong(4, rootId); - Integer dataTypeId = property.getDataType().map(dataTypeHelper::getDataTypeId).orElse(null); if (dataTypeId != null) { - stmt.setInt(5, dataTypeId); + stmt.setInt(4, dataTypeId); } else { - stmt.setNull(5, Types.INTEGER); + stmt.setNull(4, Types.INTEGER); } Integer namespaceId = namespaceHelper.getNamespaceId(property.getName().getNamespace()); if (namespaceId != null) { - stmt.setInt(6, namespaceId); + stmt.setInt(5, namespaceId); } else { - stmt.setNull(6, Types.INTEGER); + stmt.setNull(5, Types.INTEGER); } - stmt.setString(7, property.getName().getLocalName()); + stmt.setString(6, property.getName().getLocalName()); addBatch(); PropertyDescriptor descriptor = PropertyDescriptor.of(propertyId, featureId) - .setParentId(parentId != propertyId ? parentId : 0) - .setRootId(rootId); + .setParentId(parentId != propertyId ? parentId : 0); property.setDescriptor(descriptor); return descriptor;