Examples of Person


Examples of org.hibernate.test.domain.Person

        SecondLevelCacheStatistics slcs = getSecondLevelCacheStatistics(Account.class);
        SecondLevelCacheStatistics slcs2 = getSecondLevelCacheStatistics(Person.class);

        Session session = sessionFactory.openSession();

        Person person = new Person();
        person.setAge(40);
        person.setFirstname("Bae");
        person.setLastname("Sunghyouk");
        session.save(person);

        Account account = new Account();
        account.setPerson(person);
        session.save(account);
View Full Code Here

Examples of org.hibernate.test.dynamicentity.Person

    address.setStreet( "somewhere over the rainbow" );
    address.setCity( "lawerence, kansas" );
    address.setPostalCode( "toto");
    customer.setAddress( address );
    customer.setFamily( new HashSet() );
    Person son = ProxyHelper.newPersonProxy();
    son.setName( "son" );
    customer.getFamily().add( son );
    Person wife = ProxyHelper.newPersonProxy();
    wife.setName( "wife" );
    customer.getFamily().add( wife );
    session.save( customer );
    session.getTransaction().commit();
    session.close();

    assertNotNull( "company id not assigned", company.getId() );
    assertNotNull( "customer id not assigned", customer.getId() );
    assertNotNull( "address id not assigned", address.getId() );
    assertNotNull( "son:Person id not assigned", son.getId() );
    assertNotNull( "wife:Person id not assigned", wife.getId() );

    // Test loading these dyna-proxies, along with flush processing
    session = openSession();
    session.beginTransaction();
    customer = ( Customer ) session.load( Customer.class, customer.getId() );
View Full Code Here

Examples of org.hibernate.test.sql.hand.Person

  public void testSQLQueryInterface() {
    Session s = openSession();
    Transaction t = s.beginTransaction();
    Organization ifa = new Organization("IFA");
    Organization jboss = new Organization("JBoss");
    Person gavin = new Person("Gavin");
    Employment emp = new Employment(gavin, jboss, "AU");

    s.persist(ifa);
    s.persist(jboss);
    s.persist(gavin);
View Full Code Here

Examples of org.hibernate.tutorial.domain.Person

    private Long createAndStorePerson(String firstname, String lastname) {

        Session session = HibernateUtil.getSessionFactory().getCurrentSession();
        session.beginTransaction();

        Person thePerson = new Person();
        thePerson.setFirstname(firstname);
        thePerson.setLastname(lastname);

        session.save(thePerson);

        session.getTransaction().commit();

        return thePerson.getId();
    }
View Full Code Here

Examples of org.impalaframework.spring.dynamic.impl.Person

    context.refresh();

    assertNotNull(context.getBean("communicationMethod"));
    assertNotNull(context.getBean("communicationMethodImpl"));

    Person ti = (Person) context.getBean("person");

    while (true) {
      ti.act();
      Thread.sleep(500);
    }
  }
View Full Code Here

Examples of org.infinispan.loaders.jdbc.stringbased.Person

      assert cacheStore.load(MIRCEA).getValue().equals("value");
      assert cacheStore.load("String").getValue().equals("someValue");
   }

   public void testMultipleEntriesWithSameHashCode() throws Exception {
      Person one = new Person("Mircea", "Markus", 28);
      Person two = new Person("Manik", "Surtani", 28);
      one.setHashCode(100);
      two.setHashCode(100);
      cacheStore.store(TestInternalCacheEntryFactory.create(one, "value"));
      assertBinaryRowCount(1);
      assertStringsRowCount(0);
      cacheStore.store(TestInternalCacheEntryFactory.create(two, "otherValue"));
      assertBinaryRowCount(1); //both go to same bucket
View Full Code Here

Examples of org.infinispan.objectfilter.test.model.Person

   @Rule
   public ExpectedException expectedException = ExpectedException.none();

   protected Object createPerson1() throws Exception {
      Person person = new Person();
      person.setId(1);
      person.setName("John");
      person.setSurname("Batman");
      person.setAge(40);
      person.setGender(Person.Gender.MALE);

      Address address = new Address();
      address.setStreet("Old Street");
      address.setPostCode("SW12345");
      person.setAddress(address);

      PhoneNumber phoneNumber1 = new PhoneNumber();
      phoneNumber1.setNumber("0040888888");
      PhoneNumber phoneNumber2 = new PhoneNumber();
      phoneNumber2.setNumber("004012345");
      person.setPhoneNumbers(Arrays.asList(phoneNumber1, phoneNumber2));
      return person;
   }
View Full Code Here

Examples of org.infinispan.persistence.jdbc.stringbased.Person

      assert cacheStore.load(MIRCEA).getValue().equals("value");
      assert cacheStore.load("String").getValue().equals("someValue");
   }

   public void testMultipleEntriesWithSameHashCode() throws Exception {
      Person one = new Person("Mircea", "Markus", 28);
      Person two = new Person("Manik", "Surtani", 28);
      one.setHashCode(100);
      two.setHashCode(100);
      cacheStore.write(new MarshalledEntryImpl(one, "value", null, getMarshaller()));
      assertBinaryRowCount(1);
      assertStringsRowCount(0);
      cacheStore.write(new MarshalledEntryImpl(two, "otherValue",null, getMarshaller()));
      assertBinaryRowCount(1); //both go to same bucket
View Full Code Here

Examples of org.infinispan.persistence.jpa.entity.Person

      HashSet<String> nickNames = new HashSet<String>();
      nickNames.add("nick1");
      nickNames.add("nick2");

      Person person = new Person();
      person.setId(key);
      person.setName("test person");

      person.setNickNames(nickNames);
      person.setAddress(adr);
      person.setSecondaryAdresses(secAdrs);

      return new TestObject(person.getId(), person);
   }
View Full Code Here

Examples of org.infinispan.query.test.Person

   protected CacheMode getCacheMode() {
      return CacheMode.REPL_SYNC;
   }

   protected void prepareTestData() {
      person1 = new Person();
      person1.setName("NavinSurtani");
      person1.setBlurb("Likes playing WoW");
      person1.setAge(45);

      person2 = new Person();
      person2.setName("BigGoat");
      person2.setBlurb("Eats grass");
      person2.setAge(30);

      person3 = new Person();
      person3.setName("MiniGoat");
      person3.setBlurb("Eats cheese");
      person3.setAge(35);

      // Put the 3 created objects in the cache1.

      cacheAMachine2.put(key1, person1);
      cacheAMachine1.put(key2, person2);
      cacheAMachine1.put(key3, person3);

      person4 = new Person();
      person4.setName("MightyGoat");
      person4.setBlurb("Also eats grass");
      person4.setAge(66);

      cacheAMachine1.put("newOne", person4);
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.