app/repository/DestinationPhotoRepository.java
public CompletionStage<Optional<Integer>> delete(int id) {
        return supplyAsync(() -> {
            Transaction txn = ebeanServer.beginTransaction();
            String deleteQuery = "delete from destination_photo where destination_photo_id = ?";
            SqlUpdate query = Ebean.createSqlUpdate(deleteQuery);
            query.setParameter(1, id);
            query.execute();
            txn.commit();
            return Optional.of(id);
        }, executionContext);
    }
/**
     * Delete an existing destination photo in the personal_photo table
     * @param id id of the destination photo to be deleted.
     * @return an optional of the destination photo image id that has been deleted
     */
Delete an existing destination photo in the personal_photo table
@param id id of the destination photo to be deleted.
@return an optional of the destination photo image id that has been deleted
Delete an existing destination photo in the personal_photo table @param id id of the destination photo to be deleted . @return an optional of the destination photo image id that has been deleted
public CompletionStage<Optional<Integer>> delete(int id) {
        return supplyAsync(() -> {
            Transaction txn = ebeanServer.beginTransaction();
            String deleteQuery = "delete from destination_photo where destination_photo_id = ?";
            SqlUpdate query = Ebean.createSqlUpdate(deleteQuery);
            query.setParameter(1, id);
            query.execute();
            txn.commit();
            return Optional.of(id);
        }, executionContext);
    }
public CompletionStage < Optional < Integer > > delete ( int id ) { return supplyAsync ( ( ) -> { Transaction txn = ebeanServer . beginTransaction ( ) ; String deleteQuery = "delete from destination_photo where destination_photo_id = ?" ; SqlUpdate query = Ebean . createSqlUpdate ( deleteQuery ) ; query . setParameter ( 1 , id ) ; query . execute ( ) ; txn . commit ( ) ; return Optional . of ( id ) ; } , executionContext ) ; }
Delete an existing destination photo in the personal_photo table
 @param id id of the destination photo to be deleted.
Delete an existing destination photo in the personal_photo table @param id id of the destination photo to be deleted .