Package io.dialob.api.questionnaire
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 theMetadatatype.Use the
create()static factory methods to create new instances. Use thetoImmutable()method to convert to canonical immutable instances.ModifiableQuestionnaireMetadata is not thread-safe
- See Also:
ImmutableQuestionnaireMetadata, Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class io.dialob.api.questionnaire.Questionnaire.Metadata
Questionnaire.Metadata.Reason, Questionnaire.Metadata.Status
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ModifiableQuestionnaireMetadataclear()Clears the object by setting all attributes to their initial values.static ModifiableQuestionnaireMetadatacreate()Construct a modifiable instance ofMetadata.booleanequals(Object another)This instance is equal to all instances ofModifiableQuestionnaireMetadatathat have equal attribute values.ModifiableQuestionnaireMetadatafrom(ModifiableQuestionnaireMetadata instance)Fill this modifiable instance with attribute values from the providedQuestionnaire.Metadatainstance.ModifiableQuestionnaireMetadatafrom(Questionnaire.Metadata instance)Fill this modifiable instance with attribute values from the providedQuestionnaire.Metadatainstance.Map<String,Object>getAdditionalProperties()DategetCompleted()DategetCreated()StringgetCreator()userId of one who created questionnaireStringgetFormId()StringgetFormName()StringgetFormRev()StringgetLabel()StringgetLanguage()DategetLastAnswer()DategetOpened()StringgetOwner()userId of document ownerQuestionnaire.Metadata.ReasongetReason()Completion reason, null if normally completed.Questionnaire.Metadata.StatusgetStatus()StringgetSubmitUrl()StringgetTenantId()inthashCode()Computes a hash code from attributes:formId,formName,status,formRev,tenantId,created,lastAnswer,opened,completed,label,submitUrl,reason,language,owner,creator,additionalProperties.booleanisInitialized()Returnstrueif all required attributes are set, indicating that the object is initialized.ModifiableQuestionnaireMetadataputAdditionalProperties(String key, Object value)Put one entry to theadditionalPropertiesmap.ModifiableQuestionnaireMetadataputAllAdditionalProperties(Map<String,? extends Object> entries)Put all mappings from the specified map as entries to theadditionalPropertiesmap.ModifiableQuestionnaireMetadatasetAdditionalProperties(Map<String,? extends Object> entries)Sets or replaces all mappings from the specified map as entries for theadditionalPropertiesmap.ModifiableQuestionnaireMetadatasetCompleted(Date completed)Assigns a value to thecompletedattribute.ModifiableQuestionnaireMetadatasetCreated(Date created)Assigns a value to thecreatedattribute.ModifiableQuestionnaireMetadatasetCreator(String creator)Assigns a value to thecreatorattribute.ModifiableQuestionnaireMetadatasetFormId(String formId)Assigns a value to theformIdattribute.ModifiableQuestionnaireMetadatasetFormName(String formName)Assigns a value to theformNameattribute.ModifiableQuestionnaireMetadatasetFormRev(String formRev)Assigns a value to theformRevattribute.ModifiableQuestionnaireMetadatasetLabel(String label)Assigns a value to thelabelattribute.ModifiableQuestionnaireMetadatasetLanguage(String language)Assigns a value to thelanguageattribute.ModifiableQuestionnaireMetadatasetLastAnswer(Date lastAnswer)Assigns a value to thelastAnswerattribute.ModifiableQuestionnaireMetadatasetOpened(Date opened)Assigns a value to theopenedattribute.ModifiableQuestionnaireMetadatasetOwner(String owner)Assigns a value to theownerattribute.ModifiableQuestionnaireMetadatasetReason(Questionnaire.Metadata.Reason reason)Assigns a value to thereasonattribute.ModifiableQuestionnaireMetadatasetStatus(Questionnaire.Metadata.Status status)Assigns a value to thestatusattribute.ModifiableQuestionnaireMetadatasetSubmitUrl(String submitUrl)Assigns a value to thesubmitUrlattribute.ModifiableQuestionnaireMetadatasetTenantId(String tenantId)Assigns a value to thetenantIdattribute.booleanstatusIsSet()Returnstrueif the default attributestatusis set.ImmutableQuestionnaireMetadatatoImmutable()Converts toImmutableQuestionnaireMetadata.StringtoString()Generates a string representation of thisMetadata.
-
-
-
Method Detail
-
create
public static ModifiableQuestionnaireMetadata create()
Construct a modifiable instance ofMetadata.- Returns:
- A new modifiable instance
-
getFormId
public final String getFormId()
- Specified by:
getFormIdin classQuestionnaire.Metadata- Returns:
- value of
formIdattribute, may benull
-
getFormName
public final String getFormName()
- Specified by:
getFormNamein classQuestionnaire.Metadata- Returns:
- value of
formNameattribute, may benull
-
getStatus
public final Questionnaire.Metadata.Status getStatus()
- Overrides:
getStatusin classQuestionnaire.Metadata- Returns:
- assigned or, otherwise, newly computed, not cached value of
statusattribute
-
getFormRev
public final String getFormRev()
- Specified by:
getFormRevin classQuestionnaire.Metadata- Returns:
- value of
formRevattribute, may benull
-
getTenantId
public final String getTenantId()
- Specified by:
getTenantIdin classQuestionnaire.Metadata- Returns:
- value of
tenantIdattribute, may benull
-
getCreated
public final Date getCreated()
- Specified by:
getCreatedin classQuestionnaire.Metadata- Returns:
- value of
createdattribute, may benull
-
getLastAnswer
public final Date getLastAnswer()
- Specified by:
getLastAnswerin classQuestionnaire.Metadata- Returns:
- value of
lastAnswerattribute, may benull
-
getOpened
public final Date getOpened()
- Specified by:
getOpenedin classQuestionnaire.Metadata- Returns:
- value of
openedattribute, may benull
-
getCompleted
public final Date getCompleted()
- Specified by:
getCompletedin classQuestionnaire.Metadata- Returns:
- value of
completedattribute, may benull
-
getLabel
public final String getLabel()
- Specified by:
getLabelin classQuestionnaire.Metadata- Returns:
- value of
labelattribute, may benull
-
getSubmitUrl
public final String getSubmitUrl()
- Specified by:
getSubmitUrlin classQuestionnaire.Metadata- Returns:
- value of
submitUrlattribute, may benull
-
getReason
public final Questionnaire.Metadata.Reason getReason()
Completion reason, null if normally completed.- Specified by:
getReasonin classQuestionnaire.Metadata
-
getLanguage
public final String getLanguage()
- Specified by:
getLanguagein classQuestionnaire.Metadata- Returns:
- value of
languageattribute, may benull
-
getOwner
public final String getOwner()
userId of document owner- Specified by:
getOwnerin classQuestionnaire.Metadata
-
getCreator
public final String getCreator()
userId of one who created questionnaire- Specified by:
getCreatorin classQuestionnaire.Metadata
-
getAdditionalProperties
public final Map<String,Object> getAdditionalProperties()
- Specified by:
getAdditionalPropertiesin classQuestionnaire.Metadata- Returns:
- value of
additionalPropertiesattribute
-
clear
public ModifiableQuestionnaireMetadata clear()
Clears the object by setting all attributes to their initial values.- Returns:
thisfor use in a chained invocation
-
from
public ModifiableQuestionnaireMetadata from(Questionnaire.Metadata instance)
Fill this modifiable instance with attribute values from the providedQuestionnaire.Metadatainstance. 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:
thisfor use in a chained invocation
-
from
public ModifiableQuestionnaireMetadata from(ModifiableQuestionnaireMetadata instance)
Fill this modifiable instance with attribute values from the providedQuestionnaire.Metadatainstance. 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:
thisfor use in a chained invocation
-
setFormId
public ModifiableQuestionnaireMetadata setFormId(String formId)
Assigns a value to theformIdattribute.- Parameters:
formId- The value for formId, can benull- Returns:
thisfor use in a chained invocation
-
setFormName
public ModifiableQuestionnaireMetadata setFormName(String formName)
Assigns a value to theformNameattribute.- Parameters:
formName- The value for formName, can benull- Returns:
thisfor use in a chained invocation
-
setStatus
public ModifiableQuestionnaireMetadata setStatus(Questionnaire.Metadata.Status status)
Assigns a value to thestatusattribute.If not set, this attribute will have a default value returned by the initializer of
status.- Parameters:
status- The value for status- Returns:
thisfor use in a chained invocation
-
setFormRev
public ModifiableQuestionnaireMetadata setFormRev(String formRev)
Assigns a value to theformRevattribute.- Parameters:
formRev- The value for formRev, can benull- Returns:
thisfor use in a chained invocation
-
setTenantId
public ModifiableQuestionnaireMetadata setTenantId(String tenantId)
Assigns a value to thetenantIdattribute.- Parameters:
tenantId- The value for tenantId, can benull- Returns:
thisfor use in a chained invocation
-
setCreated
public ModifiableQuestionnaireMetadata setCreated(Date created)
Assigns a value to thecreatedattribute.- Parameters:
created- The value for created, can benull- Returns:
thisfor use in a chained invocation
-
setLastAnswer
public ModifiableQuestionnaireMetadata setLastAnswer(Date lastAnswer)
Assigns a value to thelastAnswerattribute.- Parameters:
lastAnswer- The value for lastAnswer, can benull- Returns:
thisfor use in a chained invocation
-
setOpened
public ModifiableQuestionnaireMetadata setOpened(Date opened)
Assigns a value to theopenedattribute.- Parameters:
opened- The value for opened, can benull- Returns:
thisfor use in a chained invocation
-
setCompleted
public ModifiableQuestionnaireMetadata setCompleted(Date completed)
Assigns a value to thecompletedattribute.- Parameters:
completed- The value for completed, can benull- Returns:
thisfor use in a chained invocation
-
setLabel
public ModifiableQuestionnaireMetadata setLabel(String label)
Assigns a value to thelabelattribute.- Parameters:
label- The value for label, can benull- Returns:
thisfor use in a chained invocation
-
setSubmitUrl
public ModifiableQuestionnaireMetadata setSubmitUrl(String submitUrl)
Assigns a value to thesubmitUrlattribute.- Parameters:
submitUrl- The value for submitUrl, can benull- Returns:
thisfor use in a chained invocation
-
setReason
public ModifiableQuestionnaireMetadata setReason(Questionnaire.Metadata.Reason reason)
Assigns a value to thereasonattribute.- Parameters:
reason- The value for reason, can benull- Returns:
thisfor use in a chained invocation
-
setLanguage
public ModifiableQuestionnaireMetadata setLanguage(String language)
Assigns a value to thelanguageattribute.- Parameters:
language- The value for language, can benull- Returns:
thisfor use in a chained invocation
-
setOwner
public ModifiableQuestionnaireMetadata setOwner(String owner)
Assigns a value to theownerattribute.- Parameters:
owner- The value for owner, can benull- Returns:
thisfor use in a chained invocation
-
setCreator
public ModifiableQuestionnaireMetadata setCreator(String creator)
Assigns a value to thecreatorattribute.- Parameters:
creator- The value for creator, can benull- Returns:
thisfor use in a chained invocation
-
putAdditionalProperties
public ModifiableQuestionnaireMetadata putAdditionalProperties(String key, Object value)
Put one entry to theadditionalPropertiesmap.- Parameters:
key- The key in additionalProperties mapvalue- The associated value in the additionalProperties map- Returns:
thisfor 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 theadditionalPropertiesmap. Nulls are not permitted as keys or values.- Parameters:
entries- The entries that will be added to the additionalProperties map- Returns:
thisfor use in a chained invocation
-
putAllAdditionalProperties
public ModifiableQuestionnaireMetadata putAllAdditionalProperties(Map<String,? extends Object> entries)
Put all mappings from the specified map as entries to theadditionalPropertiesmap. Nulls are not permitted as keys or values.- Parameters:
entries- to be added to additionalProperties map- Returns:
thisfor use in a chained invocation
-
statusIsSet
public final boolean statusIsSet()
Returnstrueif the default attributestatusis set.- Returns:
trueif set
-
isInitialized
public final boolean isInitialized()
Returnstrueif all required attributes are set, indicating that the object is initialized.- Returns:
trueif set
-
toImmutable
public final ImmutableQuestionnaireMetadata toImmutable()
Converts toImmutableQuestionnaireMetadata.- Returns:
- An immutable instance of Metadata
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofModifiableQuestionnaireMetadatathat have equal attribute values.
-
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.
-
-