Class SQLExtractor

  • Direct Known Subclasses:
    SQLExtractor

    public class SQLExtractor
    extends java.lang.Object
    The SQLExtractor allows you to extract the underlying SQL query generated by a JPQL or JPA Criteria API query.

    For more details about how to use it, check out this article on vladmihalcea.com.

    Since:
    2.9.11
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected SQLExtractor()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String from​(javax.persistence.Query query)
      Get the underlying SQL generated by the provided JPA query.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SQLExtractor

        protected SQLExtractor()
    • Method Detail

      • from

        public static java.lang.String from​(javax.persistence.Query query)
        Get the underlying SQL generated by the provided JPA query.
        Parameters:
        query - JPA query
        Returns:
        the underlying SQL generated by the provided JPA query