Package core

Examples of core.Person


  @Autowired
  private OtherService other;

  @Transactional
  public void addPeople() {
    this.repository.add(new Person("Larry"));
    this.repository.add(new Person("Curly"));
    this.repository.add(new Person("Moe"));
    other.execute();
  }
View Full Code Here


    }
   
    PersonRepository personRepository = context.getBean(RedisHashPersonRepository.class);
   
    // add some people
    Person mark = new Person("Mark");
    mark.setCity("Cambridge");
    mark.setState("MA");
    personRepository.add(mark);
    Person thomas = new Person("Thomas");
    thomas.setState("NH");
    personRepository.add(thomas);
   
    System.out.println("There are currently " + personRepository.count() + " people in the DB:");
    List<Person> people = personRepository.getAll();
    for (Person person : people) {
View Full Code Here

        .delete(Collections.singletonList(RedisSetPersonRepository.REDIS_KEY));
   
    PersonRepository personRepository = context.getBean(RedisSetPersonRepository.class);
   
    // add some people
    Person mark = new Person("Mark");
    mark.setCity("Cambridge");
    mark.setState("MA");
    personRepository.add(mark);
    Person thomas = new Person("Thomas");
    thomas.setState("NH");
    personRepository.add(thomas);
   
    System.out.println("There are currently " + personRepository.count() + " people in the DB:");
    List<Person> people = personRepository.getAll();
    for (Person person : people) {
View Full Code Here

        // add some people - must be done inside a transaction
        new TransactionTemplate(context.getBean(PlatformTransactionManager.class))
          .execute(new TransactionCallback<Object>() {
          @Override
          public Object doInTransaction(TransactionStatus status) {
            Person mark = new Person("Mark");
            Person thomas = new Person("Thomas");
            mark.addFriend(thomas);
            Person emil = new Person("Emil");
            thomas.addFriend(emil);
            @SuppressWarnings("unused")
            Person bubba = new Person("Bubba");
            return null;
          }
            });

    PersonRepository personRepository = context.getBean(PersonRepository.class);
View Full Code Here

    mongo.getDB("test").getCollection("people").drop();
   
    PersonRepository personRepository = context.getBean(PersonRepository.class);
   
    // add some people
    Person mark = new Person("Mark");
    Map<String, Object> marksPersonalInfo = new HashMap<String, Object>();
    marksPersonalInfo.put("Project Lead", "Spring Integration");
    marksPersonalInfo.put("Location", "Cambridge, MA");
    mark.setPersonalInfo(marksPersonalInfo);
    personRepository.add(mark);
    Person thomas = new Person("Thomas");
    Map<String, Object> thomasPersonalInfo = new HashMap<String, Object>();
    thomasPersonalInfo.put("Hobby", "photography");
    thomasPersonalInfo.put("Sport", "soccer");
    thomasPersonalInfo.put("Location", "Stratham, NH");
    thomas.setPersonalInfo(thomasPersonalInfo);
    personRepository.add(thomas);
   
    System.out.println("There are currently " + personRepository.count() + " people in the DB:");
    List<Person> people = personRepository.getAll();
    for (Person person : people) {
View Full Code Here

TOP

Related Classes of core.Person

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.