Class ImmutableExecutionHistory.DetachedExecution
- java.lang.Object
-
- com.chutneytesting.server.core.domain.execution.history.ImmutableExecutionHistory.DetachedExecution
-
- All Implemented Interfaces:
ExecutionHistory.DetachedExecution,ExecutionHistory.ExecutionProperties
- Enclosing class:
- ImmutableExecutionHistory
@Immutable @CheckReturnValue public static final class ImmutableExecutionHistory.DetachedExecution extends Object implements ExecutionHistory.DetachedExecution
Immutable implementation ofExecutionHistory.DetachedExecution.Use the builder to create immutable instances:
ImmutableExecutionHistory.DetachedExecution.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableExecutionHistory.DetachedExecution.BuilderBuilds instances of typeDetachedExecution.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableExecutionHistory.DetachedExecution.Builderbuilder()Creates a builder forDetachedExecution.Optional<CampaignExecutionReport>campaignReport()static ImmutableExecutionHistory.DetachedExecutioncopyOf(ExecutionHistory.DetachedExecution instance)Creates an immutable copy of aExecutionHistory.DetachedExecutionvalue.Optional<String>datasetId()Optional<Integer>datasetVersion()longduration()Stringenvironment()booleanequals(Object another)This instance is equal to all instances ofDetachedExecutionthat have equal attribute values.Optional<String>error()inthashCode()Computes a hash code from attributes:time,duration,status,info,error,testCaseTitle,environment,datasetId,datasetVersion,user,campaignReport,report.Optional<String>info()Stringreport()ServerReportStatusstatus()StringtestCaseTitle()LocalDateTimetime()StringtoString()Prints the immutable valueDetachedExecutionwith attribute values.Stringuser()ImmutableExecutionHistory.DetachedExecutionwithCampaignReport(CampaignExecutionReport value)Copy the current immutable object by setting a present value for the optionalcampaignReportattribute.ImmutableExecutionHistory.DetachedExecutionwithCampaignReport(Optional<? extends CampaignExecutionReport> optional)Copy the current immutable object by setting an optional value for thecampaignReportattribute.ImmutableExecutionHistory.DetachedExecutionwithDatasetId(String value)Copy the current immutable object by setting a present value for the optionaldatasetIdattribute.ImmutableExecutionHistory.DetachedExecutionwithDatasetId(Optional<String> optional)Copy the current immutable object by setting an optional value for thedatasetIdattribute.ImmutableExecutionHistory.DetachedExecutionwithDatasetVersion(int value)Copy the current immutable object by setting a present value for the optionaldatasetVersionattribute.ImmutableExecutionHistory.DetachedExecutionwithDatasetVersion(Optional<Integer> optional)Copy the current immutable object by setting an optional value for thedatasetVersionattribute.ImmutableExecutionHistory.DetachedExecutionwithDuration(long value)Copy the current immutable object by setting a value for thedurationattribute.ImmutableExecutionHistory.DetachedExecutionwithEnvironment(String value)Copy the current immutable object by setting a value for theenvironmentattribute.ImmutableExecutionHistory.DetachedExecutionwithError(String value)Copy the current immutable object by setting a present value for the optionalerrorattribute.ImmutableExecutionHistory.DetachedExecutionwithError(Optional<String> optional)Copy the current immutable object by setting an optional value for theerrorattribute.ImmutableExecutionHistory.DetachedExecutionwithInfo(String value)Copy the current immutable object by setting a present value for the optionalinfoattribute.ImmutableExecutionHistory.DetachedExecutionwithInfo(Optional<String> optional)Copy the current immutable object by setting an optional value for theinfoattribute.ImmutableExecutionHistory.DetachedExecutionwithReport(String value)Copy the current immutable object by setting a value for thereportattribute.ImmutableExecutionHistory.DetachedExecutionwithStatus(ServerReportStatus value)Copy the current immutable object by setting a value for thestatusattribute.ImmutableExecutionHistory.DetachedExecutionwithTestCaseTitle(String value)Copy the current immutable object by setting a value for thetestCaseTitleattribute.ImmutableExecutionHistory.DetachedExecutionwithTime(LocalDateTime value)Copy the current immutable object by setting a value for thetimeattribute.ImmutableExecutionHistory.DetachedExecutionwithUser(String value)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, wait
-
Methods inherited from interface com.chutneytesting.server.core.domain.execution.history.ExecutionHistory.DetachedExecution
attach
-
-
-
-
Method Detail
-
time
public LocalDateTime 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
public ServerReportStatus status()
- Specified by:
statusin interfaceExecutionHistory.ExecutionProperties- Returns:
- The value of the
statusattribute
-
info
public Optional<String> info()
- Specified by:
infoin interfaceExecutionHistory.ExecutionProperties- Returns:
- The value of the
infoattribute
-
error
public Optional<String> error()
- Specified by:
errorin interfaceExecutionHistory.ExecutionProperties- Returns:
- The value of the
errorattribute
-
testCaseTitle
public String testCaseTitle()
- Specified by:
testCaseTitlein interfaceExecutionHistory.ExecutionProperties- Returns:
- The value of the
testCaseTitleattribute
-
environment
public String environment()
- Specified by:
environmentin interfaceExecutionHistory.ExecutionProperties- Returns:
- The value of the
environmentattribute
-
datasetId
public Optional<String> datasetId()
- Specified by:
datasetIdin interfaceExecutionHistory.ExecutionProperties- Returns:
- The value of the
datasetIdattribute
-
datasetVersion
public Optional<Integer> datasetVersion()
- Specified by:
datasetVersionin interfaceExecutionHistory.ExecutionProperties- Returns:
- The value of the
datasetVersionattribute
-
user
public String user()
- Specified by:
userin interfaceExecutionHistory.ExecutionProperties- Returns:
- The value of the
userattribute
-
campaignReport
public Optional<CampaignExecutionReport> campaignReport()
- Specified by:
campaignReportin interfaceExecutionHistory.ExecutionProperties- Returns:
- The value of the
campaignReportattribute
-
report
public String report()
- Returns:
- The value of the
reportattribute
-
withTime
public final ImmutableExecutionHistory.DetachedExecution withTime(LocalDateTime value)
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
public final ImmutableExecutionHistory.DetachedExecution withDuration(long value)
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
public final ImmutableExecutionHistory.DetachedExecution withStatus(ServerReportStatus value)
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
public final ImmutableExecutionHistory.DetachedExecution withInfo(String value)
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
public final ImmutableExecutionHistory.DetachedExecution withInfo(Optional<String> optional)
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
public final ImmutableExecutionHistory.DetachedExecution withError(String value)
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
public final ImmutableExecutionHistory.DetachedExecution withError(Optional<String> optional)
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
public final ImmutableExecutionHistory.DetachedExecution withTestCaseTitle(String value)
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
public final ImmutableExecutionHistory.DetachedExecution withEnvironment(String value)
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
public final ImmutableExecutionHistory.DetachedExecution withDatasetId(String value)
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
public final ImmutableExecutionHistory.DetachedExecution withDatasetId(Optional<String> optional)
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
public final ImmutableExecutionHistory.DetachedExecution withDatasetVersion(int value)
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
public final ImmutableExecutionHistory.DetachedExecution withDatasetVersion(Optional<Integer> optional)
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
public final ImmutableExecutionHistory.DetachedExecution withUser(String value)
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
public final ImmutableExecutionHistory.DetachedExecution withCampaignReport(CampaignExecutionReport value)
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.DetachedExecution 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
public final ImmutableExecutionHistory.DetachedExecution withReport(String value)
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
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofDetachedExecutionthat 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.
-
toString
public String toString()
Prints the immutable valueDetachedExecutionwith attribute values.
-
copyOf
public static ImmutableExecutionHistory.DetachedExecution copyOf(ExecutionHistory.DetachedExecution instance)
Creates an immutable copy of aExecutionHistory.DetachedExecutionvalue. 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 DetachedExecution instance
-
builder
public static ImmutableExecutionHistory.DetachedExecution.Builder builder()
Creates a builder forDetachedExecution.ImmutableExecutionHistory.DetachedExecution.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.build();- Returns:
- A new DetachedExecution builder
-
-