Class FilterableRepositoryImplementor

java.lang.Object
com.github.mcollovati.quarkus.hilla.deployment.FilterableRepositoryImplementor
All Implemented Interfaces:
BiFunction<String,org.objectweb.asm.ClassVisitor,org.objectweb.asm.ClassVisitor>

public class FilterableRepositoryImplementor extends Object implements BiFunction<String,org.objectweb.asm.ClassVisitor,org.objectweb.asm.ClassVisitor>
Generates runtime implementation of FilterableRepository methods. The generated list and count methods delegate the call to FilterableRepositorySupport, with the addition of the Class of the entity that the repository is supposed to handle. For Panache, an addition isNew method is generated. This method reads the value of the entity @Id to determine if the entity is new or not. isNew is used by the CrudRepositoryService implementation for Panache, to chose if save should call persist or merge to save the entity. The byte code instrumentation for isNew is mostly taken by the spring-data-jpa Quarkus extension. Credits goes to the original authors of the code. See https://github.com/quarkusio/quarkus/blob/main/extensions/spring-data-jpa/deployment/src/main/java/io/quarkus/spring/data/deployment/generate/StockMethodsAdder.java for additional information.
  • Field Details

    • OBJECT

      public static final org.jboss.jandex.DotName OBJECT
    • PRIMITIVE_LONG

      public static final org.jboss.jandex.DotName PRIMITIVE_LONG
    • PRIMITIVE_INTEGER

      public static final org.jboss.jandex.DotName PRIMITIVE_INTEGER
    • JPA_ID

      public static final org.jboss.jandex.DotName JPA_ID
    • JPA_EMBEDDED_ID

      public static final org.jboss.jandex.DotName JPA_EMBEDDED_ID
  • Constructor Details

    • FilterableRepositoryImplementor

      public FilterableRepositoryImplementor(org.jboss.jandex.IndexView index, org.jboss.jandex.DotName filterableRepositoryInterface)
  • Method Details

    • apply

      public org.objectweb.asm.ClassVisitor apply(String className, org.objectweb.asm.ClassVisitor classVisitor)
      Specified by:
      apply in interface BiFunction<String,org.objectweb.asm.ClassVisitor,org.objectweb.asm.ClassVisitor>