// 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/Callbacks.java
// public interface Callbacks {
//     /**
//      * Defines an interface for handling an error callback.
//      */
//     interface IError {
//         void onNotAvailable(Exception ex);
//     }
// 
//     /**
//      * Defines an interface for handling a single response callback.
//      */
//     interface ISingle<T extends Entity> extends IError {
//         void onSingleLoaded(T value);
//     }
// 
//     /**
//      * Defines an interface for handling a list response callback.
//      */
//     interface IList<T extends Entity> extends IError {
//         void onListLoaded(List<T> values);
//     }
// }


import com.tylersuehr.cleanarchitecture.data.models.Person;
import com.tylersuehr.cleanarchitecture.data.repositories.Callbacks;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
package com.tylersuehr.cleanarchitecture.data.repositories.people;


/**
 * Copyright 2017 Tyler Suehr
 *
 * This manages all data sources for {@link IPersonRepository}.
 * Note: you can make as many repositories as needed for different data sources.
 *
 * @author Tyler Suehr
 * @version 1.0
 */
public final class PersonRepository implements IPersonRepository {
    private static volatile PersonRepository instance;
    private final IPersonRepository local;

    private boolean invalidCache = false;
// 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/Callbacks.java
// public interface Callbacks {
//     /**
//      * Defines an interface for handling an error callback.
//      */
//     interface IError {
//         void onNotAvailable(Exception ex);
//     }
// 
//     /**
//      * Defines an interface for handling a single response callback.
//      */
//     interface ISingle<T extends Entity> extends IError {
//         void onSingleLoaded(T value);
//     }
// 
//     /**
//      * Defines an interface for handling a list response callback.
//      */
//     interface IList<T extends Entity> extends IError {
//         void onListLoaded(List<T> values);
//     }
// }


// Path: app/src/main/java/com/tylersuehr/cleanarchitecture/data/repositories/people/PersonRepository.java
import com.tylersuehr.cleanarchitecture.data.models.Person;
import com.tylersuehr.cleanarchitecture.data.repositories.Callbacks;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

package com.tylersuehr.cleanarchitecture.data.repositories.people;


/**
 * Copyright 2017 Tyler Suehr
 *
 * This manages all data sources for {@link IPersonRepository}.
 * Note: you can make as many repositories as needed for different data sources.
 *
 * @author Tyler Suehr
 * @version 1.0
 */
public final class PersonRepository implements IPersonRepository {
    private static volatile PersonRepository instance;
    private final IPersonRepository local;

    private boolean invalidCache = false;
    private Map<String, Person> cache;