// Path: cartolapp/app/src/main/java/com/github/pierry/cartolapp/domain/Team.java
// @Table(name = "Team") public class Team extends Model {
// 
//   @SerializedName(value = "time_id") @Column(name = "TeamId") long teamId;
//   @SerializedName(value = "nome") @Column(name = "Name") String name;
//   @SerializedName(value = "nome_cartola") @Column(name = "Owner") String owner;
//   @SerializedName(value = "url_escudo_png") @Column(name = "Image") String image;
//   @Column(name = "Mine") transient boolean mine;
//   @Column(name = "Points") transient double points;
// 
//   public Team() {
//     super();
//   }
// 
//   public long getTeamId() {
//     return teamId;
//   }
// 
//   public void setTeamId(long teamId) {
//     this.teamId = teamId;
//   }
// 
//   public String getName() {
//     return name;
//   }
// 
//   public void setName(String name) {
//     this.name = name;
//   }
// 
//   public String getOwner() {
//     return owner;
//   }
// 
//   public void setOwner(String owner) {
//     this.owner = owner;
//   }
// 
//   public String getImage() {
//     return image;
//   }
// 
//   public void setImage(String image) {
//     this.image = image;
//   }
// 
//   public double getPoints() {
//     return points;
//   }
// 
//   public void setPoints(double points) {
//     this.points = points;
//   }
// 
//   public boolean isMine() {
//     return mine;
//   }
// 
//   public void setMine(boolean mine) {
//     this.mine = mine;
//   }
// }
// 
// Path: cartolapp/app/src/main/java/com/github/pierry/cartolapp/domain/contracts/ITeamRepository.java
// public interface ITeamRepository extends ICrud<Team> {
// }


import com.activeandroid.query.Delete;
import com.activeandroid.query.Select;
import com.github.pierry.cartolapp.domain.Team;
import com.github.pierry.cartolapp.domain.contracts.ITeamRepository;
import java.util.Collections;
import java.util.List;
import org.androidannotations.annotations.EBean;
package com.github.pierry.cartolapp.repositories;


@EBean public class TeamRepository implements ITeamRepository {

  @Override public List<Team> get() {
    try {
      return new Select().from(Team.class).execute();
    } catch (Exception e) {
      return Collections.emptyList();
    }
  }

  @Override public Team getById(long id) {
    try {
      return new Select().from(Team.class).where("TeamId = ?", id).executeSingle();
    } catch (Exception e) {
      return null;
    }
  }

  @Override public long create(Team item) {
    try {
      return item.save();
    } catch (Exception e) {
// Path: cartolapp/app/src/main/java/com/github/pierry/cartolapp/domain/Team.java
// @Table(name = "Team") public class Team extends Model {
// 
//   @SerializedName(value = "time_id") @Column(name = "TeamId") long teamId;
//   @SerializedName(value = "nome") @Column(name = "Name") String name;
//   @SerializedName(value = "nome_cartola") @Column(name = "Owner") String owner;
//   @SerializedName(value = "url_escudo_png") @Column(name = "Image") String image;
//   @Column(name = "Mine") transient boolean mine;
//   @Column(name = "Points") transient double points;
// 
//   public Team() {
//     super();
//   }
// 
//   public long getTeamId() {
//     return teamId;
//   }
// 
//   public void setTeamId(long teamId) {
//     this.teamId = teamId;
//   }
// 
//   public String getName() {
//     return name;
//   }
// 
//   public void setName(String name) {
//     this.name = name;
//   }
// 
//   public String getOwner() {
//     return owner;
//   }
// 
//   public void setOwner(String owner) {
//     this.owner = owner;
//   }
// 
//   public String getImage() {
//     return image;
//   }
// 
//   public void setImage(String image) {
//     this.image = image;
//   }
// 
//   public double getPoints() {
//     return points;
//   }
// 
//   public void setPoints(double points) {
//     this.points = points;
//   }
// 
//   public boolean isMine() {
//     return mine;
//   }
// 
//   public void setMine(boolean mine) {
//     this.mine = mine;
//   }
// }
// 
// Path: cartolapp/app/src/main/java/com/github/pierry/cartolapp/domain/contracts/ITeamRepository.java
// public interface ITeamRepository extends ICrud<Team> {
// }


// Path: cartolapp/app/src/main/java/com/github/pierry/cartolapp/repositories/TeamRepository.java
import com.activeandroid.query.Delete;
import com.activeandroid.query.Select;
import com.github.pierry.cartolapp.domain.Team;
import com.github.pierry.cartolapp.domain.contracts.ITeamRepository;
import java.util.Collections;
import java.util.List;
import org.androidannotations.annotations.EBean;

package com.github.pierry.cartolapp.repositories;


@EBean public class TeamRepository implements ITeamRepository {

  @Override public List<Team> get() {
    try {
      return new Select().from(Team.class).execute();
    } catch (Exception e) {
      return Collections.emptyList();
    }
  }

  @Override public Team getById(long id) {
    try {
      return new Select().from(Team.class).where("TeamId = ?", id).executeSingle();
    } catch (Exception e) {
      return null;
    }
  }

  @Override public long create(Team item) {
    try {
      return item.save();
    } catch (Exception e) {
      e.printStackTrace();