Class ModifiableQuestionnaireMetadata

java.lang.Object
io.dialob.api.questionnaire.Questionnaire.Metadata
io.dialob.api.questionnaire.ModifiableQuestionnaireMetadata
All Implemented Interfaces:
Serializable

@ParametersAreNonnullByDefault @Generated({"Modifiables.generator","Questionnaire.Metadata"}) @NotThreadSafe public final class ModifiableQuestionnaireMetadata extends Questionnaire.Metadata
A modifiable implementation of the Metadata type.

Use the create() static factory methods to create new instances. Use the toImmutable() method to convert to canonical immutable instances.

ModifiableQuestionnaireMetadata is not thread-safe

See Also:
  • Method Details

    • create

      public static ModifiableQuestionnaireMetadata create()
      Construct a modifiable instance of Metadata.
      Returns:
      A new modifiable instance
    • getFormId

      public final String getFormId()
      Specified by:
      getFormId in class Questionnaire.Metadata
      Returns:
      value of formId attribute, may be null
    • getFormName

      public final String getFormName()
      Specified by:
      getFormName in class Questionnaire.Metadata
      Returns:
      value of formName attribute, may be null
    • getStatus

      public final Questionnaire.Metadata.Status getStatus()
      Overrides:
      getStatus in class Questionnaire.Metadata
      Returns:
      assigned or, otherwise, newly computed, not cached value of status attribute
    • getFormRev

      public final String getFormRev()
      Specified by:
      getFormRev in class Questionnaire.Metadata
      Returns:
      value of formRev attribute, may be null
    • getTenantId

      public final String getTenantId()
      Specified by:
      getTenantId in class Questionnaire.Metadata
      Returns:
      value of tenantId attribute, may be null
    • getCreated

      public final Date getCreated()
      Specified by:
      getCreated in class Questionnaire.Metadata
      Returns:
      value of created attribute, may be null
    • getLastAnswer

      public final Date getLastAnswer()
      Specified by:
      getLastAnswer in class Questionnaire.Metadata
      Returns:
      value of lastAnswer attribute, may be null
    • getOpened

      public final Date getOpened()
      Specified by:
      getOpened in class Questionnaire.Metadata
      Returns:
      value of opened attribute, may be null
    • getCompleted

      public final Date getCompleted()
      Specified by:
      getCompleted in class Questionnaire.Metadata
      Returns:
      value of completed attribute, may be null
    • getLabel

      public final String getLabel()
      Specified by:
      getLabel in class Questionnaire.Metadata
      Returns:
      value of label attribute, may be null
    • getSubmitUrl

      public final String getSubmitUrl()
      Specified by:
      getSubmitUrl in class Questionnaire.Metadata
      Returns:
      value of submitUrl attribute, may be null
    • getReason

      public final Questionnaire.Metadata.Reason getReason()
      Completion reason, null if normally completed.
      Specified by:
      getReason in class Questionnaire.Metadata
    • getLanguage

      public final String getLanguage()
      Specified by:
      getLanguage in class Questionnaire.Metadata
      Returns:
      value of language attribute, may be null
    • getOwner

      public final String getOwner()
      userId of document owner
      Specified by:
      getOwner in class Questionnaire.Metadata
    • getCreator

      public final String getCreator()
      userId of one who created questionnaire
      Specified by:
      getCreator in class Questionnaire.Metadata
    • getAdditionalProperties

      public final Map<String,Object> getAdditionalProperties()
      Specified by:
      getAdditionalProperties in class Questionnaire.Metadata
      Returns:
      value of additionalProperties attribute
    • clear

      Clears the object by setting all attributes to their initial values.
      Returns:
      this for use in a chained invocation
    • from

      Fill this modifiable instance with attribute values from the provided Questionnaire.Metadata instance. Regular attribute values will be overridden, i.e. replaced with ones of an instance. Any of the instance's absent optional values will not be copied (will not override current values). Collection elements and entries will be added, not replaced.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this for use in a chained invocation
    • from

      Fill this modifiable instance with attribute values from the provided Questionnaire.Metadata instance. Regular attribute values will be overridden, i.e. replaced with ones of an instance. Any of the instance's absent optional values will not be copied (will not override current values). Collection elements and entries will be added, not replaced.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this for use in a chained invocation
    • setFormId

      public ModifiableQuestionnaireMetadata setFormId(String formId)
      Assigns a value to the formId attribute.
      Parameters:
      formId - The value for formId, can be null
      Returns:
      this for use in a chained invocation
    • setFormName

      public ModifiableQuestionnaireMetadata setFormName(String formName)
      Assigns a value to the formName attribute.
      Parameters:
      formName - The value for formName, can be null
      Returns:
      this for use in a chained invocation
    • setStatus

      Assigns a value to the status attribute.

      If not set, this attribute will have a default value returned by the initializer of status.

      Parameters:
      status - The value for status
      Returns:
      this for use in a chained invocation
    • setFormRev

      public ModifiableQuestionnaireMetadata setFormRev(String formRev)
      Assigns a value to the formRev attribute.
      Parameters:
      formRev - The value for formRev, can be null
      Returns:
      this for use in a chained invocation
    • setTenantId

      public ModifiableQuestionnaireMetadata setTenantId(String tenantId)
      Assigns a value to the tenantId attribute.
      Parameters:
      tenantId - The value for tenantId, can be null
      Returns:
      this for use in a chained invocation
    • setCreated

      public ModifiableQuestionnaireMetadata setCreated(Date created)
      Assigns a value to the created attribute.
      Parameters:
      created - The value for created, can be null
      Returns:
      this for use in a chained invocation
    • setLastAnswer

      public ModifiableQuestionnaireMetadata setLastAnswer(Date lastAnswer)
      Assigns a value to the lastAnswer attribute.
      Parameters:
      lastAnswer - The value for lastAnswer, can be null
      Returns:
      this for use in a chained invocation
    • setOpened

      public ModifiableQuestionnaireMetadata setOpened(Date opened)
      Assigns a value to the opened attribute.
      Parameters:
      opened - The value for opened, can be null
      Returns:
      this for use in a chained invocation
    • setCompleted

      public ModifiableQuestionnaireMetadata setCompleted(Date completed)
      Assigns a value to the completed attribute.
      Parameters:
      completed - The value for completed, can be null
      Returns:
      this for use in a chained invocation
    • setLabel

      public ModifiableQuestionnaireMetadata setLabel(String label)
      Assigns a value to the label attribute.
      Parameters:
      label - The value for label, can be null
      Returns:
      this for use in a chained invocation
    • setSubmitUrl

      public ModifiableQuestionnaireMetadata setSubmitUrl(String submitUrl)
      Assigns a value to the submitUrl attribute.
      Parameters:
      submitUrl - The value for submitUrl, can be null
      Returns:
      this for use in a chained invocation
    • setReason

      Assigns a value to the reason attribute.
      Parameters:
      reason - The value for reason, can be null
      Returns:
      this for use in a chained invocation
    • setLanguage

      public ModifiableQuestionnaireMetadata setLanguage(String language)
      Assigns a value to the language attribute.
      Parameters:
      language - The value for language, can be null
      Returns:
      this for use in a chained invocation
    • setOwner

      public ModifiableQuestionnaireMetadata setOwner(String owner)
      Assigns a value to the owner attribute.
      Parameters:
      owner - The value for owner, can be null
      Returns:
      this for use in a chained invocation
    • setCreator

      public ModifiableQuestionnaireMetadata setCreator(String creator)
      Assigns a value to the creator attribute.
      Parameters:
      creator - The value for creator, can be null
      Returns:
      this for use in a chained invocation
    • putAdditionalProperties

      public ModifiableQuestionnaireMetadata putAdditionalProperties(String key, Object value)
      Put one entry to the additionalProperties map.
      Parameters:
      key - The key in additionalProperties map
      value - The associated value in the additionalProperties map
      Returns:
      this for use in a chained invocation
    • setAdditionalProperties

      public ModifiableQuestionnaireMetadata setAdditionalProperties(Map<String,? extends Object> entries)
      Sets or replaces all mappings from the specified map as entries for the additionalProperties map. Nulls are not permitted as keys or values.
      Parameters:
      entries - The entries that will be added to the additionalProperties map
      Returns:
      this for use in a chained invocation
    • putAllAdditionalProperties

      public ModifiableQuestionnaireMetadata putAllAdditionalProperties(Map<String,? extends Object> entries)
      Put all mappings from the specified map as entries to the additionalProperties map. Nulls are not permitted as keys or values.
      Parameters:
      entries - to be added to additionalProperties map
      Returns:
      this for use in a chained invocation
    • statusIsSet

      public final boolean statusIsSet()
      Returns true if the default attribute status is set.
      Returns:
      true if set
    • unsetStatus

      public final ModifiableQuestionnaireMetadata unsetStatus()
      Reset an attribute to its initial value.
      Returns:
      this for use in a chained invocation
    • isInitialized

      public final boolean isInitialized()
      Returns true if all required attributes are set, indicating that the object is initialized.
      Returns:
      true if set
    • toImmutable

      public final ImmutableQuestionnaireMetadata toImmutable()
      Returns:
      An immutable instance of Metadata
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ModifiableQuestionnaireMetadata that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: formId, formName, status, formRev, tenantId, created, lastAnswer, opened, completed, label, submitUrl, reason, language, owner, creator, additionalProperties.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Generates a string representation of this Metadata. If uninitialized, some attribute values may appear as question marks.
      Overrides:
      toString in class Object
      Returns:
      A string representation