Class QueryKey

java.lang.Object
io.jmix.eclipselink.impl.entitycache.QueryKey
All Implemented Interfaces:
Serializable

public class QueryKey extends Object implements Serializable
See Also:
  • Field Details

    • queryString

      protected final String queryString
    • firstRow

      protected final int firstRow
    • maxRows

      protected final int maxRows
    • softDeletion

      protected final boolean softDeletion
    • singleResult

      protected final boolean singleResult
    • normalizedParameters

      protected final Object[] normalizedParameters
      Named parameters with names replaced by normalized_param_{i} string, where i - order in query string
    • positionalParameters

      protected final Object[] positionalParameters
    • additionalCriteriaParameters

      protected final Object[] additionalCriteriaParameters
    • hashCode

      protected final int hashCode
    • originalQueryString

      protected final transient String originalQueryString
      !!!WARNING!!! DO NOT USE COLLECTIONS IN KEYS WITH HAZELCAST. At least HashMap serialized/deserialized by hazelcast in undetermined way which leads to inability to get value by valid key.
    • originalNamedParameters

      protected final transient Map<String,Object> originalNamedParameters
    • id

      protected final transient UUID id
    • PARAMETER_TEMPLATE_PATTERN

      protected static final Pattern PARAMETER_TEMPLATE_PATTERN
  • Constructor Details

    • QueryKey

      protected QueryKey(String queryString, int firstRow, int maxRows, boolean softDeletion, boolean singleResult, Map<String,Object> namedParameters, Object[] positionalParameters, Map<String,Object> additionalCriteriaParameters)
  • Method Details

    • create

      public static QueryKey create(String queryString, boolean softDeletion, boolean singleResult, jakarta.persistence.Query jpaQuery, Map<String,Object> additionalCriteriaParameters)
    • getId

      public UUID getId()
    • printDescription

      public String printDescription()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • equalsFields

      protected boolean equalsFields(QueryKey queryKey)
    • equalsParams

      protected boolean equalsParams(QueryKey queryKey)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • generateHashCode

      protected int generateHashCode()
    • generateMapHashCode

      protected int generateMapHashCode(Map<String,Object> map)
    • mapEquals

      protected boolean mapEquals(Map<String,Object> a, Map<String,Object> b)
    • generateArrayHashCode

      protected int generateArrayHashCode(Object array)