org.tolven.app.entity
Class PlaceholderID

java.lang.Object
  extended by org.tolven.app.entity.PlaceholderID
All Implemented Interfaces:
java.io.Serializable

public class PlaceholderID
extends java.lang.Object
implements java.io.Serializable

This entity provides a cross reference between a placeholder in a sending account and a placeholder in a receiving account. For example, if a patient records their weight in their ePHR, it might have a placeholder id of ephr:patient-123:observation-456. If that observation is sent to the patient's provider, then in the provider's account, the patient will have a different ID at the provider and the observation will also have a different id. In other words, there is no direct correlation between MenuData in two different accounts. This entity provides the next best thing which is to consider the source account's ID to be useful for knowing when the sender is referring to the same patient (or other placeholder) without having any particular meaning to the receiving account.

The same ID can then be used when communicating back to the sender.

PlaceholderID's are not unique although an application can treat a placeholderID if it desired.

Author:
John Churin
See Also:
Serialized Form

Constructor Summary
PlaceholderID()
           
 
Method Summary
 boolean equals(java.lang.Object obj)
          Compare two PlaceholderId objects for equality.
 Account getAccount()
           
 java.lang.String getAssigningAuthority()
           
 java.lang.String getExtension()
           
 long getId()
           
 AccountMenuStructure getMenuStrucuture()
           
 MenuData getPlaceholder()
           
 java.lang.String getRoot()
           
 Account getSourceAccount()
           
 int hashCode()
          Return a hash code for this object.
 void setAccount(Account account)
           
 void setAssigningAuthority(java.lang.String assigningAuthority)
           
 void setExtension(java.lang.String extension)
           
 void setId(long id)
           
 void setMenuStrucuture(AccountMenuStructure menuStrucuture)
           
 void setPlaceholder(MenuData placeholder)
           
 void setRoot(java.lang.String root)
           
 void setSourceAccount(Account sourceAccount)
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlaceholderID

public PlaceholderID()
Method Detail

getAccount

public Account getAccount()

setAccount

public void setAccount(Account account)

getExtension

public java.lang.String getExtension()

setExtension

public void setExtension(java.lang.String extension)

getId

public long getId()

setId

public void setId(long id)

getPlaceholder

public MenuData getPlaceholder()

setPlaceholder

public void setPlaceholder(MenuData placeholder)

getRoot

public java.lang.String getRoot()

setRoot

public void setRoot(java.lang.String root)

getSourceAccount

public Account getSourceAccount()

setSourceAccount

public void setSourceAccount(Account sourceAccount)

equals

public boolean equals(java.lang.Object obj)
Compare two PlaceholderId objects for equality. MenuStructure is not included in the test because placeholder (MenuData) is more selective and implies MenuStructure.

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Return a hash code for this object. Note: The hashCode is based on the the extension only which is adequate for a hash.

Overrides:
hashCode in class java.lang.Object

getMenuStrucuture

public AccountMenuStructure getMenuStrucuture()

setMenuStrucuture

public void setMenuStrucuture(AccountMenuStructure menuStrucuture)

getAssigningAuthority

public java.lang.String getAssigningAuthority()

setAssigningAuthority

public void setAssigningAuthority(java.lang.String assigningAuthority)