PersonController.java
@DeleteMapping("/{id}")
	@ApiOperation(value = "Removes a user specified person from the database", response = boolean.class)
	@ApiResponses(value = {
			@ApiResponse(code = 200, message = "Address was removed"),
			@ApiResponse(code = 404, message = "Address not found"),
			@ApiResponse(code = 500, message = "Backend error")})
	public ResponseEntity deletePerson(@PathVariable int id) {
		try {
			BackendHelper helper = new BackendHelper();
			boolean exists = helper.exisits(conn, personHelper.get(conn, id));
			if(exists) {
				boolean removed = personHelper.delete(conn, id); //Creates a boolean and removes the person from the database
				if(removed) { //Makes sure the backend removed the person
					return new ResponseEntity(HttpStatus.OK); //Returns true
				}else {
					throw new AddressException(HttpStatus.INTERNAL_SERVER_ERROR, bundle.getString("person_not_deleted"));
				}
			}else {
				throw new AddressException(HttpStatus.NOT_FOUND, bundle.getString("person_not_found"));
			}
		}catch(AddressException e) {
			e.printStackTrace();
			return new ResponseEntity<String>(e.getMessage(), e.getHttp());
		}
	}
/**
	 * Removes a user specified person from the database
	 * @param id ID of the person to be removed
	 * @return True if person removed otherwise false
	 */
Removes a user specified person from the database
@param id ID of the person to be removed
@return True if person removed otherwise false
Removes a user specified person from the database @param id ID of the person to be removed @return True if person removed otherwise false
@DeleteMapping("/{id}")
	@ApiOperation(value = "Removes a user specified person from the database", response = boolean.class)
	@ApiResponses(value = {
			@ApiResponse(code = 200, message = "Address was removed"),
			@ApiResponse(code = 404, message = "Address not found"),
			@ApiResponse(code = 500, message = "Backend error")})
	public ResponseEntity deletePerson(@PathVariable int id) {
		try {
			BackendHelper helper = new BackendHelper();
			boolean exists = helper.exisits(conn, personHelper.get(conn, id));
			if(exists) {
				boolean removed = personHelper.delete(conn, id); 
				if(removed) { 
					return new ResponseEntity(HttpStatus.OK); 
				}else {
					throw new AddressException(HttpStatus.INTERNAL_SERVER_ERROR, bundle.getString("person_not_deleted"));
				}
			}else {
				throw new AddressException(HttpStatus.NOT_FOUND, bundle.getString("person_not_found"));
			}
		}catch(AddressException e) {
			e.printStackTrace();
			return new ResponseEntity<String>(e.getMessage(), e.getHttp());
		}
	}
@ DeleteMapping ( "/{id}" ) @ ApiOperation ( value = "Removes a user specified person from the database" , response = boolean . class ) @ ApiResponses ( value = { @ ApiResponse ( code = 200 , message = "Address was removed" ) , @ ApiResponse ( code = 404 , message = "Address not found" ) , @ ApiResponse ( code = 500 , message = "Backend error" ) } ) public ResponseEntity deletePerson ( @ PathVariable int id ) { try { BackendHelper helper = new BackendHelper ( ) ; boolean exists = helper . exisits ( conn , personHelper . get ( conn , id ) ) ; if ( exists ) { boolean removed = personHelper . delete ( conn , id ) ; if ( removed ) { return new ResponseEntity ( HttpStatus . OK ) ; } else { throw new AddressException ( HttpStatus . INTERNAL_SERVER_ERROR , bundle . getString ( "person_not_deleted" ) ) ; } } else { throw new AddressException ( HttpStatus . NOT_FOUND , bundle . getString ( "person_not_found" ) ) ; } } catch ( AddressException e ) { e . printStackTrace ( ) ; return new ResponseEntity < String > ( e . getMessage ( ) , e . getHttp ( ) ) ; } }
Removes a user specified person from the database
 @param id ID of the person to be removed
 @return True if person removed otherwise false
Removes a user specified person from the database @param id ID of the person to be removed @return True if person removed otherwise false
//Creates a boolean and removes the person from the database //Makes sure the backend removed the person //Returns true