Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-2264

Support constructor based serialization

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Codecs
    • Labels:
      None

      Description

      Rather than instantiating an empty instance via a no-arg constructor, allow for the construction of entities via constructor that takes values for the fields. Questions to answer:

      1. Should all the fields be required in the constructor?
        • If no, should the remaining fields be set via field injection?
      2. Should the constructor parameter names be forced to match field names so we can order them properly when invoking?
        • Should we rely on document order instead?
        • Should we allow for explicitly mapping constructor parameters to fields via annotations on those parameters?

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              ross.lawley Ross Lawley
              Reporter:
              justin.lee Justin Lee
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: