Class CountMethodImplementor

    • Constructor Detail

      • CountMethodImplementor

        public CountMethodImplementor​(io.quarkus.deployment.Capabilities capabilities)
    • Method Detail

      • implementInternal

        protected void implementInternal​(io.quarkus.gizmo.ClassCreator classCreator,
                                         ResourceMetadata resourceMetadata,
                                         ResourceProperties resourceProperties,
                                         io.quarkus.gizmo.FieldDescriptor resourceField)
        Generate JAX-RS GET method. The RESTEasy Classic version exposes RestDataResource.count().
         
         @GET
         @Path("/count")
         public long count() {
             try {
                 return resource.count();
             } catch (Throwable t) {
                 throw new RestDataPanacheException(t);
             }
         }
         
         
        The RESTEasy Reactive version exposes ReactiveRestDataResource.count() and the generated code looks more or less like this:
         
         @GET
         @Path("/count")
         @LinkResource(rel = "count", entityClassName = "com.example.Entity")
         public Uni<Long> count() {
             try {
                 return resource.count();
             } catch (Throwable t) {
                 throw new RestDataPanacheException(t);
             }
         }
         
         
        Specified by:
        implementInternal in class StandardMethodImplementor