Package net.geco.model

Examples of net.geco.model.Category


      return null;
    }
  }
 
  public Runner insertRunner(ArchiveRunner arkRunner) {
    Category rCat = ensureCategoryInRegistry(arkRunner.getCategory());
    Course course = registry().getDefaultCourseOrAnyFor(rCat);
    Runner runner = createRunner(arkRunner, course);
    runnerControl().registerNewRunner(runner);
    return runner;
  }
View Full Code Here


  }

  private Runner createRunner(ArchiveRunner arkRunner, Course course) {
    Club club = arkRunner.getClub();
    Club rClub = ensureClubInRegistry(club.getName(), club.getShortname());
    Category category = arkRunner.getCategory();
    Category rCat = ensureCategoryInRegistry(category.getName(), category.getLongname());
    String ecard = arkRunner.getEcard();
    if( ecard.equals("") ){ //$NON-NLS-1$
      geco().log(Messages.getString("ArchiveManager.NoMatchingEcardWarning") + arkRunner.getName()); //$NON-NLS-1$
    }
    Runner runner = runnerControl().buildBasicRunner(ecard); // ensure unique ecard
View Full Code Here

    }   
  }
 

  public Category createCategory(String shortName, String longName) {
    Category cat = factory().createCategory();
    cat.setShortname(shortName);
    cat.setLongname(longName);
    registry().addCategory(cat);
    announcer().announceCategoriesChanged();
    return cat;   
  }
View Full Code Here

    runner.setStartId(Integer.valueOf(i));
    return runner;
  }

  public Category categoryFactory(String name){
    Category category = factory.createCategory();
    category.setShortname(name);
    return category;
  }
View Full Code Here

    assertNull(registry.getRunnersFromCourse(red));
  }

  @Test
  public void testAddCategoryInRegistry(){
    Category h60 = categoryFactory("H60");
    registry.addCategory(h60);
    assertTrue(registry.getRunnersFromCategory("H60").isEmpty());
   
    runner1.setCategory(h60);
    registry.addRunner(runner1);
View Full Code Here

    assertTrue(registry.getRunnersFromCategory(h60).contains(runner1));
  }

  @Test
  public void testRemoveCategoryInRegistry(){
    Category h60 = categoryFactory("H60");
    registry.addCategory(h60);
    assertTrue(registry.getRunnersFromCategory("H60").isEmpty());
   
    registry.removeCategory(h60);
    assertNull(registry.getRunnersFromCategory(h60));
View Full Code Here

TOP

Related Classes of net.geco.model.Category

Copyright © 2018 www.massapicom. 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.