Class ProjectTranslationStorage
java.lang.Object
com.e1c.langtool.internal.history.db.service.ProjectTranslationStorage
- All Implemented Interfaces:
IManagedService,IProjectTranslationStorage
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.e1c.langtool.history.db.IProjectTranslationStorage
IProjectTranslationStorage.IGroupedTranslation -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate()voidaddTranslation(IProjectTranslation translation) Adds a new translation to the storage.voidvoiddeleteByProject(String projectName) Removes all translations from the storage for the given project.voiddeleteTranslations(IExpression expression) Removes all translations that found by the query expression.voiddeleteTranslations(IExpression expression, Predicate<? super IProjectTranslation> filter) Removes translations from the storage which found by the query expression and filtered by the predicated.protected javax.persistence.EntityManagergetGroupedTranslations(IExpression expression) Returns translations grouped by translated value and which found by the query expression.Returns the list of all registered translation languages for all projects.getTranslations(IExpression expression) Returns all translations that have been found by the given query expression.getTranslations(IExpression expression, IPageable pageRequest) Returns a page of translations found by the given query expression and with restriction provided in theIPageableobject.
-
Constructor Details
-
ProjectTranslationStorage
public ProjectTranslationStorage()
-
-
Method Details
-
activate
public void activate()- Specified by:
activatein interfaceIManagedService
-
deactivate
public void deactivate()- Specified by:
deactivatein interfaceIManagedService
-
getTranslations
Description copied from interface:IProjectTranslationStorageReturns all translations that have been found by the given query expression.- Specified by:
getTranslationsin interfaceIProjectTranslationStorage- Parameters:
expression- the expression to find translation- Returns:
- all found translations by the given expression
-
getTranslations
Description copied from interface:IProjectTranslationStorageReturns a page of translations found by the given query expression and with restriction provided in theIPageableobject.- Specified by:
getTranslationsin interfaceIProjectTranslationStorage- Parameters:
expression- the expression to find translationspageRequest- the request that specifies which page to load- Returns:
- a page of translations
-
getGroupedTranslations
public List<IProjectTranslationStorage.IGroupedTranslation> getGroupedTranslations(IExpression expression) Description copied from interface:IProjectTranslationStorageReturns translations grouped by translated value and which found by the query expression.- Specified by:
getGroupedTranslationsin interfaceIProjectTranslationStorage- Parameters:
expression- the expression to find translations- Returns:
- a translations grouped by translated value
-
addTranslation
Description copied from interface:IProjectTranslationStorageAdds a new translation to the storage.- Specified by:
addTranslationin interfaceIProjectTranslationStorage- Parameters:
translation- the translation to be added
-
deleteTranslations
public void deleteTranslations(IExpression expression, Predicate<? super IProjectTranslation> filter) Description copied from interface:IProjectTranslationStorageRemoves translations from the storage which found by the query expression and filtered by the predicated.- Specified by:
deleteTranslationsin interfaceIProjectTranslationStorage- Parameters:
expression- the query expression for searching translations to removefilter- the predicate to filter translations which shouldn't be removed. It removes the translation only if this filter returns true.
-
deleteTranslations
Description copied from interface:IProjectTranslationStorageRemoves all translations that found by the query expression.- Specified by:
deleteTranslationsin interfaceIProjectTranslationStorage- Parameters:
expression- the query expression for searching translations to remove
-
deleteByProject
Description copied from interface:IProjectTranslationStorageRemoves all translations from the storage for the given project.- Specified by:
deleteByProjectin interfaceIProjectTranslationStorage- Parameters:
projectName- the name of project for which the translations to remove
-
getLanguages
Description copied from interface:IProjectTranslationStorageReturns the list of all registered translation languages for all projects.- Specified by:
getLanguagesin interfaceIProjectTranslationStorage- Returns:
- the list of translation languages.
-
getEntityManager
protected javax.persistence.EntityManager getEntityManager()
-