// Path: Tamagotchi/src/com/redditandroiddevelopers/tamagotchi/model/Creature.java
// public class Creature extends CommonModel {
// 
//     public String name;
//     public CreatureType type;
//     public Date birthDate;
//     public Date deathDate;
//     public CreatureState state;
//     public boolean alive;
//     public Gender gender;
// 
//     /**
//      * A convenience method for testing
//      * 
//      * @return A basic creature object
//      */
//     public static Creature createDefaultCreature() {
//         CreatureType type = new CreatureType();
//         type.id = 1;
//         type.name = "Default";
// 
//         Creature c = new Creature();
//         c.name = "Default Creature";
//         c.type = type;
//         c.birthDate = new Date();
//         c.state = new CreatureState();
//         c.alive = true;
//         c.gender = Gender.FEMALE;
//         return c;
//     }
// 
//     /**
//      * Create A Creature Simple function to call when a person leaves the
//      * creature-creation screen, and gets used to save the creature.
//      * 
//      * @author Hannes Vermeire
//      * @return The creature.
//      */
//     public static Creature createCreature(String name, Gender gender,
//             CreatureType type) {
//         Creature c = new Creature();
//         c.name = name;
//         c.type = type;
//         c.birthDate = new Date();
//         c.gender = gender;
//         c.state = new CreatureState();
//         c.alive = true;
//         c.gender = gender;
//         return c;
//     }
// 
// }
// 
// Path: Tamagotchi/src/com/redditandroiddevelopers/tamagotchi/model/CreatureAction.java
// public class CreatureAction extends CommonModel {
//     public String name;
// }
// 
// Path: Tamagotchi/src/com/redditandroiddevelopers/tamagotchi/model/CreatureDebuff.java
// public class CreatureDebuff extends CommonModel {
//     public String name;
// }
// 
// Path: Tamagotchi/src/com/redditandroiddevelopers/tamagotchi/model/CreatureEvolution.java
// public class CreatureEvolution extends CommonModel {
// 
//     public CreatureType type;
//     public String name;
//     public int maxHealth;
//     public int maxBowel;
//     public int maxDiscipline;
//     public int maxHunger;
//     public int maxHappy;
//     public int currentXp;
// }
// 
// Path: Tamagotchi/src/com/redditandroiddevelopers/tamagotchi/model/CreatureRaiseType.java
// public class CreatureRaiseType extends CommonModel {
// 
//     public String name;
//     public double multiplier;
// }
// 
// Path: Tamagotchi/src/com/redditandroiddevelopers/tamagotchi/model/CreatureState.java
// public class CreatureState extends CommonModel {
// 
//     public Creature creature;
//     public CreatureRaiseType raiseType;
//     public Sickness sickness;
//     public int health;
//     public int bowel;
//     public int discipline;
//     public int hunger;
//     public int happy;
//     public boolean sick;
//     public int experience;
// }
// 
// Path: Tamagotchi/src/com/redditandroiddevelopers/tamagotchi/model/CreatureType.java
// public class CreatureType extends CommonModel {
// 
//     public String name;
// }
// 
// Path: Tamagotchi/src/com/redditandroiddevelopers/tamagotchi/model/ExperienceAction.java
// public class ExperienceAction extends CommonModel {
//     public CreatureType type;
//     public CreatureAction action;
//     public double modifier;
// }
// 
// Path: Tamagotchi/src/com/redditandroiddevelopers/tamagotchi/model/ExperienceDebuff.java
// public class ExperienceDebuff extends CommonModel {
//     public CreatureType type;
//     public CreatureDebuff debuff;
//     public double modifier;
// }
// 
// Path: Tamagotchi/src/com/redditandroiddevelopers/tamagotchi/model/Medicine.java
// public class Medicine extends CommonModel {
// 
//     public String name;
// }
// 
// Path: Tamagotchi/src/com/redditandroiddevelopers/tamagotchi/model/Sickness.java
// public class Sickness extends CommonModel{
// 
//     public Medicine medicine;
//     public String name;
// }


