Class PModeProperty

java.lang.Object
com.helger.phase4.model.pmode.leg.PModeProperty
All Implemented Interfaces:
com.helger.commons.name.IHasName, com.helger.commons.state.IMandatoryIndicator, com.helger.commons.text.IHasDescription, Serializable

@NotThreadSafe @MustImplementEqualsAndHashcode public class PModeProperty extends Object implements com.helger.commons.name.IHasName, com.helger.commons.text.IHasDescription, com.helger.commons.state.IMandatoryIndicator, Serializable
A property is a data structure that consists of four values: the property name, which can be used as an identifier of the property (e.g. a required property named "messagetype" can be noted as: Properties[messagetype].required="true"); the property description; the property data type; and a Boolean value, indicating whether the property is expected or optional, within the User message. This parameter controls the contents of the element eb:Messaging/eb:UserMessage/eb:MessageProperties.
Author:
Philip Helger
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • getName

      @Nonnull @Nonempty public final String getName()
      The PMode property name.
      Specified by:
      getName in interface com.helger.commons.name.IHasName
    • setName

      @Nonnull public final com.helger.commons.state.EChange setName(@Nonnull @Nonempty String sName)
      Set the property name.
      Parameters:
      sName - Property name. May neither be null nor empty.
      Returns:
      EChange
      Since:
      0.12.0
    • getDescription

      @Nullable public final String getDescription()
      The PMode property description.
      Specified by:
      getDescription in interface com.helger.commons.text.IHasDescription
    • setDescription

      @Nonnull public final com.helger.commons.state.EChange setDescription(@Nullable String sDescription)
      Set the description.
      Parameters:
      sDescription - The description. May be null.
      Returns:
      EChange
    • getDataType

      @Nonnull @Nonempty public final String getDataType()
      Returns:
      The PMode property data type. May neither be null nor empty.
    • setDataType

      @Nonnull public final com.helger.commons.state.EChange setDataType(@Nonnull @Nonempty String sDataType)
      Set the property data type.
      Parameters:
      sDataType - Property data type. May neither be null nor empty.
      Returns:
      EChange
      Since:
      0.12.0
    • isMandatory

      public final boolean isMandatory()
      Specified by:
      isMandatory in interface com.helger.commons.state.IMandatoryIndicator
      Returns:
      true if the PMode property is mandatory, false if it is optional.
    • isOptional

      public final boolean isOptional()
      Specified by:
      isOptional in interface com.helger.commons.state.IMandatoryIndicator
      Returns:
      true if the PMode property is optional, false if it is mandatory.
    • setMandatory

      @Nonnull public final com.helger.commons.state.EChange setMandatory(@Nonnull com.helger.commons.state.EMandatory eMandatory)
      Set the property mandatory or optional.
      Parameters:
      eMandatory - Property mandatory state. May not be null.
      Returns:
      EChange
      Since:
      0.12.0
    • setMandatory

      @Nonnull public final com.helger.commons.state.EChange setMandatory(boolean bMandatory)
      Set the property mandatory or optional.
      Parameters:
      bMandatory - true for mandatory, false for optional.
      Returns:
      EChange
      Since:
      0.12.0
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object