Class ImmutableExecutionHistory.Execution
java.lang.Object
com.chutneytesting.server.core.domain.execution.history.ImmutableExecutionHistory.Execution
- All Implemented Interfaces:
ExecutionHistory.Attached,ExecutionHistory.Execution,ExecutionHistory.ExecutionProperties
- Enclosing class:
- ImmutableExecutionHistory
@Immutable
@CheckReturnValue
public static final class ImmutableExecutionHistory.Execution
extends Object
implements ExecutionHistory.Execution
Immutable implementation of
ExecutionHistory.Execution.
Use the builder to create immutable instances:
ImmutableExecutionHistory.Execution.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forExecution.copyOf(ExecutionHistory.Execution instance) Creates an immutable copy of aExecutionHistory.Executionvalue.longduration()booleanThis instance is equal to all instances ofExecutionthat have equal attribute values.error()inthashCode()Computes a hash code from attributes:time,duration,status,info,error,testCaseTitle,environment,datasetId,datasetVersion,user,campaignReport,report,executionId.info()report()status()time()toString()Prints the immutable valueExecutionwith attribute values.user()Copy the current immutable object by setting a present value for the optionalcampaignReportattribute.withCampaignReport(Optional<? extends CampaignExecutionReport> optional) Copy the current immutable object by setting an optional value for thecampaignReportattribute.withDatasetId(String value) Copy the current immutable object by setting a present value for the optionaldatasetIdattribute.withDatasetId(Optional<String> optional) Copy the current immutable object by setting an optional value for thedatasetIdattribute.withDatasetVersion(int value) Copy the current immutable object by setting a present value for the optionaldatasetVersionattribute.withDatasetVersion(Optional<Integer> optional) Copy the current immutable object by setting an optional value for thedatasetVersionattribute.withDuration(long value) Copy the current immutable object by setting a value for thedurationattribute.withEnvironment(String value) Copy the current immutable object by setting a value for theenvironmentattribute.Copy the current immutable object by setting a present value for the optionalerrorattribute.Copy the current immutable object by setting an optional value for theerrorattribute.withExecutionId(Long value) Copy the current immutable object by setting a value for theexecutionIdattribute.Copy the current immutable object by setting a present value for the optionalinfoattribute.Copy the current immutable object by setting an optional value for theinfoattribute.withReport(String value) Copy the current immutable object by setting a value for thereportattribute.withStatus(ServerReportStatus value) Copy the current immutable object by setting a value for thestatusattribute.withTestCaseTitle(String value) Copy the current immutable object by setting a value for thetestCaseTitleattribute.withTime(LocalDateTime value) Copy the current immutable object by setting a value for thetimeattribute.Copy the current immutable object by setting a value for theuserattribute.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.chutneytesting.server.core.domain.execution.history.ExecutionHistory.Execution
summary
-
Method Details
-
time
- Specified by:
timein interfaceExecutionHistory.ExecutionProperties- Returns:
- The value of the
timeattribute
-
duration
public long duration()- Specified by:
durationin interfaceExecutionHistory.ExecutionProperties- Returns:
- The value of the
durationattribute
-
status
- Specified by:
statusin interfaceExecutionHistory.ExecutionProperties- Returns:
- The value of the
statusattribute
-
info
- Specified by:
infoin interfaceExecutionHistory.ExecutionProperties- Returns:
- The value of the
infoattribute
-
error
- Specified by:
errorin interfaceExecutionHistory.ExecutionProperties- Returns:
- The value of the
errorattribute
-
testCaseTitle
- Specified by:
testCaseTitlein interfaceExecutionHistory.ExecutionProperties- Returns:
- The value of the
testCaseTitleattribute
-
environment
- Specified by:
environmentin interfaceExecutionHistory.ExecutionProperties- Returns:
- The value of the
environmentattribute
-
datasetId
- Specified by:
datasetIdin interfaceExecutionHistory.ExecutionProperties- Returns:
- The value of the
datasetIdattribute
-
datasetVersion
- Specified by:
datasetVersionin interfaceExecutionHistory.ExecutionProperties- Returns:
- The value of the
datasetVersionattribute
-
user
- Specified by:
userin interfaceExecutionHistory.ExecutionProperties- Returns:
- The value of the
userattribute
-
campaignReport
- Specified by:
campaignReportin interfaceExecutionHistory.ExecutionProperties- Returns:
- The value of the
campaignReportattribute
-
report
- Returns:
- The value of the
reportattribute
-
executionId
- Specified by:
executionIdin interfaceExecutionHistory.Attached- Returns:
- The value of the
executionIdattribute
-
withTime
Copy the current immutable object by setting a value for thetimeattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for time- Returns:
- A modified copy of the
thisobject
-
withDuration
Copy the current immutable object by setting a value for thedurationattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for duration- Returns:
- A modified copy of the
thisobject
-
withStatus
Copy the current immutable object by setting a value for thestatusattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for status- Returns:
- A modified copy of the
thisobject
-
withInfo
Copy the current immutable object by setting a present value for the optionalinfoattribute.- Parameters:
value- The value for info- Returns:
- A modified copy of
thisobject
-
withInfo
Copy the current immutable object by setting an optional value for theinfoattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for info- Returns:
- A modified copy of
thisobject
-
withError
Copy the current immutable object by setting a present value for the optionalerrorattribute.- Parameters:
value- The value for error- Returns:
- A modified copy of
thisobject
-
withError
Copy the current immutable object by setting an optional value for theerrorattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for error- Returns:
- A modified copy of
thisobject
-
withTestCaseTitle
Copy the current immutable object by setting a value for thetestCaseTitleattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for testCaseTitle- Returns:
- A modified copy of the
thisobject
-
withEnvironment
Copy the current immutable object by setting a value for theenvironmentattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for environment- Returns:
- A modified copy of the
thisobject
-
withDatasetId
Copy the current immutable object by setting a present value for the optionaldatasetIdattribute.- Parameters:
value- The value for datasetId- Returns:
- A modified copy of
thisobject
-
withDatasetId
Copy the current immutable object by setting an optional value for thedatasetIdattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for datasetId- Returns:
- A modified copy of
thisobject
-
withDatasetVersion
Copy the current immutable object by setting a present value for the optionaldatasetVersionattribute.- Parameters:
value- The value for datasetVersion- Returns:
- A modified copy of
thisobject
-
withDatasetVersion
Copy the current immutable object by setting an optional value for thedatasetVersionattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for datasetVersion- Returns:
- A modified copy of
thisobject
-
withUser
Copy the current immutable object by setting a value for theuserattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for user- Returns:
- A modified copy of the
thisobject
-
withCampaignReport
Copy the current immutable object by setting a present value for the optionalcampaignReportattribute.- Parameters:
value- The value for campaignReport- Returns:
- A modified copy of
thisobject
-
withCampaignReport
public final ImmutableExecutionHistory.Execution withCampaignReport(Optional<? extends CampaignExecutionReport> optional) Copy the current immutable object by setting an optional value for thecampaignReportattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for campaignReport- Returns:
- A modified copy of
thisobject
-
withReport
Copy the current immutable object by setting a value for thereportattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for report- Returns:
- A modified copy of the
thisobject
-
withExecutionId
Copy the current immutable object by setting a value for theexecutionIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for executionId- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofExecutionthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:time,duration,status,info,error,testCaseTitle,environment,datasetId,datasetVersion,user,campaignReport,report,executionId. -
toString
Prints the immutable valueExecutionwith attribute values. -
copyOf
Creates an immutable copy of aExecutionHistory.Executionvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable Execution instance
-
builder
Creates a builder forExecution.ImmutableExecutionHistory.Execution.builder() .time(java.time.LocalDateTime) // requiredtime.duration(long) // requiredduration.status(com.chutneytesting.server.core.domain.execution.report.ServerReportStatus) // requiredstatus.info(String) // optionalinfo.error(String) // optionalerror.testCaseTitle(String) // requiredtestCaseTitle.environment(String) // requiredenvironment.datasetId(String) // optionaldatasetId.datasetVersion(Integer) // optionaldatasetVersion.user(String) // requireduser.campaignReport(com.chutneytesting.server.core.domain.scenario.campaign.CampaignExecutionReport) // optionalcampaignReport.report(String) // requiredreport.executionId(Long) // requiredexecutionId.build();- Returns:
- A new Execution builder
-