Class ScopedQueryAdapter
java.lang.Object
com.e1c.langtool.internal.history.scope.ScopedQueryAdapter
- All Implemented Interfaces:
IScopedQueryAdapter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadapt(IProjectTranslatingQuery query, IQueryScope scope) Returns an expression as result of applying the given scope.booleanisAdaptable(IProjectTranslatingQuery query, IQueryScope scope) Returns true if the query can be adaptable by the given query scope.
-
Constructor Details
-
ScopedQueryAdapter
public ScopedQueryAdapter()
-
-
Method Details
-
isAdaptable
Description copied from interface:IScopedQueryAdapterReturns true if the query can be adaptable by the given query scope.For example the query can be unadaptable by the scope in case when it has some undefined fields, but the same fields are demand in the scope.
IProjectTranslatingQuery query = ... // some query IQueryScope scope = ... // some scope IScopedQueryAdapter adapter = ... // some adapter if (query.getResourceId() == null && scope.getRules().getStorageId() == CompareRule.EQUAL) { System.out.println(adapter.isAdaptable(query, scope)); // it should print false }- Specified by:
isAdaptablein interfaceIScopedQueryAdapter- Parameters:
query- the query to adaptscope- the scope which using for adapting the query- Returns:
- true if the query can be adaptable by the given query scope
- See Also:
-
adapt
Description copied from interface:IScopedQueryAdapterReturns an expression as result of applying the given scope.- Specified by:
adaptin interfaceIScopedQueryAdapter- Parameters:
query- the query to adaptscope- the scope which using for adapting the query- Returns:
- an expression as result of applying the given scope.
-