Issues Query

open class IssuesQuery<T : IssueAnalytic?> : FilteredQuery<T>

The IssuesQuery class is useful to execute the query to retrieve the issues data from the database with the possibility to dynamically filter that query with the CriteriaBuilder's logic

Author

N7ghtm4r3 - Tecknobit

Parameters

<T>

The type of the issues to retrieve

See also

FilteredQuery

Inheritors

Constructors

Link copied to clipboard
constructor(issueType: Class<T>, entityManager: EntityManager, platform: Platform, applicationId: String, rawFilters: Set<String>)
Constructor to init the IssuesQuery

Properties

Link copied to clipboard
protected val applicationId: String
applicationId the identifier of the application
Link copied to clipboard
private val BRAND_PATTERN: Pattern
BRAND_PATTERN the pattern to validate the brands values
Link copied to clipboard
private val BRAND_REGEX: String = "^(Pixel|Apple|Samsung|Google|OnePlus|Sony|Motorola|Oppo|Vivo|Nokia|HTC|Asus|Realme|Honor|ZTE|Dell|HP|Lenovo|Acer|Razer|Microsoft|MSI|Toshiba|LG|Huawei|Amazon|Xiaomi|RCA|iMac|Alienware|ASUS ROG|HP Omen|Gigabyte AORUS|Corsair|Lenovo Legion|Dell G Series)$"
BRAND_REGEX regex to validate the brands values
Link copied to clipboard
protected val BROWSER_PATTERN: Pattern
BROWSER_PATTERN the pattern to validate the browsers values
Link copied to clipboard
private val BROWSER_REGEX: String = "^(Google Chrome|Safari|Microsoft Edge|Mozilla Firefox|Opera|Samsung Internet|Brave|Vivaldi|Tor Browser|Epic Privacy Browser|Maxthon)$"
BROWSER_REGEX regex to validate the browsers values
Link copied to clipboard
protected val criteriaBuilder: CriteriaBuilder
Link copied to clipboard
private val DATE_PATTERN: Pattern
DATE_PATTERN the pattern to validate the date values
Link copied to clipboard
private val DATE_REGEX: String = "\b(0?[1-9]|[12][0-9]|3[01])/(0?[1-9]|1[0-2])/\d{4}(\s+([01]?[0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9])?\b"
DATE_REGEX regex to validate the date values
Link copied to clipboard
protected val device: Join<T, AmetistaDevice>
device the device related to the root retrieved with the Join
Link copied to clipboard
protected val entityManager: EntityManager
Link copied to clipboard
private val MODEL_PATTERN: Pattern
MODEL_PATTERN the pattern to validate the models values
Link copied to clipboard
private val MODEL_REGEX: String = "^(?!^(Google Chrome|Safari|Microsoft Edge|Mozilla Firefox|Opera|Samsung Internet|Brave|Vivaldi|Tor Browser|Epic Privacy Browser|Maxthon)$)(\d{1,2}[A-Za-z]?[- ]?\d?[A-Za-z]?|[A-Za-z]+[ -]?\d{1,2}([A-Za-z]?|\d*)|[A-Za-z0-9]+[- ]?\d{1,2}|\d{1,2}[- ]?[A-Za-z0-9]+|[A-Za-z0-9]+[ -]?[A-Za-z0-9]+|\d{1,2}[A-Za-z]? ?[A-Za-z]+|\w+ ?[A-Za-z0-9]+)$"
MODEL_REGEX regex to validate the models values
Link copied to clipboard
NAME_PATTERN the pattern to validate the names values
Link copied to clipboard
private val NAME_REGEX: String = "\b(\w+Exception)\b"
NAME_REGEX regex to validate the exception name
Link copied to clipboard
protected val platform: Platform
platformName the name of the platform
Link copied to clipboard
protected val predicates: ArrayList<Predicate>
Link copied to clipboard
protected val query: CriteriaQuery<T>
Link copied to clipboard
Link copied to clipboard
protected val root: Root<T>
Link copied to clipboard
private val VERSION_PATTERN: Pattern
VERSION_PATTERN the pattern to validate the versions values
Link copied to clipboard
private val VERSION_REGEX: String = "\b(v?)(\d+(\.\d+)*)([-_]?([a-zA-Z]+[-_]?\d*)?)?\b"
VERSION_REGEX regex to validate the versions values

Functions

Link copied to clipboard
private open fun addBrandFilters()
Method to add the brands filter
Link copied to clipboard
private open fun addDateFilters()
Method to add the dates filter
Link copied to clipboard
private open fun addMandatoryFilters()
Method to add the mandatory filters such applicationId and platform
Link copied to clipboard
private open fun addModelFilters()
Method to add the models filter
Link copied to clipboard
private open fun addNameFilters()
Method to add the names filter
Link copied to clipboard
private open fun addVersionFilters()
Method to add the versions filter
Link copied to clipboard
protected open fun extractFiltersByPattern(pattern: Pattern): HashSet<String>
Link copied to clipboard
protected open fun fillPredicates()
Link copied to clipboard
private open fun getBrandFilters(): HashSet<String>
Method to get from the rawFilters the brands filter related
Link copied to clipboard
private open fun getDateFilters(): HashSet<String>
Method to get from the rawFilters the dates filter related
Link copied to clipboard
open fun getEntities(pageable: Pageable): List<T>
Link copied to clipboard
private open fun getModelFilters(): HashSet<String>
Method to get from the rawFilters the models filter related
Link copied to clipboard
private open fun getNameFilters(): HashSet<String>
Method to get from the rawFilters the names filter related
Link copied to clipboard
private open fun getVersionFilters(): HashSet<String>
Method to get from the rawFilters the versions filter related
Link copied to clipboard
protected open fun getVersionPredicates(versions: HashSet<String>): ArrayList<Predicate>
Method to get the version predicates dynamically