Examples of Contact


Examples of org.easycassandra.bean.model.Contact

    /**
     * run the test.
     */
    @Test
    public void insertTest() {
        Contact contacts = getContact();
        Assert.assertTrue(persistence.insert(contacts));
    }
View Full Code Here

Examples of org.easycassandra.persistence.cassandra.spring.entity.Contact

  /**
     * run the test.
     */
  @Test
  public void insertTest() {
        Contact contact = new Contact();
    contact.setId(UUID.randomUUID());
    contact.setName("Poliana");
    contact.setYear(TWENTY);
    Assert.assertNotNull(contactReporitory.save(contact));

  }
View Full Code Here

Examples of org.eclipse.ecf.protocol.msn.Contact

    try {
      connectContext.getCallbackHandler().handle(cb);
      client.addSessionListener(new ISessionListener() {
        public void sessionConnected(ChatSession session) {
          try {
            Contact contact = session.getParticipants()[0];
            final ID toID = namespace
                .createInstance(new Object[] { contact
                    .getEmail() });
            chatSessions.put(toID, session);
            session.addChatSessionListener(new ChatSessionListener(
                toID));
          } catch (IDCreateException e) {
            // ignored since this should not be possible
          }
        }
      });

      client.getContactList().addContactListListener(
          new IContactListListener() {
            public void contactAdded(Contact contact) {
              final MSNRosterEntry entry = new MSNRosterEntry(
                  MSNContainer.this, contact, namespace);

              for (int i = 0; i < entries.size(); i++) {
                Object e = entries.get(i);
                if (e instanceof MSNRosterGroup) {
                  MSNRosterGroup group = (MSNRosterGroup) e;
                  if (group.getGroup().contains(contact)) {
                    MSNRosterEntry check = group
                        .getEntryFor(contact);
                    if (check == null) {
                      check = entry;
                      contact
                          .addContactListener(new IContactListener() {
                            public void nameChanged(
                                String name) {
                              firePresence(
                                  entry
                                      .getID(),
                                  entry
                                      .getPresence());
                              fireRosterUpdate(entry);
                            }

                            public void personalMessageChanged(
                                String personalMessage) {
                              entry
                                  .updatePersonalMessage();
                              firePresence(
                                  entry
                                      .getID(),
                                  entry
                                      .getPresence());
                              fireRosterUpdate(entry);
                            }

                            public void statusChanged(
                                Status status) {
                              firePresence(
                                  entry
                                      .getID(),
                                  entry
                                      .getPresence());
                              fireRosterUpdate(entry);
                            }
                          });
                      group.add(check);
                      fireRosterEntryAdded(check);
                    }
                    fireRosterUpdate(group);
                    return;
                  }
                } else {
                  MSNRosterEntry check = (MSNRosterEntry) e;
                  if (entry.getContact().equals(
                      check.getContact())) {
                    fireRosterEntryAdded(check);
                    fireRosterUpdate(check.getParent());
                    return;
                  }
                }
              }

              contact.addContactListener(new IContactListener() {
                public void nameChanged(String name) {
                  firePresence(entry.getID(), entry
                      .getPresence());
                  fireRosterUpdate(entry);
                }

                public void personalMessageChanged(
                    String personalMessage) {
                  entry.updatePersonalMessage();
                  firePresence(entry.getID(), entry
                      .getPresence());
                  fireRosterUpdate(entry);
                }

                public void statusChanged(Status status) {
                  firePresence(entry.getID(), entry
                      .getPresence());
                  fireRosterUpdate(entry);
                }
              });
              entries.add(entry);
              entry.setParent(MSNContainer.this);
              fireRosterEntryAdded(entry);
              fireRosterUpdate(MSNContainer.this);
            }

            public void contactRemoved(Contact contact) {
              MSNRosterEntry entry = findEntry(entries, contact
                  .getEmail());
              if (entry != null) {
                fireHandleUnsubscribed(entry.getUser().getID());
                fireRosterEntryRemoved(entry);
                fireRosterUpdate(entry.getParent());
View Full Code Here

Examples of org.eclipse.sapphire.samples.contacts.Contact

    protected Object run( final Presentation context )
    {
        final String name = ( (Value<?>) this.property ).text();
        final ContactRepository cdb = this.property.element().nearest( ContactRepository.class );
       
        final Contact newContact = cdb.getContacts().insert();
        newContact.setName( name );
       
        return null;
    }
View Full Code Here

Examples of org.gwtoolbox.sample.mail.client.Contact

    }

    private Contact createContact(String firstName, String middleName, String lastName, String email,
                                  boolean privateContact, Date birthDate,
                                  AbstractImagePrototype image, AbstractImagePrototype thumb) {
        Contact contact = (Contact) GWT.create(Contact.class);
        Name name = (Name) GWT.create(Name.class);
        name.setFirstName(firstName);
        name.setMiddleName(middleName);
        name.setLastName(lastName);
        contact.setName(name);
        contact.setEmail(email);
        contact.setPrivateContact(privateContact);
        contact.setBirthDate(birthDate);
        contact.setImage(image.createImage());
        contact.setThumb(thumb.createImage());
        return contact;
    }
View Full Code Here

Examples of org.hibernate.test.cache.infinispan.functional.Contact

         Session session = sessionFactory.getCurrentSession();
         Customer customer = new Customer();
         customer.setName("JBoss");
         Set<Contact> contacts = new HashSet<Contact>();

         Contact kabir = new Contact();
         kabir.setCustomer(customer);
         kabir.setName("Kabir");
         kabir.setTlf("1111");
         contacts.add(kabir);

         Contact bill = new Contact();
         bill.setCustomer(customer);
         bill.setName("Bill");
         bill.setTlf("2222");
         contacts.add(bill);

         customer.setContacts(contacts);

         session.save(customer);
         tm.commit();

         IdContainer ids = new IdContainer();
         ids.customerId = customer.getId();
         Set contactIds = new HashSet();
         contactIds.add(kabir.getId());
         contactIds.add(bill.getId());
         ids.contactIds = contactIds;

         return ids;
      } catch (Exception e) {
         log.error("Caught exception creating customer", e);
View Full Code Here

Examples of org.hibernate.test.cache.jbc.functional.Contact

        
         updateContacts("Kabir", "Updated");
         assertEquals(contactSlcs.getElementCountInMemory(), 0);
         for (Integer id : jbContacts)
         {
            Contact contact = getContact(id);
            assertNotNull("JBoss contact " + id + " exists", contact);
            String expected = ("Kabir".equals(contact.getName())) ? "Updated" : "2222";
            assertEquals("JBoss contact " + id + " has correct TLF",
                         expected, contact.getTlf());
         }
        
         List<Integer> updated = getContactsByTLF("Updated");
         assertNotNull("Got updated contacts", updated);
         assertEquals("Updated contacts", 5, updated.size());
        
         updateContactsWithOneManual("Kabir", "UpdatedAgain");
         assertEquals(contactSlcs.getElementCountInMemory(), 0);
         for (Integer id : jbContacts)
         {
            Contact contact = getContact(id);
            assertNotNull("JBoss contact " + id + " exists", contact);
            String expected = ("Kabir".equals(contact.getName())) ? "UpdatedAgain" : "2222";
            assertEquals("JBoss contact " + id + " has correct TLF",
                         expected, contact.getTlf());
         }
        
         updated = getContactsByTLF("UpdatedAgain");
         assertNotNull("Got updated contacts", updated);
         assertEquals("Updated contacts", 5, updated.size());
View Full Code Here

Examples of org.hibernate.test.cache.jbc2.functional.Contact

        
         updateContacts("Kabir", "Updated");
         assertEquals(contactSlcs.getElementCountInMemory(), 0);
         for (Integer id : jbContacts)
         {
            Contact contact = getContact(id);
            assertNotNull("JBoss contact " + id + " exists", contact);
            String expected = ("Kabir".equals(contact.getName())) ? "Updated" : "2222";
            assertEquals("JBoss contact " + id + " has correct TLF",
                         expected, contact.getTlf());
         }
        
         List<Integer> updated = getContactsByTLF("Updated");
         assertNotNull("Got updated contacts", updated);
         assertEquals("Updated contacts", 5, updated.size());
        
         updateContactsWithOneManual("Kabir", "UpdatedAgain");
         assertEquals(contactSlcs.getElementCountInMemory(), 0);
         for (Integer id : jbContacts)
         {
            Contact contact = getContact(id);
            assertNotNull("JBoss contact " + id + " exists", contact);
            String expected = ("Kabir".equals(contact.getName())) ? "UpdatedAgain" : "2222";
            assertEquals("JBoss contact " + id + " has correct TLF",
                         expected, contact.getTlf());
         }
        
         updated = getContactsByTLF("UpdatedAgain");
         assertNotNull("Got updated contacts", updated);
         assertEquals("Updated contacts", 5, updated.size());
View Full Code Here

Examples of org.jabusuite.address.Contact

        return this.findDataset(id,true);
    }
   
    public Contact findDataset(long id, boolean withAdditionalData) {
        logger.debug("Searching for contact "+id);
        Contact contact = manager.find(Contact.class, id);
        return contact;
    }
View Full Code Here

Examples of org.jboss.as.quickstarts.wicketEar.ejbjar.model.Contact

    /**
     * Add a new Contact.
     */
    @Override
    public void addContact(String name, String email) {
        em.merge(new Contact(null, name, email));
    }
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.