Examples of Person


Examples of common.advanced.Person

    public void init() {

      try {
        em.getTransaction().begin();
       
        Person mother = new Person("Lorraine", 50);
          addPerson(mother);
         
          em.persist(mother);
         
          Person father = new Person("John", 55);
          addPerson(father);
 
          em.persist(father);
         
          Person partner = new Person("Catherine", 28);
          addPerson(partner);
 
          em.persist(partner);
         
          Person p = new Person("Fred", 30, mother, father, partner);
          addPerson(p);
          em.persist(p);
         
          father.addChild(p);
          mother.addChild(p);
View Full Code Here

Examples of common.intro.Person

    Map<Integer, Person> members = new ConcurrentHashMap<Integer, Person>();
    AtomicInteger currentId = new AtomicInteger();

    public MembershipServiceImpl() {
        // seed HashMap with first member
        Person p = new Person();
        p.setName("Bob");
        p.setAge(20);
        p.setId(currentId.incrementAndGet());
        members.put(p.getId(), p);
    }
View Full Code Here

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

Examples of data.Person

        try {
            Connection connection = DataBaseManager.getConnection(JDBC_DRIVER, DB_URL, USER, PASS);
            DBOperations.createDBSchema(connection, "ssnewschema");
            service.DBOperations.createTableInSchema(connection, "ssnewschema", "table2");

            DBOperations.insertData(new Person("Malchvich", "Jonh", "Kreshatik 14", "TOKIO"), connection, "ssnewschema", "table1");

            System.out.println("HAPPY END");
            connection.close();
        } catch (SQLException e) {
            System.out.println("SQL EXCEPTION");
View Full Code Here

Examples of de.chris_soft.fyllgen.data.Person

    listAllPersons.clear();
    listAllPersonComposites.clear();

    // Alle Personen in die Listen einordnen.
    int index = 0;
    Person lastPerson = null;
    for (Person person : personsList) {
      // Jede Person in die Liste aller Personen werfen.
      listAllPersons.add(person);
      listAllPersonComposites.add(null);

      // Mal schauen, wie die Person zur letzt hinzugef�gten Person steht.

      if (lastPerson != null) {
        Relationship relship = lastPerson.getRelationship(person);
        if (relship instanceof RelationshipParentChild) {
          if (relship.partner1 == lastPerson) {
            index++;
          }
          else {
View Full Code Here

Examples of de.crowdcode.kissmda.testapp.Person

  public void setStreet(String street) {
    if (this.street == null) {
      this.street = street;
    } else {
      oldAddress = new AddressImpl();
      Person person = new PersonImpl();
      person.setName("Old Lofi");
      oldAddress.setPerson(person);
      oldAddress.setStreet(this.street);
      this.street = street;
    }
  }
View Full Code Here

Examples of de.dis2011.data.Person

   * @param id Die ID der Person
   * @return Person mit der ID oder null
   */
  public Person getPersonById(int id) {
   
    Person person = (Person) session.get(Person.class, id);
    return person;
   
  }
View Full Code Here

Examples of de.huepattl.playground.berkeleydb.domain.model.Person

     * @throws Exception Arrrr...
     * @see #setupDatabase()
     */
    @Test
    public void simplePersistence() throws Exception {
        Person person;
        PrimaryIndex<Long, Person> primaryIndex = entityStore.getPrimaryIndex(Long.class, Person.class);

        person = new Person("Doe", "John");
        // Birthday: Dec 31st 1977
        person.setDateOfBirth(new Date(java.sql.Date.valueOf(LocalDate.of(1977, Month.DECEMBER, 9)).getTime()));
        primaryIndex.put(person);
        person = primaryIndex.get(person.getId());
        LOG.info(person);

        assertNotNull(person);
    }
View Full Code Here

Examples of de.javakaffee.kryoserializers.TestClasses.Person

        assertDeepEquals( deserialized, obj );
    }

    @Test( enabled = true )
    public void testCyclicDependencies() throws Exception {
        final Person p1 = createPerson( "foo bar", Gender.MALE, 42, "foo.bar@example.org", "foo.bar@example.com" );
        final Person p2 = createPerson( "bar baz", Gender.FEMALE, 42, "bar.baz@example.org", "bar.baz@example.com" );
        p1.addFriend( p2 );
        p2.addFriend( p1 );

        final Person deserialized = deserialize( serialize( p1 ), Person.class );
        assertDeepEquals( deserialized, p1 );
    }
View Full Code Here

Examples of de.javakaffee.web.msm.serializer.TestClasses.Person

    private static Person[] createPersons( final int countPersons ) {
        final Person[] persons = new Person[countPersons];
        for( int i = 0; i < countPersons; i++ ) {
            final Calendar dateOfBirth = Calendar.getInstance();
            dateOfBirth.set( Calendar.YEAR, dateOfBirth.get( Calendar.YEAR ) - 42 );
            final Person person = TestClasses.createPerson( "Firstname" + i + " Lastname" + i,
                    i % 2 == 0 ? Gender.FEMALE : Gender.MALE,
                        dateOfBirth,
                        "email" + i + "-1@example.org", "email" + i + "-2@example.org", "email" + i + "-3@example.org" );
            person.addAddress( new Address( "route66", "123456", "sincity", "sincountry" ) );
           
            if ( i > 0 ) {
                person.addFriend( persons[i - 1] );
            }
           
            persons[i] = person;
        }
        return persons;
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.