public abstract class Association
extends java.lang.Object
The root interface for all Associations (e.g. PersonAssociation
, BusinessAssociation
,
PhoneAssociation
, and LocationAssociation
).
The Whitepages API presents its data in a directed graph form, whereby:
Entity
, andAssociation
.Associations are a directed edge from a source entity node to a destination entity node. Since traversal starts from the source entity, there is only one accessor on the Assocation instance, which leads to the destination entity.
Constructor and Description |
---|
Association(EntityId entityId,
ResponseDictionary dictionary) |
Association(EntityId entityId,
ResponseDictionary dictionary,
TimePeriod validFor,
java.lang.Boolean historical,
java.util.Date contactCreationDate) |
Modifier and Type | Method and Description |
---|---|
java.util.Date |
getContactCreationDate() |
abstract Entity |
getEntity() |
EntityId |
getEntityId()
Returns the ID of the associated entity.
|
abstract EntityId.EntityType |
getEntityIdType() |
java.lang.Boolean |
getHistorical() |
TimePeriod |
getValidFor() |
void |
setContactCreationDate(java.util.Date contactCreationDate) |
void |
setHistorical(java.lang.Boolean historical) |
void |
setValidFor(TimePeriod validFor) |
public Association(EntityId entityId, ResponseDictionary dictionary)
public Association(EntityId entityId, ResponseDictionary dictionary, TimePeriod validFor, java.lang.Boolean historical, java.util.Date contactCreationDate)
public EntityId getEntityId()
public abstract Entity getEntity()
PersonAssociation.getPerson()
,
BusinessAssociation.getBusiness()
,
PhoneAssociation.getPhone()
, and
LocationAssociation.getLocation()
.public abstract EntityId.EntityType getEntityIdType()
public TimePeriod getValidFor()
public void setValidFor(TimePeriod validFor)
public java.lang.Boolean getHistorical()
public void setHistorical(java.lang.Boolean historical)
public java.util.Date getContactCreationDate()
public void setContactCreationDate(java.util.Date contactCreationDate)