Class MethodMetadataHelper

java.lang.Object
io.jmix.core.impl.repository.support.method_metadata.MethodMetadataHelper

public class MethodMetadataHelper extends Object
Contains MethodMetadata analyse logic such as ApplyConstraints determination.
  • Constructor Details

    • MethodMetadataHelper

      public MethodMetadataHelper()
  • Method Details

    • collectMethodMetadata

      public static CrudMethodMetadata collectMethodMetadata(Method method, Class<?> repositoryInterface)
    • determineApplyConstraints

      public static ApplyConstraints determineApplyConstraints(Method method, Class<?> repositoryInterface)
      Determines ApplyConstraints for particular repository query as follows:
      1. look for annotation on method hierarchy starting from method;
      2. if not found, search through repository interface hierarchy starting from specified repositoryInterface;
      3. annotation from base JmixDataRepository will be returned if no other annotation determined on application repositories

      Based on logic for Transactional annotation as determined in org.springframework.data.repository.core.support.TransactionalRepositoryProxyPostProcessor.RepositoryAnnotationTransactionAttributeSource#computeTransactionAttribute(java.lang.reflect.Method, java.lang.Class)

      Parameters:
      method - for which search performed
      repositoryInterface - that currently instantiating
      Returns:
      ApplyConstraints
      Throws:
      RuntimeException - in case of repositoryInterface is not inherited from JmixDataRepository
    • determineQueryHints

      public static Map<String,Serializable> determineQueryHints(Method method)