Package com.blazebit.persistence.view
Enum ConvertOption
- All Implemented Interfaces:
Serializable
,Comparable<ConvertOption>
,java.lang.constant.Constable
public enum ConvertOption extends Enum<ConvertOption>
The available options that can be enabled when converting entity view types via
EntityViewManager.convert(Object, Class, ConvertOption...)
.- Since:
- 1.2.0
- Author:
- Christian Beikov
- See Also:
EntityViewManager.convert(Object, Class, ConvertOption...)
-
Nested Class Summary
-
Enum Constant Summary
Enum Constants Enum Constant Description CREATE_NEW
Option to specify that the newly created object should be considered "new" i.e. is persisted when flushed.IGNORE_MISSING_ATTRIBUTES
Option to ignore rather than throw an exception when the target type has an attribute that is missing a matching attribute in the source type. -
Method Summary
Modifier and Type Method Description static ConvertOption
valueOf(String name)
Returns the enum constant of this type with the specified name.static ConvertOption[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
IGNORE_MISSING_ATTRIBUTES
Option to ignore rather than throw an exception when the target type has an attribute that is missing a matching attribute in the source type. -
CREATE_NEW
Option to specify that the newly created object should be considered "new" i.e. is persisted when flushed. Note that this will not cause@PostCreate
listeners to be invoked.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-