service/transportation-service/src/main/java/org/bananaforscale/transportation/rest/resource/AirplaneResource.java
@DELETE
    @Path("{id}")
    @Produces(MediaType.APPLICATION_JSON)
    public Response deleteById(@PathParam("id") Integer id) {
        Boolean success = apm.delete(id);
        if (success) {
            return Response.ok(JsonUtil.createSuccessMessage("The airplane was successfully deleted")).build();
        } else {
            return Response.ok(JsonUtil.createErrorMessage("An error occurred while deleting the airplane"))
                    .status(Response.Status.INTERNAL_SERVER_ERROR).build();
        }
    }
/**
     * Deletes an airplane by it's identifier.
     *
     * @param id the identifier of the airplane
     * @return Response whether the operation was successful
     */
Deletes an airplane by it's identifier.
@param id the identifier of the airplane
@return Response whether the operation was successful
Deletes an airplane by it ' s identifier . @param id the identifier of the airplane @return Response whether the operation was successful
@DELETE
    @Path("{id}")
    @Produces(MediaType.APPLICATION_JSON)
    public Response deleteById(@PathParam("id") Integer id) {
        Boolean success = apm.delete(id);
        if (success) {
            return Response.ok(JsonUtil.createSuccessMessage("The airplane was successfully deleted")).build();
        } else {
            return Response.ok(JsonUtil.createErrorMessage("An error occurred while deleting the airplane"))
                    .status(Response.Status.INTERNAL_SERVER_ERROR).build();
        }
    }
@ DELETE @ Path ( "{id}" ) @ Produces ( MediaType . APPLICATION_JSON ) public Response deleteById ( @ PathParam ( "id" ) Integer id ) { Boolean success = apm . delete ( id ) ; if ( success ) { return Response . ok ( JsonUtil . createSuccessMessage ( "The airplane was successfully deleted" ) ) . build ( ) ; } else { return Response . ok ( JsonUtil . createErrorMessage ( "An error occurred while deleting the airplane" ) ) . status ( Response . Status . INTERNAL_SERVER_ERROR ) . build ( ) ; } }
Deletes an airplane by it's identifier.
Deletes an airplane by it ' s identifier .