Package er.rest.example.model

Examples of er.rest.example.model.Animal


  /**
   * Returns the value of the "animal" variable from the route.
   * @return
   */
  public Animal animal() {
    Animal animal = routeObjectForKey("animal");
    return animal;
  }
View Full Code Here


    return filter;
  }

  @Override
  public WOActionResults createAction() {
    Animal animal = create(updateFilter());
    editingContext().saveChanges();
    return response(animal, showFilter());
  }
View Full Code Here

    return response(animal, showFilter());
  }

  @Override
  public WOActionResults updateAction() {
    Animal animal = animal();
    update(animal, updateFilter());
    editingContext().saveChanges();
    return response(animal, showFilter());
  }
View Full Code Here

    return response(animal, showFilter());
  }

  @Override
  public WOActionResults destroyAction() throws Throwable {
    Animal animal = animal();
    animal.delete();
    editingContext().saveChanges();
    return response(animal, showFilter());
  }
View Full Code Here

    return response(animal, showFilter());
  }

  @Override
  public WOActionResults newAction() throws Throwable {
    Animal animal = Animal.createAnimal(editingContext(), "New Animal", null);
    return response(animal, showFilter());
  }
View Full Code Here

    Company c1 = Company.createCompany(editingContext, "mDT");
    Company c2 = Company.createCompany(editingContext, "Apple");
    Company c3 = Company.createCompany(editingContext, "Microsoft");
    Person p1 = Person.createPerson(editingContext, "Mike");
    p1.setCompanyRelationship(c1);
    Animal a1 = Animal.createAnimal(editingContext, "Derby", p1);
    Animal a2 = Animal.createAnimal(editingContext, "Sydney", p1);
    Person p2 = Person.createPerson(editingContext, "Adam");
    p2.setCompanyRelationship(c1);
    Animal a3 = Animal.createAnimal(editingContext, "Franny", p2);
  }
View Full Code Here

TOP

Related Classes of er.rest.example.model.Animal

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.