Examples of SeUpdate


Examples of com.esri.sde.sdk.client.SeUpdate

    private void updateRow(final SimpleFeature modifiedFeature) throws IOException {

        final SeLayer layer = getLayer();
        final SeCoordinateReference seCoordRef = layer == null ? null : layer.getCoordRef();

        final SeUpdate updateStream = (SeUpdate) createStream(SeUpdate.class);
        // updateStream.setWriteMode(true);

        final LinkedHashMap<Integer, String> mutableColumns = getUpdatableColumnNames();
        final String[] rowColumnNames = new ArrayList<String>(mutableColumns.values())
                .toArray(new String[0]);
        final String typeName = featureType.getTypeName();
        final String fid = modifiedFeature.getID();
        final long numericFid = ArcSDEAdapter.getNumericFid(fid);
        final SeObjectId seObjectId = new SeObjectId(numericFid);

        final Command<Void> updateCmd = new Command<Void>() {
            @Override
            public Void execute(ISession session, SeConnection connection) throws SeException,
                    IOException {
                try {
                    final SeRow row = updateStream.singleRow(seObjectId, typeName, rowColumnNames);

                    setRowProperties(modifiedFeature, seCoordRef, mutableColumns, row);
                    updateStream.execute();
                    // updateStream.flushBufferedWrites();
                } finally {
                    updateStream.close();
                }
                return null;
            }
        };
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.