@Entity public class ExternalCall extends SuperEntity<Long>
Entity ID contains real entity ID for operations which change existing data or correlationID for operations which creates new data.
Special case are confirmations which have operation with the name ""confirmation""
and entity ID will be set to message ID
.
There are only confirmations which failed previously.
Modifier and Type | Field and Description |
---|---|
static String |
CONFIRM_OPERATION |
Constructor and Description |
---|
ExternalCall() |
Modifier and Type | Method and Description |
---|---|
static ExternalCall |
createFailedConfirmation(Message msg)
Creates new
failed confirmation call. |
static ExternalCall |
createProcessingCall(String operationName,
String entityId,
Message msg)
Creates a new external call with
processing state. |
boolean |
equals(Object obj)
Two entities are equal if their ID is equal.
|
Instant |
getCreationTimestamp()
Gets creation date of this entity.
|
String |
getEntityId()
Gets entity ID.
|
int |
getFailedCount()
Gets count of failed tries.
|
Long |
getId()
Gets unique external call ID.
|
Instant |
getLastUpdateTimestamp()
Gets timestamp when the entity was changed last time.
|
Message |
getMessage()
Gets main asynch.
|
Long |
getMsgId()
Gets parent message ID.
|
Instant |
getMsgTimestamp()
Gets message timestamp from source system.
|
String |
getOperationName()
Gets target operation identification (e.g.
|
ExternalCallStateEnum |
getState()
Gets state of processing.
|
boolean |
isConfirmationCall()
Gets
true when external call represents confirmation call. |
void |
setCreationTimestamp(Instant creationTimestamp) |
void |
setEntityId(String entityId) |
void |
setFailedCount(int failedCount) |
void |
setId(Long id)
Sets unique identifier of the entity.
|
void |
setLastUpdateTimestamp(Instant lastUpdateTimestamp) |
void |
setMessage(Message message) |
void |
setMsgId(Long msgId) |
void |
setMsgTimestamp(Instant msgTimestamp) |
void |
setOperationName(String operationName) |
void |
setState(ExternalCallStateEnum state) |
String |
toHumanString()
Returns human readable entity identification with start and end round brackets.
|
String |
toString() |
hashCode, isNew
public static final String CONFIRM_OPERATION
public static ExternalCall createFailedConfirmation(Message msg)
failed
confirmation call.msg
- the messagepublic static ExternalCall createProcessingCall(String operationName, String entityId, Message msg)
processing
state.operationName
- the name of operationentityId
- the ID of entity (external ID as constraint of processing)msg
- the messagepublic Long getId()
getId
in interface Identifiable<Long>
getId
in class SuperEntity<Long>
public void setId(Long id)
Identifiable
setId
in interface Identifiable<Long>
setId
in class SuperEntity<Long>
id
- unique identifierpublic Long getMsgId()
public void setMsgId(Long msgId)
public Message getMessage()
public void setMessage(Message message)
public String getOperationName()
public void setOperationName(String operationName)
public ExternalCallStateEnum getState()
public void setState(ExternalCallStateEnum state)
public String getEntityId()
public void setEntityId(String entityId)
public Instant getCreationTimestamp()
public void setCreationTimestamp(Instant creationTimestamp)
public Instant getLastUpdateTimestamp()
public void setLastUpdateTimestamp(Instant lastUpdateTimestamp)
public Instant getMsgTimestamp()
Message.getMsgTimestamp()
public void setMsgTimestamp(Instant msgTimestamp)
public int getFailedCount()
isConfirmationCall()
is true
.public void setFailedCount(int failedCount)
public boolean isConfirmationCall()
true
when external call represents confirmation call.true
for confirmation call, otherwise false
public boolean equals(Object obj)
SuperEntity
equals
in class SuperEntity<Long>
public String toString()
toString
in class SuperEntity<Long>
public String toHumanString()
HumanReadable
toHumanString
in interface HumanReadable
toHumanString
in class SuperEntity<Long>
Copyright © 2018 Pivotal Software, Inc.. All rights reserved.