Class QueryResolverStrategy
java.lang.Object
ch.tocco.nice2.persist.entity.api.defaultvalue.QueryResolverStrategy
- All Implemented Interfaces:
DefaultValueResolverStrategy
- Direct Known Subclasses:
QuerySingleResolverStrategy
@Component
public class QueryResolverStrategy
extends Object
implements DefaultValueResolverStrategy
-
Field Summary
Fields inherited from interface ch.tocco.nice2.model.base.spi.defaultvalue.spi.DefaultValueResolverStrategy
CURRENT_PRINCIPAL_VAL, CURRENT_USER_VAL, PRINCIPAL_ENTITY, USER_ENTITY
-
Constructor Summary
ConstructorDescriptionQueryResolverStrategy
(QueryBuilderFactory queryBuilderFactory, NiceDataModel dataModel) -
Method Summary
Modifier and TypeMethodDescriptionprotected QueryBuilder
executeQuery
(String dv, String targetEntity) getResolvedValue
(DefaultValueDescriptor defaultValue) Return the display value that is presented to end users.getType()
boolean
isResolvable
(DefaultValueDescriptor descriptor) Checks whether this strategy is capable of resolving the given descriptor.
-
Constructor Details
-
QueryResolverStrategy
public QueryResolverStrategy(@Lazy QueryBuilderFactory queryBuilderFactory, NiceDataModel dataModel)
-
-
Method Details
-
getType
- Specified by:
getType
in interfaceDefaultValueResolverStrategy
-
isResolvable
Description copied from interface:DefaultValueResolverStrategy
Checks whether this strategy is capable of resolving the given descriptor.- Specified by:
isResolvable
in interfaceDefaultValueResolverStrategy
-
getResolvedValue
public ResolvedValue getResolvedValue(DefaultValueDescriptor defaultValue) throws ResolvingException Description copied from interface:DefaultValueResolverStrategy
Return the display value that is presented to end users.- Specified by:
getResolvedValue
in interfaceDefaultValueResolverStrategy
- Throws:
ResolvingException
-
getTargetEntity
-
executeQuery
- Throws:
PersistException
-