Record Class EndpointOptions

java.lang.Object
java.lang.Record
nl.datasteel.crudcraft.codegen.descriptor.model.part.EndpointOptions
Record Components:
template - the base endpoint template
omitEndpoints - endpoints to omit
includeEndpoints - endpoints to explicitly include
endpointPolicy - 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 Details

  • Method Details

    • getTemplate

      public CrudTemplate getTemplate()
      Returns the base endpoint template to use for this model.
      Returns:
      the CrudTemplate to use
    • omitEndpoints

      public CrudEndpoint[] omitEndpoints()
      Safe, defensive accessor for omitEndpoints.
    • getOmitEndpoints

      public CrudEndpoint[] getOmitEndpoints()
      Returns the endpoints that should be omitted for this model.
      Returns:
      array of CrudEndpoint to omit
    • includeEndpoints

      public CrudEndpoint[] includeEndpoints()
      Safe, defensive accessor for includeEndpoints.
    • getIncludeEndpoints

      public CrudEndpoint[] getIncludeEndpoints()
      Returns the endpoints that should be explicitly included for this model.
      Returns:
      array of CrudEndpoint to include
    • getEndpointPolicy

      public Class<? extends CrudEndpointPolicy> getEndpointPolicy()
      Returns the custom endpoint policy class for this model.
      Returns:
      the CrudEndpointPolicy class
    • equals

      public boolean equals(Object o)
      Checks if the EndpointOptions is equal to another object.
      Specified by:
      equals in class Record
      Parameters:
      o - the object to compare with
      Returns:
      true if the objects are equal, false otherwise
    • hashCode

      public int hashCode()
      Computes the hash code for the EndpointOptions.
      Specified by:
      hashCode in class Record
      Returns:
      the hash code based on template, omitEndpoints, includeEndpoints, and endpointPolicy
    • toString

      public String toString()
      Returns a string representation of the EndpointOptions.
      Specified by:
      toString in class Record
      Returns:
      a string describing the EndpointOptions
    • template

      public CrudTemplate template()
      Returns the value of the template record component.
      Returns:
      the value of the template record component
    • endpointPolicy

      public Class<? extends CrudEndpointPolicy> endpointPolicy()
      Returns the value of the endpointPolicy record component.
      Returns:
      the value of the endpointPolicy record component