Top Description Fields Constructors Methods
javax.money

public abstract Class AbstractQueryBuilder<B extends javax.money.AbstractQueryBuilder, C extends javax.money.AbstractQuery>

extends AbstractContextBuilder<B extends AbstractQueryBuilder, C extends AbstractQuery>
Class Inheritance
Known Direct Subclasses
javax.money.CurrencyQueryBuilder, javax.money.MonetaryAmountFactoryQueryBuilder, javax.money.RoundingQueryBuilder, javax.money.convert.ConversionQueryBuilder, javax.money.format.AmountFormatQueryBuilder
Annotations
@SuppressWarnings:rawtypes
Imports
java.util.Arrays, .List, .Objects

This abstract class defines the common generic parts of a query. Queries are used to pass complex parameters sets to lookup monetary artifacts, e.g. MonetaryAmountFactory, javax.money.MonetaryRounding, javax.money.CurrencyUnit, javax.money.convert.ExchangeRateProvider and .CurrencyConversion.

Instances of this class are not thread-safe and not serializable.

Field Summary

Inherited from javax.money.AbstractContextBuilder:
data

Constructor Summary

AccessConstructor and Description
public
AbstractQueryBuilder()

Initializes the query builder, as a default query builder.

Method Summary

Modifier and TypeMethod and Description
public abstract C

Returns:

a new AbstractQuery. never null.
build
()

Implements abstract javax.money.AbstractContextBuilder.build.

Creates a new AbstractQuery with the data from this Builder instance.
public B

Returns:

the query builder for chaining.
set
(List<String>
the providers in order to use, not null.
providers
)

Set the providers to be considered.

public B

Returns:

the query builder for chaining.
setProviderName
(String
the provider, not null.
provider
)

Overrides javax.money.AbstractContextBuilder.setProviderName.

Simple override, that sets the provider as provider to use.
public B

Returns:

the query builder for chaining.
setProviderNames
(String...
the providers to use, not null.
providers
)

Set the providers to be considered.

public B

Returns:

the query builder for chaining.
setProviderNames
(List<String>
the providers to use, not null.
providers
)

Set the providers to be considered.

public B

Returns:

this query builder for chaining.
setTargetType
(Class<?>
the target implementation type, not null.
type
)

Sets the target implementation type required.

Inherited from javax.money.AbstractContextBuilder:
importContextimportContextremoveAttributessetsetsetsetsetsetsetsetsettoString

Constructor Detail

AbstractQueryBuilderback to summary
public AbstractQueryBuilder()

Initializes the query builder, as a default query builder.

Method Detail

buildback to summary
public abstract C build()

Implements abstract javax.money.AbstractContextBuilder.build.

Creates a new AbstractQuery with the data from this Builder instance.

Returns:C

a new AbstractQuery. never null.

Annotations
@Override
setback to summary
public B set(List<String> providers)

Set the providers to be considered. If not set explicitly the default providers and the corresponding default ordering are used.

Parameters
providers:List<String>

the providers in order to use, not null.

Returns:B

the query builder for chaining.

setProviderNameback to summary
public B setProviderName(String provider)

Overrides javax.money.AbstractContextBuilder.setProviderName.

Simple override, that sets the provider as provider to use.

Parameters
provider:String

the provider, not null.

Returns:B

the query builder for chaining.

Annotations
@Override
setProviderNamesback to summary
public B setProviderNames(String... providers)

Set the providers to be considered. If not set explicitly the default ISO currencies as returned by java.util.Currency is used.

Parameters
providers:String[]

the providers to use, not null.

Returns:B

the query builder for chaining.

setProviderNamesback to summary
public B setProviderNames(List<String> providers)

Set the providers to be considered. If not set explicitly the default ISO currencies as returned by java.util.Currency is used.

Parameters
providers:List<String>

the providers to use, not null.

Returns:B

the query builder for chaining.

setTargetTypeback to summary
public B setTargetType(Class<?> type)

Sets 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.

Parameters
type:Class<?>

the target implementation type, not null.

Returns:B

this query builder for chaining.

Annotations
@SuppressWarnings:unchecked