// Path: app/src/main/java/com/tylersuehr/cleanarchitecture/data/models/Person.java
// public class Person extends Entity {
//     private String firstName;
//     private String lastName;
//     private String image;
//     private int age;
// 
// 
//     public Person() {}
// 
//     @Override
//     public String getId() {
//         return (String)super.getId();
//     }
// 
//     public String getFirstName() {
//         return firstName;
//     }
// 
//     public void setFirstName(String firstName) {
//         this.firstName = firstName;
//     }
// 
//     public String getLastName() {
//         return lastName;
//     }
// 
//     public void setLastName(String lastName) {
//         this.lastName = lastName;
//     }
// 
//     public int getAge() {
//         return age;
//     }
// 
//     public void setAge(int age) {
//         this.age = age;
//     }
// 
//     public String getImage() {
//         return image;
//     }
// 
//     public void setImage(String image) {
//         this.image = image;
//     }
// }
// 
// Path: app/src/main/java/com/tylersuehr/cleanarchitecture/data/repositories/people/IPersonRepository.java
// public interface IPersonRepository {
//     /**
//      * Creates a new person in the repository.
//      * @param person {@link Person}
//      * @throws Exception if create fails
//      */
//     void createPerson(Person person) throws Exception;
// 
//     /**
//      * Deletes a person in the repository. Leave null to delete all
//      * people in the repository.
//      * @param person {@link Person}
//      *
//      * @throws Exception if deletion fails
//      */
//     void deletePerson(@Nullable Person person) throws Exception;
// 
//     /**
//      * Finds all people in the repository.
//      * @param callback {@link Callbacks.IList}
//      */
//     void findAllPeople(Callbacks.IList<Person> callback);
// 
//     /**
//      * Finds a person in the repository using their profile ID.
//      * @param personId Person's profile ID
//      * @param callback {@link Callbacks.ISingle}
//      */
//     void findPersonById(String personId, Callbacks.ISingle<Person> callback);
// }
// 
// Path: app/src/main/java/com/tylersuehr/cleanarchitecture/domain/UseCase.java
// public abstract class UseCase<Request, Response> {
//     private UseCaseCallback<Response> callback;
//     private Request request;
// 
// 
//     @WorkerThread
//     protected abstract void onExecute();
// 
//     /**
//      * Passes the use case by logging it and invoking the appropriate callback
//      * with the response data from the successful execution.
//      * @param response Response data
//      */
//     protected final void pass(final Response response) {
//         Log.i(getClass().getSimpleName().toUpperCase(), "Success!");
//         this.callback.onSuccess(response);
//     }
// 
//     /**
//      * Fails the use case by logging it and invoking the appropriate callback
//      * containing information about by it fail execution.
//      * @param ex {@link Exception}
//      */
//     protected final void fail(final Exception ex) {
//         Log.wtf(getClass().getSimpleName().toUpperCase(), "Failed!", ex);
//         this.callback.onFailure(ex);
//     }
// 
//     public Request getRequest() {
//         return request;
//     }
// 
//     void setRequest(final Request request) {
//         this.request = request;
//     }
// 
//     void setCallback(final UseCaseCallback<Response> callback) {
//         this.callback = callback;
//     }
// }


import com.tylersuehr.cleanarchitecture.data.models.Person;
import com.tylersuehr.cleanarchitecture.data.repositories.people.IPersonRepository;
import com.tylersuehr.cleanarchitecture.domain.UseCase;
package com.tylersuehr.cleanarchitecture.domain.people;

/**
 * Copyright 2017 Tyler Suehr
 *
 * Business logic to delete a person in the repository.
 * Request: Valid {@link Person}.
 * Response: Valid {@link Person}.
 *
 * @author Tyler Suehr
 * @version 1.0
 */
public class DeletePersonTask extends UseCase<Person, Person> {
    private final IPersonRepository personRepo;


    public DeletePersonTask(IPersonRepository personRepo) {
        this.personRepo = personRepo;
    }

