Class AggregateVersionJsonbAdapter

java.lang.Object
org.fuin.ddd4j.jsonb.AggregateVersionJsonbAdapter
All Implemented Interfaces:
jakarta.json.bind.adapter.JsonbAdapter<org.fuin.ddd4j.core.AggregateVersion,Integer>

@ThreadSafe public final class AggregateVersionJsonbAdapter extends Object implements jakarta.json.bind.adapter.JsonbAdapter<org.fuin.ddd4j.core.AggregateVersion,Integer>
Converts an aggregate version into an integer and back (JSON-B).
  • Constructor Details

    • AggregateVersionJsonbAdapter

      public AggregateVersionJsonbAdapter()
  • Method Details

    • adaptToJson

      public Integer adaptToJson(org.fuin.ddd4j.core.AggregateVersion version) throws Exception
      Specified by:
      adaptToJson in interface jakarta.json.bind.adapter.JsonbAdapter<org.fuin.ddd4j.core.AggregateVersion,Integer>
      Throws:
      Exception
    • adaptFromJson

      public org.fuin.ddd4j.core.AggregateVersion adaptFromJson(Integer value) throws Exception
      Specified by:
      adaptFromJson in interface jakarta.json.bind.adapter.JsonbAdapter<org.fuin.ddd4j.core.AggregateVersion,Integer>
      Throws:
      Exception