Examples of SeDelete


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

        final String id = feature.getID();
        final long featureId = ArcSDEAdapter.getNumericFid(id);
        final SeObjectId objectID = new SeObjectId(featureId);
        final String qualifiedName = featureType.getTypeName();

        final SeDelete seDelete = (SeDelete) createStream(SeDelete.class);

        final Command<Void> deleteCmd = new Command<Void>() {
            @Override
            public Void execute(ISession session, SeConnection connection) throws SeException,
                    IOException {
                try {
                    // A call to SeDelete.byId immediately deletes the row from the
                    // database. The application does not need to call execute()
                    // try{
                    seDelete.byId(qualifiedName, objectID);
                    // }catch(SeException e){
                    // final int FID_DOESNT_EXIST = -22;
                    // if(e.getSeError().getSdeError() == FID_DOESNT_EXIST){
                    // //ignore
                    // }else{
                    // throw e;
                    // }
                    // }
                    versionHandler.editOperationWritten(seDelete);
                    if (handleTransaction) {
                        session.commitTransaction();
                    }
                } catch (IOException e) {
                    if (handleTransaction) {
                        try {
                            session.rollbackTransaction();
                        } catch (IOException e1) {
                            LOGGER.log(Level.SEVERE, "Unrecoverable error rolling "
                                    + "back delete transaction", e);
                        }
                    }
                    throw new DataSourceException("Error deleting feature with id:" + featureId, e);
                } finally {
                    if (seDelete != null) {
                        try {
                            seDelete.close();
                        } catch (SeException e) {
                            LOGGER.log(Level.SEVERE,
                                    "Unrecoverable error rolling back delete transaction", e);
                        }
                    }
View Full Code Here

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

        session.issue(new Command<Void>() {
            @Override
            public Void execute(ISession session, SeConnection connection) throws SeException,
                    IOException {
                SeDelete delete = new SeDelete(connection);
                delete.byId(typeName, new SeObjectId(rowId));
                delete.close();
                return null;
            }
        });

        final String whereClause = "ROW_ID=" + rowId;
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.