Record Class EndpointOptions
java.lang.Object
java.lang.Record
nl.datasteel.crudcraft.codegen.descriptor.model.part.EndpointOptions
- Record Components:
template
- the base endpoint templateomitEndpoints
- endpoints to omitincludeEndpoints
- endpoints to explicitly includeendpointPolicy
- custom policy class resolving endpoints
public record EndpointOptions(CrudTemplate template, CrudEndpoint[] omitEndpoints, CrudEndpoint[] includeEndpoints, Class<? extends CrudEndpointPolicy> endpointPolicy)
extends Record
Options related to endpoint generation for a model.
-
Constructor Summary
ConstructorsConstructorDescriptionEndpointOptions
(CrudTemplate template, CrudEndpoint[] omitEndpoints, CrudEndpoint[] includeEndpoints, Class<? extends CrudEndpointPolicy> endpointPolicy) Immutable constructor for EndpointOptions. -
Method Summary
Modifier and TypeMethodDescriptionClass
<? extends CrudEndpointPolicy> Returns the value of theendpointPolicy
record component.boolean
Checks if the EndpointOptions is equal to another object.Class
<? extends CrudEndpointPolicy> Returns the custom endpoint policy class for this model.Returns the endpoints that should be explicitly included for this model.Returns the endpoints that should be omitted for this model.Returns the base endpoint template to use for this model.int
hashCode()
Computes the hash code for the EndpointOptions.Safe, defensive accessor for includeEndpoints.Safe, defensive accessor for omitEndpoints.template()
Returns the value of thetemplate
record component.toString()
Returns a string representation of the EndpointOptions.
-
Constructor Details
-
EndpointOptions
public EndpointOptions(CrudTemplate template, CrudEndpoint[] omitEndpoints, CrudEndpoint[] includeEndpoints, Class<? extends CrudEndpointPolicy> endpointPolicy) Immutable constructor for EndpointOptions.
-
-
Method Details
-
getTemplate
Returns the base endpoint template to use for this model.- Returns:
- the CrudTemplate to use
-
omitEndpoints
Safe, defensive accessor for omitEndpoints. -
getOmitEndpoints
Returns the endpoints that should be omitted for this model.- Returns:
- array of CrudEndpoint to omit
-
includeEndpoints
Safe, defensive accessor for includeEndpoints. -
getIncludeEndpoints
Returns the endpoints that should be explicitly included for this model.- Returns:
- array of CrudEndpoint to include
-
getEndpointPolicy
Returns the custom endpoint policy class for this model.- Returns:
- the CrudEndpointPolicy class
-
equals
Checks if the EndpointOptions is equal to another object. -
hashCode
public int hashCode()Computes the hash code for the EndpointOptions. -
toString
Returns a string representation of the EndpointOptions. -
template
Returns the value of thetemplate
record component.- Returns:
- the value of the
template
record component
-
endpointPolicy
Returns the value of theendpointPolicy
record component.- Returns:
- the value of the
endpointPolicy
record component
-