Class ConversionParameters.ConversionParametersBuilder
java.lang.Object
de.hybris.platform.odata2services.converter.ConversionParameters.ConversionParametersBuilder
- Enclosing class:
- ConversionParameters
A builder for creating instances of
ConversionParameters-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Creates newConversionParametersinstance.Creates builder instance.from(ConversionParameters parameters) Initializes this builder to the values like in the sample parameters provided.withAttributeName(String name) Specifies context attribute name for theConversionParametersto create.withAttributeValue(Object value) Specifies attribute value for theConversionParametersto create.withContentLocale(Locale locale) Specifies locale of the ODataEntry content.withContext(org.apache.olingo.odata2.api.processor.ODataContext context) Specifies OData context for theConversionParametersto create.Specifies integration item for theConversionParametersto create.
-
Constructor Details
-
ConversionParametersBuilder
public ConversionParametersBuilder()
-
-
Method Details
-
conversionParametersBuilder
Creates builder instance.- Returns:
- new instance of the builder.
-
from
Initializes this builder to the values like in the sample parameters provided. So, if a call is made:conversionParametersBuilder().from(sample).build();it will produce a different instance of theConversionParameters, which is in exactly same state as thesample.- Parameters:
parameters- a sample to use for initializing builder.- Returns:
- a builder set to create a new
ConversionParametersinstance that is different from thesamplebut having same state.
-
withAttributeName
Specifies context attribute name for theConversionParametersto create.- Parameters:
name- name of the ODataEntry attribute being converted.- Returns:
- builder with the attribute name specified.
-
withAttributeValue
Specifies attribute value for theConversionParametersto create.- Parameters:
value- value of the ODataEntry attribute to be converted.- Returns:
- builder with the attribute value specified.
-
withIntegrationItem
Specifies integration item for theConversionParametersto create.- Parameters:
item- an integration item, in which the converted attribute value should be set.- Returns:
- a builder with the integration item specified.
-
withContentLocale
Specifies locale of the ODataEntry content.- Parameters:
locale- locale of the localized attributes values.- Returns:
- a builder with the content locale specified.
-
withContext
public ConversionParameters.ConversionParametersBuilder withContext(org.apache.olingo.odata2.api.processor.ODataContext context) Specifies OData context for theConversionParametersto create.- Parameters:
context- a context providing additional information for the attribute value conversion.- Returns:
- a builder with the OData context specified.
-
build
Creates newConversionParametersinstance.- Returns:
- an instance that has characteristics that were specified by the
with...methods prior to calling this method.
-