Class ProjectsQueryHelper
java.lang.Object
de.xima.fc.project.ProjectsQueryHelper
Query helper for projects.
Provides helper methods to create and manipulate project queries.
- Since:
- 8.4.0
- Author:
- XIMA MEDIA GmbH
-
Method Summary
Modifier and TypeMethodDescriptionstatic javax.persistence.criteria.Expression<String> createCoalescedDisplayNameExpression(javax.persistence.criteria.CriteriaBuilder cb, javax.persistence.criteria.From<?, Projekt> projectFrom, Locale locale) Creates an expression to coalesce the display name of a project, handling localization fallbacks.static javax.persistence.criteria.Expression<String> createCoalescedShortDescriptionExpression(javax.persistence.criteria.CriteriaBuilder cb, javax.persistence.criteria.From<?, Projekt> projectRoot, Locale locale) Creates an expression to coalesce the short description of a project, handling localization fallbacks.
-
Method Details
-
createCoalescedDisplayNameExpression
public static javax.persistence.criteria.Expression<String> createCoalescedDisplayNameExpression(javax.persistence.criteria.CriteriaBuilder cb, javax.persistence.criteria.From<?, Projekt> projectFrom, Locale locale) Creates an expression to coalesce the display name of a project, handling localization fallbacks.The display name is coalesced in the following order:
- Given locale localization
- Default locale localization
- Project title
The given locale localization is determined by the given locale, the default locale localization is determined by the project's default locale, and the project title is the default display name.
- Parameters:
cb- Criteria builder to create the expressionprojectFrom- Project root to create the expression fromlocale- Locale to filter by- Returns:
- Expression to coalesce the display name of a project
-
createCoalescedShortDescriptionExpression
public static javax.persistence.criteria.Expression<String> createCoalescedShortDescriptionExpression(javax.persistence.criteria.CriteriaBuilder cb, javax.persistence.criteria.From<?, Projekt> projectRoot, Locale locale) Creates an expression to coalesce the short description of a project, handling localization fallbacks.The short description is coalesced in the following order:
- Given locale localization
- Default locale localization
The given locale localization is determined by the given locale, and the default locale localization is determined by the project's default locale.
- Parameters:
cb- Criteria builder to create the expressionprojectRoot- Project root to create the expression fromlocale- Locale to filter by- Returns:
- Expression to coalesce the short description of a project
-