Examples of Team


Examples of org.eclipse.egit.github.core.Team

    private void minerTeams(List<Team> gitTeams) {
        EntityRepository repository = dao.findByID(repositoryToMinerId, EntityRepository.class);
        int i = 0;
        calculeSubProgress(i, gitTeams.size());
        while (!canceled && i < gitTeams.size()) {
            Team gitTeam = gitTeams.get(i);
            EntityTeam team = minerTeam(gitTeam);
            repository.addTeam(team);
            dao.edit(team);
            i++;
            calculeSubProgress(i, gitTeams.size());
View Full Code Here

Examples of org.jabusuite.address.employee.Team

    this.setPnEditJbsObject(pnTeamEdit);
  }

  @Override
  public void createJbsBaseObject() {
    this.setJbsBaseObject(new Team());
  }
View Full Code Here

Examples of org.jmcdonnell.blackoutrugby.beans.Team

*/
public class RequestManagerTeamTest extends AbstractApiRequestTest {

    @Test
    public void testGetNationalTeamByIdNotNull() throws BlackoutException {
        Team team
                = requestManager.getEntityFromApi(new Long(System.getProperty("nationalTeamId")), Team.class, Boolean.TRUE, Boolean.FALSE);

        assertNotNull(team);
    }
View Full Code Here

Examples of org.meb.speedway.model.registry.Team

    if (cache.containsKey(teamName)) {
      return cache.get(teamName);
    }
   
    String[] tokens = teamName.toLowerCase().split("\\ +");
    Team mostHitsTeam = null;
    int mostHits = 0;
    for (Team team : teams) {
      int hits = 0;
      for (String token : tokens) {
        if (team.getName().toLowerCase().contains(token)) {
View Full Code Here

Examples of org.newinstance.gucoach.model.Team

        // initialise team entities
        final List<Team> teams = new ArrayList<Team>();
        int position = 1;
        for (final String teamName : teamNames) {
            final Team team = createTeam(position, teamName);
            teams.add(team);
            position++;
        }

        // use task to insert teams into database
View Full Code Here

Examples of org.objectweb.speedo.pobjects.detach.Team

        } finally {
            pm.close();
        }
    }
  private void createPlayers(){
    Team t = new Team("Bordeaux",null,null);
    Collection players = new ArrayList();
    Player p1 = new Player("p1", t, 25);
    players.add(p1);
    Player p2 = new Player("p2", t, 32);
    players.add(p2);
    t.setPlayers(players);
    Coach c = new Coach("c1", 5, t);
    t.setCoach(c);
   
    Team t2 = new Team("Nantes", null, null);
    Collection players2 = new ArrayList();
    Player p3 = new Player("p3", t2, 25);
    players2.add(p3);
    Player p4 = new Player("p4", t2, 32);
    players2.add(p4);
    t2.setPlayers(players2);
    Coach c2 = new Coach("c2", 5, t2);
    t2.setCoach(c2);
   
    PersistenceManager pm = pmf.getPersistenceManager();
    pm.currentTransaction().begin();
    logger.log(BasicLevel.DEBUG, "make persistent the team " + t.toString());
    pm.makePersistent(t);
View Full Code Here

Examples of org.objectweb.speedo.pobjects.detach.Team

      Query query = pm.newQuery(Team.class);
      Collection results = (Collection)query.execute();
      logger.log(BasicLevel.DEBUG, "Teams:");
      Iterator it = results.iterator();
      while(it.hasNext()){
        Team t = (Team) it.next();
        logger.log(BasicLevel.DEBUG, t.toString());
      }
      Collection detachedTeams = (Collection) pm.detachCopyAll(results);
      query.closeAll();
      return detachedTeams;
    }
View Full Code Here

Examples of org.objectweb.speedo.pobjects.detach.Team

   *   tx.commit
   *    attach => FAIL
   */
  public void testVersion3() {
    logger.log(BasicLevel.DEBUG, "***************testVersion3*****************");
    Team t = new Team("T3",null,null);
    Collection players = new ArrayList();
    Player p1 = new Player("p5", t, 20);
    players.add(p1);
    Player p2 = new Player("p6", t, 30);
    players.add(p2);
    t.setPlayers(players);
    Coach c = new Coach("c3", 10, t);
    t.setCoach(c);
    PersistenceManager pm = pmf.getPersistenceManager();
    pm.currentTransaction().begin();
    pm.makePersistent(t);
    pm.currentTransaction().commit();
    //begin
    pm.currentTransaction().begin();
    //detach the team t
    Team copyOfT = null;
    try {
      copyOfT = (Team) pm.detachCopy(t);
      //  modify the coach
      t.setCoach(new Coach("c31", 10, t));
      Iterator it  = t.getPlayers().iterator();
      //modify the players
      while(it.hasNext()){
        Player p = (Player) it.next();
        p.setAge(99);
      }
      //commit
      pm.currentTransaction().commit();
    } catch (Exception e) {
      fail("Detach error: " + e.getMessage());
      pm.currentTransaction().rollback();
      pm.close();
      return;
    }
    pm.currentTransaction().begin();
    try
      //attach the team
      Team attachedTeam = (Team) pm.makePersistent(copyOfT);
        pm.currentTransaction().commit();
        fail("The attached is supposed to fail");
    }catch(Exception e){
      assertEquals("Wrong exception thrown: " + e.getClass(), JDOException.class, e.getClass());
    } finally {
View Full Code Here

Examples of org.objectweb.speedo.pobjects.detach.Team

   *   tx.rollback
   *    attach => OK
   */
  public void testVersion4() {
    logger.log(BasicLevel.DEBUG, "***************testVersion4*****************");
    Team t = new Team("T4",null,null);
    Collection players = new ArrayList();
    Player p1 = new Player("p7", t, 20);
    players.add(p1);
    Player p2 = new Player("p8", t, 30);
    players.add(p2);
    t.setPlayers(players);
    Coach c = new Coach("c4", 10, t);
    t.setCoach(c);
    PersistenceManager pm = pmf.getPersistenceManager();
    pm.currentTransaction().begin();
    pm.makePersistent(t);
    pm.currentTransaction().commit();
    pm.currentTransaction().begin();
    //detach the team t
    Team copyOfT = (Team) pm.detachCopy(t);
    //rollback the tx
    pm.currentTransaction().rollback();
    pm.currentTransaction().begin();
    try
      //attach the "invalid" team
      Team attachedTeam = (Team) pm.makePersistent(copyOfT);
      pm.currentTransaction().commit();
    }catch(Exception e){
      fail("The attached is supposed to be ok");
    } finally {
      if (pm.currentTransaction().isActive()) {
View Full Code Here

Examples of org.objectweb.speedo.pobjects.detach.Team

   *  tx.rollback
   *   attach => FAIL
   */
  public void testVersion5() {
    logger.log(BasicLevel.DEBUG, "***************testVersion5*****************");
    Team t = new Team("T5",null,null);
    Collection players = new ArrayList();
    Player p1 = new Player("p9", t, 20);
    players.add(p1);
    Player p2 = new Player("p10", t, 30);
    players.add(p2);
    t.setPlayers(players);
    Coach c = new Coach("c5", 10, t);
    t.setCoach(c);
    PersistenceManager pm = pmf.getPersistenceManager();
    pm.currentTransaction().begin();
    pm.makePersistent(t);
    pm.currentTransaction().commit();
    //begin
    pm.currentTransaction().begin();
    //modify the coach
    t.setCoach(new Coach("c51", 10, t));
    Iterator it  = t.getPlayers().iterator();
    //modify the players
    while(it.hasNext()){
      Player p = (Player) it.next();
      p.setAge(99);
    }
    //detach the team t
    Team copyOfT = (Team) pm.detachCopy(t);
    //rollback
    pm.currentTransaction().rollback();
    pm.currentTransaction().begin();
    try
      //attach the team
      Team attachedTeam = (Team) pm.makePersistent(copyOfT);
        pm.currentTransaction().commit();
        fail("The attached is supposed to fail.");
    }catch(Exception e){
      assertEquals("Wrong exception thrown: " + e.getClass(), JDOException.class, e.getClass());
    } finally {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.