Package com.blazebit.persistence.view
Interface ConvertOperationBuilder<T>
- Type Parameters:
T
- The type of the entity view class
public interface ConvertOperationBuilder<T>
A builder for defining flush related configuration.
- Since:
- 1.4.0
- Author:
- Christian Beikov
-
Method Summary
Modifier and TypeMethodDescriptionconvert()
Converts the source object as defined and returns the result.convertAttribute
(String attributePath, Class<?> attributeViewClass, ConvertOption... convertOptions) Specifies that the attribute object should use the given view type class and convert options.convertAttribute
(String attributePath, Class<?> attributeViewClass, String constructorName, ConvertOption... convertOptions) Specifies that the attribute object should use the given view type class and convert options.excludeAttribute
(String attributePath) Specifies that the given attribute should not be converted into the target view.excludeAttributes
(String... attributePaths) Specifies that the given attributes should not be converted into the target view.
-
Method Details
-
convert
T convert()Converts the source object as defined and returns the result.- Returns:
- The converted view
-
excludeAttribute
Specifies that the given attribute should not be converted into the target view.- Parameters:
attributePath
- The attribute path to skip during conversion- Returns:
- this for chaining
-
excludeAttributes
Specifies that the given attributes should not be converted into the target view.- Parameters:
attributePaths
- The attribute paths to skip during conversion- Returns:
- this for chaining
-
convertAttribute
ConvertOperationBuilder<T> convertAttribute(String attributePath, Class<?> attributeViewClass, ConvertOption... convertOptions) Specifies that the attribute object should use the given view type class and convert options.- Parameters:
attributePath
- The attribute path for which to override the view class and convert optionsattributeViewClass
- The entity view class to convert the attribute object toconvertOptions
- The convert options to use- Returns:
- this for chaining
-
convertAttribute
ConvertOperationBuilder<T> convertAttribute(String attributePath, Class<?> attributeViewClass, String constructorName, ConvertOption... convertOptions) Specifies that the attribute object should use the given view type class and convert options.- Parameters:
attributePath
- The attribute path for which to override the view class and convert optionsattributeViewClass
- The entity view class to convert the attribute object toconstructorName
- The name of the entity view constructor to useconvertOptions
- The convert options to use- Returns:
- this for chaining
- Since:
- 1.5.0
-