Top Description Fields Constructors Methods
javax.money

public abstract Class AbstractQuery

extends AbstractContext
Class Inheritance
Known Direct Subclasses
javax.money.CurrencyQuery, javax.money.MonetaryAmountFactoryQuery, javax.money.RoundingQuery, javax.money.convert.ConversionQuery, javax.money.format.AmountFormatQuery
Imports
java.util.Collections, .List

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.

Field Summary

Modifier and TypeField and Description
protected static final String
KEY_QUERY_PROVIDERS

Key for storing the target providers to be queried

protected static final String
KEY_QUERY_TARGET_TYPE

Key name for the target type attribute.

protected static final String
KEY_QUERY_TIMESTAMP

Key name for the timestamp attribute.

private static final long
Inherited from javax.money.AbstractContext:
dataKEY_PROVIDER

Constructor Summary

AccessConstructor and Description
protected
AbstractQuery(AbstractQueryBuilder<B extends AbstractQueryBuilder, C extends AbstractQuery>
the builder, not null.
builder
)

Constructor, using a builder.

Method Summary

Modifier and TypeMethod and Description
public List<String>

Returns:

the ordered providers, never null.
getProviderNames
()

Returns the providers and their ordering to be considered.

public Class<?>

Returns:

this Builder for chaining.
getTargetType
()

Gets the target implementation type required.

Inherited from javax.money.AbstractContext:
equalsgetgetgetBooleangetDoublegetFloatgetIntgetKeysgetLonggetProviderNamegetTextgetTypehashCodeisEmptytoString

Field Detail

KEY_QUERY_PROVIDERSback to summary
protected static final String KEY_QUERY_PROVIDERS

Key for storing the target providers to be queried

KEY_QUERY_TARGET_TYPEback to summary
protected static final String KEY_QUERY_TARGET_TYPE

Key name for the target type attribute.

KEY_QUERY_TIMESTAMPback to summary
protected static final String KEY_QUERY_TIMESTAMP

Key name for the timestamp attribute.

serialVersionUIDback to summary
private static final long serialVersionUID

Hides javax.money.AbstractContext.serialVersionUID.

Constructor Detail

AbstractQueryback to summary
protected AbstractQuery(AbstractQueryBuilder<B extends AbstractQueryBuilder, C extends AbstractQuery> builder)

Constructor, using a builder.

Parameters
builder:AbstractQueryBuilder<B extends AbstractQueryBuilder, C extends AbstractQuery>

the builder, not null.

Method Detail

getProviderNamesback to summary
public List<String> 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 like getDefaultProviderNames() should be used.

Returns:List<String>

the ordered providers, never null.

getTargetTypeback to summary
public Class<?> 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:Class<?>

this Builder for chaining.