import android.content.ContentValues;
import com.redditandroiddevelopers.tamagotchi.model.Creature;
import com.redditandroiddevelopers.tamagotchi.model.CreatureAction;
import com.redditandroiddevelopers.tamagotchi.model.CreatureDebuff;
import com.redditandroiddevelopers.tamagotchi.model.CreatureEvolution;
import com.redditandroiddevelopers.tamagotchi.model.CreatureRaiseType;
import com.redditandroiddevelopers.tamagotchi.model.CreatureState;
import com.redditandroiddevelopers.tamagotchi.model.CreatureType;
import com.redditandroiddevelopers.tamagotchi.model.ExperienceAction;
import com.redditandroiddevelopers.tamagotchi.model.ExperienceDebuff;
import com.redditandroiddevelopers.tamagotchi.model.Medicine;
import com.redditandroiddevelopers.tamagotchi.model.Sickness;
package com.redditandroiddevelopers.tamagotchi.util;



public class ContentValueUtils {

    public static <T> ContentValues buildContentValues(T modelObj) {
        // this is ugly, a refactor would be pleasant
        if (modelObj instanceof Creature) {
            return buildCreature((Creature)modelObj);
        } else if (modelObj instanceof CreatureEvolution) {
            return buildCreatureEvolution((CreatureEvolution)modelObj);
        } else if (modelObj instanceof CreatureRaiseType) {
            return buildCreatureRaiseType((CreatureRaiseType)modelObj);
        } else if (modelObj instanceof CreatureState) {
            return buildCreatureState((CreatureState)modelObj);
        } else if (modelObj instanceof CreatureType) {
            return buildCreatureType((CreatureType)modelObj);
        } else if (modelObj instanceof Medicine) {
            return buildMedicine((Medicine)modelObj);
        } else if (modelObj instanceof Sickness) {
            return buildSickness((Sickness)modelObj);
        } else if (modelObj instanceof CreatureAction) {
            return buildCreatureAction((CreatureAction)modelObj);
        } else if(modelObj instanceof CreatureDebuff) {
// Path: Tamagotchi/src/com/redditandroiddevelopers/tamagotchi/model/Creature.java
// public class Creature extends CommonModel {
// 
//     public String name;
//     public CreatureType type;
//     public Date birthDate;
//     public Date deathDate;
//     public CreatureState state;
//     public boolean alive;
//     public Gender gender;
// 
//     /**
//      * A convenience method for testing
//      * 
//      * @return A basic creature object
//      */
//     public static Creature createDefaultCreature() {
//         CreatureType type = new CreatureType();
//         type.id = 1;
//         type.name = "Default";
// 
//         Creature c = new Creature();
//         c.name = "Default Creature";
//         c.type = type;
//         c.birthDate = new Date();
//         c.state = new CreatureState();
//         c.alive = true;
//         c.gender = Gender.FEMALE;
//         return c;
//     }
// 
//     /**
//      * Create A Creature Simple function to call when a person leaves the
//      * creature-creation screen, and gets used to save the creature.
//      * 
//      * @author Hannes Vermeire
//      * @return The creature.
//      */
//     public static Creature createCreature(String name, Gender gender,
//             CreatureType type) {
//         Creature c = new Creature();
//         c.name = name;
//         c.type = type;
//         c.birthDate = new Date();
//         c.gender = gender;
//         c.state = new CreatureState();
//         c.alive = true;
//         c.gender = gender;
//         return c;
//     }
// 
// }
// 
// Path: Tamagotchi/src/com/redditandroiddevelopers/tamagotchi/model/CreatureAction.java
// public class CreatureAction extends CommonModel {
//     public String name;
// }
// 
// Path: Tamagotchi/src/com/redditandroiddevelopers/tamagotchi/model/CreatureDebuff.java
// public class CreatureDebuff extends CommonModel {
//     public String name;
// }
// 
// Path: Tamagotchi/src/com/redditandroiddevelopers/tamagotchi/model/CreatureEvolution.java
// public class CreatureEvolution extends CommonModel {
// 
//     public CreatureType type;
//     public String name;
//     public int maxHealth;
//     public int maxBowel;
//     public int maxDiscipline;
//     public int maxHunger;
//     public int maxHappy;
//     public int currentXp;
// }
// 
// Path: Tamagotchi/src/com/redditandroiddevelopers/tamagotchi/model/CreatureRaiseType.java
// public class CreatureRaiseType extends CommonModel {
// 
//     public String name;
//     public double multiplier;
// }
// 
// Path: Tamagotchi/src/com/redditandroiddevelopers/tamagotchi/model/CreatureState.java
// public class CreatureState extends CommonModel {
// 
//     public Creature creature;
//     public CreatureRaiseType raiseType;
//     public Sickness sickness;
//     public int health;
//     public int bowel;
//     public int discipline;
//     public int hunger;
//     public int happy;
//     public boolean sick;
//     public int experience;
// }
// 
// Path: Tamagotchi/src/com/redditandroiddevelopers/tamagotchi/model/CreatureType.java
// public class CreatureType extends CommonModel {
// 
//     public String name;
// }
// 
// Path: Tamagotchi/src/com/redditandroiddevelopers/tamagotchi/model/ExperienceAction.java
// public class ExperienceAction extends CommonModel {
//     public CreatureType type;
//     public CreatureAction action;
//     public double modifier;
// }
// 
// Path: Tamagotchi/src/com/redditandroiddevelopers/tamagotchi/model/ExperienceDebuff.java
// public class ExperienceDebuff extends CommonModel {
//     public CreatureType type;
//     public CreatureDebuff debuff;
//     public double modifier;
// }
// 
// Path: Tamagotchi/src/com/redditandroiddevelopers/tamagotchi/model/Medicine.java
// public class Medicine extends CommonModel {
// 
//     public String name;
// }
// 
// Path: Tamagotchi/src/com/redditandroiddevelopers/tamagotchi/model/Sickness.java
// public class Sickness extends CommonModel{
// 
//     public Medicine medicine;
//     public String name;
// }


// Path: Tamagotchi-android/src/com/redditandroiddevelopers/tamagotchi/util/ContentValueUtils.java
import android.content.ContentValues;
import com.redditandroiddevelopers.tamagotchi.model.Creature;
import com.redditandroiddevelopers.tamagotchi.model.CreatureAction;
import com.redditandroiddevelopers.tamagotchi.model.CreatureDebuff;
import com.redditandroiddevelopers.tamagotchi.model.CreatureEvolution;
import com.redditandroiddevelopers.tamagotchi.model.CreatureRaiseType;
import com.redditandroiddevelopers.tamagotchi.model.CreatureState;
import com.redditandroiddevelopers.tamagotchi.model.CreatureType;
import com.redditandroiddevelopers.tamagotchi.model.ExperienceAction;
import com.redditandroiddevelopers.tamagotchi.model.ExperienceDebuff;
import com.redditandroiddevelopers.tamagotchi.model.Medicine;
import com.redditandroiddevelopers.tamagotchi.model.Sickness;

package com.redditandroiddevelopers.tamagotchi.util;



public class ContentValueUtils {

    public static <T> ContentValues buildContentValues(T modelObj) {
        // this is ugly, a refactor would be pleasant
        if (modelObj instanceof Creature) {
            return buildCreature((Creature)modelObj);
        } else if (modelObj instanceof CreatureEvolution) {
            return buildCreatureEvolution((CreatureEvolution)modelObj);
        } else if (modelObj instanceof CreatureRaiseType) {
            return buildCreatureRaiseType((CreatureRaiseType)modelObj);
        } else if (modelObj instanceof CreatureState) {
            return buildCreatureState((CreatureState)modelObj);
        } else if (modelObj instanceof CreatureType) {
            return buildCreatureType((CreatureType)modelObj);
        } else if (modelObj instanceof Medicine) {
            return buildMedicine((Medicine)modelObj);
        } else if (modelObj instanceof Sickness) {
            return buildSickness((Sickness)modelObj);
        } else if (modelObj instanceof CreatureAction) {
            return buildCreatureAction((CreatureAction)modelObj);
        } else if(modelObj instanceof CreatureDebuff) {
            return buildCreatureDebuff((CreatureDebuff)modelObj);