java.lang.Object
javax.money.AbstractContext
javax.money.AbstractQuery
javax.money.CurrencyQuery
- All Implemented Interfaces:
Serializable
This class models a query for accessing instances of
CurrencyUnit. It
provides information such as
- the providers that may provide
CurrencyUnitinstances - any other attributes, identified by the attribute type, e.g. regions, tenants,
a target timestamp / temporal unit, when the
CurrencyUnitinstances should be valid, etc.
.CurrencyProviderSpi.
This class is immutable, serializable and thread-safe.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final StringKey for storing a countries to be queried.(package private) static final StringKey for storing a target literal currency codes to be queried.(package private) static final StringKey for storing a target numeric currency codes to be queried.private static final longFields inherited from class javax.money.AbstractQuery
KEY_QUERY_PROVIDERS, KEY_QUERY_TARGET_TYPE, KEY_QUERY_TIMESTAMPFields inherited from class javax.money.AbstractContext
data, KEY_PROVIDER -
Constructor Summary
ConstructorsConstructorDescriptionCurrencyQuery(CurrencyQueryBuilder builder) Constructor, used from the Builder. -
Method Summary
Modifier and TypeMethodDescriptionReturns the target locales.Gets the currency codes, or the regular expression to select codes.Gets the numeric codes.Creates a new builder instances, initialized with the data from this one.Methods inherited from class javax.money.AbstractQuery
getProviderNames, getTargetType
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
KEY_QUERY_COUNTRIES
Key for storing a countries to be queried.- See Also:
-
KEY_QUERY_CURRENCY_CODES
Key for storing a target literal currency codes to be queried.- See Also:
-
KEY_QUERY_NUMERIC_CODES
Key for storing a target numeric currency codes to be queried.- See Also:
-
-
Constructor Details
-
CurrencyQuery
CurrencyQuery(CurrencyQueryBuilder builder) Constructor, used from the Builder.- Parameters:
builder- the correspondingCurrencyQueryBuilder, not null.
-
-
Method Details
-
getCountries
Returns the target locales.- Returns:
- the target locales, never null.
-
getCurrencyCodes
Gets the currency codes, or the regular expression to select codes.- Returns:
- the target currency codes or the regular expression, never null.
-
getNumericCodes
Gets the numeric codes. Setting it to -1 search for currencies that have no numeric code.- Returns:
- the target numeric codes, never null.
-
toBuilder
Creates a new builder instances, initialized with the data from this one.- Returns:
- a new
MonetaryAmountFactoryQueryBuilderinstance, never null.
-