Dekoh platform API

dekoh.portal.fwk.persistence
Class Buddy

java.lang.Object
  extended by dekoh.portal.fwk.persistence.Buddy

public class Buddy
extends Object

Since:
Nov 3, 2006

Constructor Summary
protected Buddy()
           
protected Buddy(String contactKey)
           
 
Method Summary
 boolean equals(Object o)
           
static Buddy findBuddyByContactKey(String contactKey, DIOEntityManager em)
           
 Contact getContact()
           
 String getContactKey()
           
 String getDekohId()
           
 String getDisplayName()
           
 int getId()
           
static Buddy getOrCreateBuddyByContactKey(String contactKey, DIOEntityManager em)
           
static Buddy getOrCreateBuddyByContactKey(String contactKey, DIOEntityManagerFactory emf)
           
 Set getShares()
           
 Set getSharesFromUser(DIOEntityManager em, String shareOwner, String applicationId)
           
 Set getSharesFromUser(String shareOwner, String applicationId)
          Deprecated. does not include pubic shares. Use Buddy.getSharesFromUser(DIOEntityManager, String, String)
 int hashCode()
           
 boolean representsPublicContact()
           
 void setShares(Set shares)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Buddy

protected Buddy()

Buddy

protected Buddy(String contactKey)
Method Detail

getId

public int getId()

getDisplayName

public String getDisplayName()
Returns:
null when could not connect to network there get profile for contact key.

getContact

public Contact getContact()

getDekohId

public String getDekohId()

getContactKey

public String getContactKey()

getShares

public Set getShares()

getSharesFromUser

public Set getSharesFromUser(DIOEntityManager em,
                             String shareOwner,
                             String applicationId)
Parameters:
em -
shareOwner -
applicationId -
Returns:
returns Shares for the this buddy and public shares created by the shareOwner

getSharesFromUser

public Set getSharesFromUser(String shareOwner,
                             String applicationId)
Deprecated. does not include pubic shares. Use Buddy.getSharesFromUser(DIOEntityManager, String, String)

Parameters:
shareOwner -
applicationId -
Returns:

setShares

public void setShares(Set shares)

getOrCreateBuddyByContactKey

public static Buddy getOrCreateBuddyByContactKey(String contactKey,
                                                 DIOEntityManagerFactory emf)

getOrCreateBuddyByContactKey

public static Buddy getOrCreateBuddyByContactKey(String contactKey,
                                                 DIOEntityManager em)

representsPublicContact

public boolean representsPublicContact()

findBuddyByContactKey

public static Buddy findBuddyByContactKey(String contactKey,
                                          DIOEntityManager em)

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

Dekoh platform API

© 2009 Pramati Technologies - Dekoh - Portal for Developers