java.lang.Object
jakarta.xml.bind.annotation.adapters.XmlAdapter<BASE_TYPE,VO_TYPE>
org.fuin.objects4j.vo.AbstractValueObjectConverter<String,EntityIdPath>
org.fuin.ddd4j.ddd.EntityIdPathConverter
- All Implemented Interfaces:
jakarta.json.bind.adapter.JsonbAdapter<EntityIdPath,,String> jakarta.persistence.AttributeConverter<EntityIdPath,,String> org.fuin.objects4j.vo.ValueObjectConverter<String,EntityIdPath>
@ThreadSafe
public final class EntityIdPathConverter
extends org.fuin.objects4j.vo.AbstractValueObjectConverter<String,EntityIdPath>
implements jakarta.persistence.AttributeConverter<EntityIdPath,String>
JAXB and JPA converter for an entity identifier path.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal StringfromVO(EntityIdPath value) final Class<EntityIdPath>final booleanfinal voidrequireArgValid(@NotNull String name, @NotNull String value) Verifies if the argument is valid and throws an exception if this is not the case.final EntityIdPathMethods inherited from class org.fuin.objects4j.vo.AbstractValueObjectConverter
adaptFromJson, adaptToJson, convertToDatabaseColumn, convertToEntityAttribute, marshal, unmarshalMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface jakarta.persistence.AttributeConverter
convertToDatabaseColumn, convertToEntityAttribute
-
Constructor Details
-
EntityIdPathConverter
Constructor with factory.- Parameters:
factory- Factory to use.
-
-
Method Details
-
getBaseTypeClass
- Specified by:
getBaseTypeClassin interfaceorg.fuin.objects4j.vo.ValueObjectConverter<String,EntityIdPath>
-
getValueObjectClass
- Specified by:
getValueObjectClassin interfaceorg.fuin.objects4j.vo.ValueObjectConverter<String,EntityIdPath>
-
isValid
- Specified by:
isValidin interfaceorg.fuin.objects4j.vo.ValueObjectConverter<String,EntityIdPath>
-
requireArgValid
public final void requireArgValid(@NotNull @NotNull String name, @NotNull @NotNull String value) throws org.fuin.objects4j.common.ConstraintViolationException Verifies if the argument is valid and throws an exception if this is not the case.- Parameters:
name- Name of the value for a possible error message.value- Value to check.- Throws:
org.fuin.objects4j.common.ConstraintViolationException- The value was not valid.
-
toVO
- Specified by:
toVOin interfaceorg.fuin.objects4j.vo.ValueObjectConverter<String,EntityIdPath>
-
fromVO
- Specified by:
fromVOin interfaceorg.fuin.objects4j.vo.ValueObjectConverter<String,EntityIdPath>
-