    @Override
// Path: app/src/main/java/com/tylersuehr/cleanarchitecture/data/models/Person.java
// public class Person extends Entity {
//     private String firstName;
//     private String lastName;
//     private String image;
//     private int age;
// 
// 
//     public Person() {}
// 
//     @Override
//     public String getId() {
//         return (String)super.getId();
//     }
// 
//     public String getFirstName() {
//         return firstName;
//     }
// 
//     public void setFirstName(String firstName) {
//         this.firstName = firstName;
//     }
// 
//     public String getLastName() {
//         return lastName;
//     }
// 
//     public void setLastName(String lastName) {
//         this.lastName = lastName;
//     }
// 
//     public int getAge() {
//         return age;
//     }
// 
//     public void setAge(int age) {
//         this.age = age;
//     }
// 
//     public String getImage() {
//         return image;
//     }
// 
//     public void setImage(String image) {
//         this.image = image;
//     }
// }
// 
// Path: app/src/main/java/com/tylersuehr/cleanarchitecture/data/repositories/people/IPersonRepository.java
// public interface IPersonRepository {
//     /**
//      * Creates a new person in the repository.
//      * @param person {@link Person}
//      * @throws Exception if create fails
//      */
//     void createPerson(Person person) throws Exception;
// 
//     /**
//      * Deletes a person in the repository. Leave null to delete all
//      * people in the repository.
//      * @param person {@link Person}
//      *
//      * @throws Exception if deletion fails
//      */
//     void deletePerson(@Nullable Person person) throws Exception;
// 
//     /**
//      * Finds all people in the repository.
//      * @param callback {@link Callbacks.IList}
//      */
//     void findAllPeople(Callbacks.IList<Person> callback);
// 
//     /**
//      * Finds a person in the repository using their profile ID.
//      * @param personId Person's profile ID
//      * @param callback {@link Callbacks.ISingle}
//      */
//     void findPersonById(String personId, Callbacks.ISingle<Person> callback);
// }
// 
// Path: app/src/main/java/com/tylersuehr/cleanarchitecture/domain/UseCase.java
// public abstract class UseCase<Request, Response> {
//     private UseCaseCallback<Response> callback;
//     private Request request;
// 
// 
//     @WorkerThread
//     protected abstract void onExecute();
// 
//     /**
//      * Passes the use case by logging it and invoking the appropriate callback
//      * with the response data from the successful execution.
//      * @param response Response data
//      */
//     protected final void pass(final Response response) {
//         Log.i(getClass().getSimpleName().toUpperCase(), "Success!");
//         this.callback.onSuccess(response);
//     }
// 
//     /**
//      * Fails the use case by logging it and invoking the appropriate callback
//      * containing information about by it fail execution.
//      * @param ex {@link Exception}
//      */
//     protected final void fail(final Exception ex) {
//         Log.wtf(getClass().getSimpleName().toUpperCase(), "Failed!", ex);
//         this.callback.onFailure(ex);
//     }
// 
//     public Request getRequest() {
//         return request;
//     }
// 
//     void setRequest(final Request request) {
//         this.request = request;
//     }
// 
//     void setCallback(final UseCaseCallback<Response> callback) {
//         this.callback = callback;
//     }
// }


// Path: app/src/main/java/com/tylersuehr/cleanarchitecture/domain/people/DeletePersonTask.java
import com.tylersuehr.cleanarchitecture.data.models.Person;
import com.tylersuehr.cleanarchitecture.data.repositories.people.IPersonRepository;
import com.tylersuehr.cleanarchitecture.domain.UseCase;

package com.tylersuehr.cleanarchitecture.domain.people;

/**
 * Copyright 2017 Tyler Suehr
 *
 * Business logic to delete a person in the repository.
 * Request: Valid {@link Person}.
 * Response: Valid {@link Person}.
 *
 * @author Tyler Suehr
 * @version 1.0
 */
public class DeletePersonTask extends UseCase<Person, Person> {
    private final IPersonRepository personRepo;


    public DeletePersonTask(IPersonRepository personRepo) {
        this.personRepo = personRepo;
    }

    @Override
    protected void onExecute() {