public interface ExternalReferenceManager
Modifier and Type | Method and Description |
---|---|
void |
deactivate(ExternalReference er)
Confirms that the xid and xref values in an XPair belong
to current partner and are of the expected type.
|
ExternalReference |
disable(ExternalReference er)
Disables an external reference
|
ExternalReference |
enable(ExternalReference er) |
ExternalReference |
findByRef(ExternalReferenceType refType,
java.lang.String extRef)
Returns the ExternalReference for a particular entity.
|
ExternalReference |
findByTargetId(ExternalReferenceType refType,
int targetId)
Returns the ExternalReference for a particular database ID.
|
ExternalReference |
findByXid(ExternalReferenceType refType,
int xid)
For internal use only by SDK Manager code.
|
ExternalReference |
findByXinfo(XInfo xinfo)
Returns the ExternalReference for a particular entity
|
java.util.List<ExternalReference> |
findByXrefs(java.util.List<java.lang.String> xRefs,
ExternalReferenceType xRefType) |
ExternalReferenceType |
getRefType(java.lang.String extRef)
Returns an external reference's type
|
int |
getXId(XInfo xinfo) |
boolean |
partnerOwnsXinfo(XInfo xinfo)
Returns whether a partner owns a particular reference
|
ExternalReference |
partnerPersist(int partnerId,
java.lang.String xref) |
ExternalReference |
persist(ExternalReferenceType refType,
java.lang.String xref,
int targetId)
Creates an ExternalReference to a particular entity.
|
ExternalReference persist(ExternalReferenceType refType, java.lang.String xref, int targetId) throws AlreadyExistsException
partnerRef
- Partner referencerefType
- Entity typedbid
- Database ID of the entity.NotFoundException
- If partnerRef was not foundAlreadyExistsException
- If an external reference already exists for this entityExternalReference partnerPersist(int partnerId, java.lang.String xref) throws AlreadyExistsException
AlreadyExistsException
ExternalReference findByXinfo(XInfo xinfo) throws NotFoundException
xinfo
- Contains the external reference info (an xid and xref) to locate
the full referenceNotFoundException
- IfExternalReference findByXid(ExternalReferenceType refType, int xid) throws NotFoundException
SDK-based applications that use this method do so at their own peril of sudden and unexpected behavior and errors. :-)
NotFoundException
ExternalReference findByRef(ExternalReferenceType refType, java.lang.String extRef) throws NotFoundException
refType
- External reference typeextRef
- The external reference (a UUID) of interest.NotFoundException
- If a match is not foundInvalidPartnerException
ExternalReference findByTargetId(ExternalReferenceType refType, int targetId) throws NotFoundException
refType
- External reference typetargetId
- Internal database ID of interestNotFoundException
InvalidPartnerException
ExternalReferenceType getRefType(java.lang.String extRef) throws NotFoundException
extRef
- The external reference (a UUID) of interest.NotFoundException
InvalidPartnerException
boolean partnerOwnsXinfo(XInfo xinfo)
xinfo
- The XPair
of interestInvalidPartnerException
ExternalReference disable(ExternalReference er) throws NotFoundException
er
- External reference to disableNotFoundException
- If the specified External Reference does not existInvalidPartnerException
ExternalReference enable(ExternalReference er) throws NotFoundException
er
- NotFoundException
void deactivate(ExternalReference er) throws NotFoundException
xinfo
- XPair to examineNotFoundException
- If either the xid or xref are not found, do not belong to the
provided partner reference, or are of the wrong typeInvalidPartnerException
int getXId(XInfo xinfo)
java.util.List<ExternalReference> findByXrefs(java.util.List<java.lang.String> xRefs, ExternalReferenceType xRefType) throws NotFoundException
NotFoundException