Package io.jmix.dynmodelai.modelchange
Record Class MutationResult
java.lang.Object
java.lang.Record
io.jmix.dynmodelai.modelchange.MutationResult
public record MutationResult(@Nullable DynamicModelDefinition definition, @Nullable String message, List<MutationIssue> issues)
extends Record
A prepared candidate definition or the issues that prevented its creation.
Success means operation preconditions passed; migration validation is still required before use.
-
Constructor Summary
ConstructorsConstructorDescriptionMutationResult(@Nullable DynamicModelDefinition definition, @Nullable String message, List<MutationIssue> issues) Creates an instance of aMutationResultrecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable DynamicModelDefinitionReturns the value of thedefinitionrecord component.final booleanIndicates whether some other object is "equal to" this one.static MutationResultfailed(MutationIssue issue) static MutationResultfailed(List<MutationIssue> issues) final inthashCode()Returns a hash code value for this object.issues()Returns the value of theissuesrecord component.@Nullable Stringmessage()Returns the value of themessagerecord component.booleanok()static MutationResultok(DynamicModelDefinition definition, String message) final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
MutationResult
public MutationResult(@Nullable DynamicModelDefinition definition, @Nullable String message, List<MutationIssue> issues) Creates an instance of aMutationResultrecord class.- Parameters:
definition- the value for thedefinitionrecord componentmessage- the value for themessagerecord componentissues- the value for theissuesrecord component
-
-
Method Details
-
ok
public boolean ok() -
ok
-
failed
-
failed
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
definition
Returns the value of thedefinitionrecord component.- Returns:
- the value of the
definitionrecord component
-
message
Returns the value of themessagerecord component.- Returns:
- the value of the
messagerecord component
-
issues
Returns the value of theissuesrecord component.- Returns:
- the value of the
issuesrecord component
-