Uploaded image for project: 'Tupelo'
  1. Tupelo
  2. TUP-473

Support for default values of properties

XMLWordPrintableJSON

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Major Major
    • None
    • None
    • Beans
    • None

      A mechanism and policies for supplying default values to beans is needed.

      POJO beans may have their properties set either

      (1) by field initialization at creation time
      (2) by lazy initialization in an acessor.

      The bean session has up to this point assumed that any missing values at deserialization/creation are intentional. This causes some trouble for people and requires they add a layer to handle the beans that come back from the session. To better mimic the above it is proposed that generally clients be allowed to set properties. If a value is missing, these will be checked and the first that is not missing will be used. Also a default concrete value may be specified. Properties are checked before the value. Policies for use are

      (a) At creation time these will be checked, This covers case (1).
      (b) a property may be flagged as being required to be checked. Regardless of when it is found to be missing a required property, that will be supplied. This covers (2).

      Of course, all of this is only done during fetch operations, since that is the only time that the session has control of the bean,
      (b)

              jgaynor Jeffrey Gaynor
              jgaynor Jeffrey Gaynor
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: