java.lang.Object
javax.money.AbstractContext
javax.money.AbstractQuery
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
AmountFormatQuery,ConversionQuery,CurrencyQuery,MonetaryAmountFactoryQuery,RoundingQuery
Represents a general context of data targeting an item of type
Q. Contexts are used to add arbitrary
data that cannot be be mapped in a standard way to the money API, e.g. use case or customer specific
extensions or specialities.Superclasses of this class must be final, immutable, serializable and thread-safe.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final StringKey for storing the target providers to be queriedprotected static final StringKey name for the target type attribute.protected static final StringKey name for the timestamp attribute.private static final longFields inherited from class javax.money.AbstractContext
data, KEY_PROVIDER -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractQuery(AbstractQueryBuilder builder) Constructor, using a builder. -
Method Summary
Modifier and TypeMethodDescriptionReturns the providers and their ordering to be considered.Class<?> Gets the target implementation type required.
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
KEY_QUERY_PROVIDERS
Key for storing the target providers to be queried- See Also:
-
KEY_QUERY_TIMESTAMP
Key name for the timestamp attribute.- See Also:
-
KEY_QUERY_TARGET_TYPE
Key name for the target type attribute.- See Also:
-
-
Constructor Details
-
AbstractQuery
Constructor, using a builder.- Parameters:
builder- the builder, not null.
-
-
Method Details
-
getProviderNames
Returns the providers and their ordering to be considered. This information typically must be interpreted by the singleton SPI implementations, which are backing the singleton accessors. If the list returned is empty, the default provider list, determined by methods likegetDefaultProviderNames()should be used.- Returns:
- the ordered providers, never null.
-
getTargetType
Gets the target implementation type required. This can be used to explicitly acquire a specific implementation type and use a query to configure the instance or factory to be returned.- Returns:
- this Builder for chaining.
-