Examples of Managers


Examples of com.icegreen.greenmail.Managers

    public Servers(ServerSetup config) {
        this(new ServerSetup[]{config});
    }

    public Servers(ServerSetup[] config) {
        managers = new Managers();
        services = new HashMap();
        for (int i = 0; i < config.length; i++) {
            ServerSetup setup = config[i];
            if (services.containsKey(setup.getProtocol())) {
                throw new IllegalArgumentException("Server '" + setup.getProtocol() + "' was found at least twice in the array");
View Full Code Here

Examples of javango.db.Managers

      Injector injector = Guice.createInjector(new HibernateModule());
    AnnotationConfiguration cfg = injector.getInstance(HibernateUtil.class).getConfiguration();   
    new SchemaExport(cfg).drop(false, true);
    new SchemaExport(cfg).create(false, true);
   
      Managers managers = injector.getInstance(Managers.class);     
     
      Manager<Poll> manager = managers.forClass(Poll.class);     
      assertEquals(HibernateManager.class, manager.getClass());
     
      Poll poll = new Poll();
      poll.setPubDate(new Date());
     
View Full Code Here

Examples of javango.db.Managers

      Injector injector = Guice.createInjector(new HibernateModule());
    AnnotationConfiguration cfg = injector.getInstance(HibernateUtil.class).getConfiguration();   
    new SchemaExport(cfg).drop(false, true);
    new SchemaExport(cfg).create(false, true);
   
      Managers managers = injector.getInstance(Managers.class);     
     
      Manager<Poll> manager = managers.forClass(Poll.class);     
      assertEquals(HibernateManager.class, manager.getClass());
     
      Poll poll = new Poll();
      poll.setPubDate(new Date());
      manager.save(poll);
View Full Code Here

Examples of javango.db.Managers

      Injector injector = Guice.createInjector(new HibernateModule());
    AnnotationConfiguration cfg = injector.getInstance(HibernateUtil.class).getConfiguration();   
    new SchemaExport(cfg).drop(false, true);
    new SchemaExport(cfg).create(false, true);
   
      Managers managers = injector.getInstance(Managers.class);     
     
      Manager<Poll> manager = managers.forClass(Poll.class);     
     
      Poll poll = new Poll();
      poll.setQuestion("What is this");
      poll.setPubDate(new Date());
      manager.save(poll);
     
      Manager<Choice> choiceManager = managers.forClass(Choice.class);
      Choice choice = new Choice();
      choice.setPoll(poll);
      choice.setChoice("My cool choice");
      choiceManager.save(choice);
     
View Full Code Here

Examples of javango.db.Managers

    Injector injector = Guice.createInjector(new HibernateModule());
    AnnotationConfiguration cfg = injector.getInstance(HibernateUtil.class).getConfiguration();   
    new SchemaExport(cfg).drop(false, true);
    new SchemaExport(cfg).create(false, true);
   
      Managers managers = injector.getInstance(Managers.class);     
     
      Manager<Poll> manager = managers.forClass(Poll.class);     
     
      Poll poll = new Poll();
      poll.setPubDate(new Date());
      manager.save(poll);
     
      Manager<Choice> choiceManager = managers.forClass(Choice.class);
      Choice choice = new Choice();
      choice.setPoll(poll);
      choice.setChoice("My cool choice");
      choice.setVotes(1L); // should match the id for the property test below...
      choiceManager.save(choice);
View Full Code Here

Examples of javango.db.Managers

      Injector injector = Guice.createInjector(new HibernateModule());
    AnnotationConfiguration cfg = injector.getInstance(HibernateUtil.class).getConfiguration();   
    new SchemaExport(cfg).drop(false, true);
    new SchemaExport(cfg).create(false, true);
   
      Managers managers = injector.getInstance(Managers.class);     
     
      Manager<Poll> manager = managers.forClass(Poll.class);     
     
      Poll poll = new Poll();
      poll.setPubDate(new Date());
      manager.save(poll);
     
      Manager<Choice> choiceManager = managers.forClass(Choice.class);
      Choice choice = new Choice();
      choice.setPoll(poll);
      choice.setChoice("My cool choice");
      choiceManager.save(choice);
     
View Full Code Here

Examples of javango.db.Managers

      Injector injector = Guice.createInjector(new HibernateModule());
    AnnotationConfiguration cfg = injector.getInstance(HibernateUtil.class).getConfiguration();   
    new SchemaExport(cfg).drop(false, true);
    new SchemaExport(cfg).create(false, true);
   
      Managers managers = injector.getInstance(Managers.class);     
     
      User user = new User();
      user.setName("joe smith");
      managers.forClass(User.class).save(user);
     
      Manager<Poll> manager = managers.forClass(Poll.class);     
     
      Poll poll = new Poll();
      poll.setPubDate(new Date());
      poll.setUser(user);
      manager.save(poll);
     
      Manager<Choice> choiceManager = managers.forClass(Choice.class);
      Choice choice = new Choice();
      choice.setPoll(poll);
      choice.setChoice("My cool choice");
      choiceManager.save(choice);
     
View Full Code Here

Examples of javango.db.Managers

      Injector injector = Guice.createInjector(new HibernateModule());
    AnnotationConfiguration cfg = injector.getInstance(HibernateUtil.class).getConfiguration();   
    new SchemaExport(cfg).drop(false, true);
    new SchemaExport(cfg).create(false, true);
   
      Managers managers = injector.getInstance(Managers.class);     
     
      User user = new User();
      user.setName("joe smith");
      managers.forClass(User.class).save(user);
     
      Manager<Poll> manager = managers.forClass(Poll.class);     
     
      Poll poll = new Poll();
      poll.setPubDate(new Date());
      poll.setUser(user);
      manager.save(poll);
     
      Manager<Choice> choiceManager = managers.forClass(Choice.class);
      Choice choice = new Choice();
      choice.setPoll(poll);
      choice.setChoice("My cool choice");
      choiceManager.save(choice);
     
View Full Code Here

Examples of javango.db.Managers

      Injector injector = Guice.createInjector(new HibernateModule());
    AnnotationConfiguration cfg = injector.getInstance(HibernateUtil.class).getConfiguration();   
    new SchemaExport(cfg).drop(false, true);
    new SchemaExport(cfg).create(false, true);
   
      Managers managers = injector.getInstance(Managers.class);     
     
      User user = new User();
      user.setName("joe smith");
      managers.forClass(User.class).save(user);
     
      Manager<Poll> manager = managers.forClass(Poll.class);     
     
      Poll poll = new Poll();
      poll.setPubDate(new Date());
      poll.setUser(user);
      manager.save(poll);
     
      Manager<Choice> choiceManager = managers.forClass(Choice.class);
      Choice choice = new Choice();
      choice.setPoll(poll);
      choice.setChoice("My cool choice");
      choiceManager.save(choice);
     
View Full Code Here

Examples of javango.db.Managers

    Injector injector = Guice.createInjector(new HibernateModule());
    AnnotationConfiguration cfg = injector.getInstance(HibernateUtil.class).getConfiguration();   
    new SchemaExport(cfg).drop(false, true);
    new SchemaExport(cfg).create(false, true);
   
    Managers managers = injector.getInstance(Managers.class);     
     
      User user = new User();
      user.setName("joe smith");
      managers.forClass(User.class).save(user);
     
      Manager<Poll> manager = managers.forClass(Poll.class);     
     
      Poll poll1 = new Poll();
      poll1.setPubDate(new Date());
      poll1.setUser(user);
      manager.save(poll1);
     
      Manager<Choice> choiceManager = managers.forClass(Choice.class);
      Choice choice1 = new Choice();
      choice1.setPoll(poll1);
      choice1.setChoice("My cool choice");
      choiceManager.save(choice1);
     
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.