public ObjectResult deleteObject ( SpiderTransaction parentTran , String objID ) { ObjectResult result = new ObjectResult ( objID ) ; try { result . setObjectID ( objID ) ; DBObject dbObj = SpiderService . instance ( ) . getObject ( m_tableDef , objID ) ; if ( dbObj != null ) { deleteObject ( dbObj ) ; result . setUpdated ( true ) ; parentTran . mergeSubTransaction ( m_dbTran ) ; m_logger . trace ( "deleteObject(): object deleted with ID={}" , objID ) ; } else { result . setComment ( "Object not found" ) ; m_logger . trace ( "deleteObject(): no object with ID={}" , objID ) ; } } catch ( Throwable ex ) { buildErrorStatus ( result , objID , ex ) ; } return result ; }
Delete the object with the given object ID . Because of idempotent update semantics it is not an error if the object does not exist . If an object is actually deleted updates are merged to the given parent SpiderTransaction .