Examples of AnimalId


Examples of org.objectweb.speedo.pobjects.inheritance.filtered.AnimalId

    Kangaroo ko = (Kangaroo) a;
    assertEquals("Bad AnAnimal", "Franck", ko.getName());
    assertNull("Null AnAnimal", zoo.getAnAnimal());
    try {
      ko = (Kangaroo) pm.getObjectById(
        new AnimalId("Franck", Kangaroo.KANGAROO_SPECIES),
        false);
      logger.log(BasicLevel.INFO, "ko: " + ko.getName());
    } catch (Exception e) {
      logger.log(BasicLevel.ERROR, "Error the kangaroo fetching:",
        ExceptionHelper.getNested(e));
      fail("Kangaroo not found");
    }

    try {
      olivier = (Koala) pm.getObjectById(
        new AnimalId("Olivier", "koala"),
        false);
      logger.log(BasicLevel.INFO, "koala: " + olivier.getName());
    } catch (Exception e) {
      logger.log(BasicLevel.ERROR, "Error the koala fetching:",
        ExceptionHelper.getNested(e));
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.