Record Class BaseCrudService.SavedResult<ID,R>
java.lang.Object
java.lang.Record
org.praxisplatform.uischema.service.base.BaseCrudService.SavedResult<ID,R>
- Type Parameters:
ID- tipo do identificadorR- tipo projetado devolvido ao cliente
- Enclosing interface:
BaseCrudService<E,D, ID, FD extends GenericFilterDTO>
Resultado de criacao que carrega simultaneamente o identificador persistido e o corpo projetado.
Esse record existe para evitar que o controller precise extrair o ID e projetar o DTO em dois passos diferentes, preservando o boundary transacional no service.
-
Constructor Summary
ConstructorsConstructorDescriptionSavedResult(ID id, R body) Creates an instance of aSavedResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbody()Returns the value of thebodyrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SavedResult
Creates an instance of aSavedResultrecord class.- Parameters:
id- the value for theidrecord componentbody- the value for thebodyrecord component
-
-
Method Details
-
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). -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
body
Returns the value of thebodyrecord component.- Returns:
- the value of the
bodyrecord component
-