Class PModeProperty

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

@NotThreadSafe @MustImplementEqualsAndHashcode public class PModeProperty extends Object implements com.helger.base.name.IHasName, com.helger.text.IHasDescription, com.helger.base.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 Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    static final boolean
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    PModeProperty(@NonNull @Nonempty String sName, @Nullable String sDescription, @NonNull @Nonempty String sDataType, @NonNull com.helger.base.state.EMandatory eMandatory)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    final @NonNull @Nonempty String
     
    final @Nullable String
    The PMode property description.
    final @NonNull @Nonempty String
    The PMode property name.
    int
     
    final boolean
     
    final boolean
     
    final @NonNull com.helger.base.state.EChange
    setDataType(@NonNull @Nonempty String sDataType)
    Set the property data type.
    final @NonNull com.helger.base.state.EChange
    setDescription(@Nullable String sDescription)
    Set the description.
    final @NonNull com.helger.base.state.EChange
    setMandatory(boolean bMandatory)
    Set the property mandatory or optional.
    final @NonNull com.helger.base.state.EChange
    setMandatory(@NonNull com.helger.base.state.EMandatory eMandatory)
    Set the property mandatory or optional.
    final @NonNull com.helger.base.state.EChange
    setName(@NonNull @Nonempty String sName)
    Set the property name.
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.helger.text.IHasDescription

    hasDescription

    Methods inherited from interface com.helger.base.state.IMandatoryIndicator

    and, or
  • Field Details

  • Constructor Details

    • PModeProperty

      public PModeProperty()
    • PModeProperty

      public PModeProperty(@Nonempty @NonNull @Nonempty String sName, @Nullable String sDescription, @Nonempty @NonNull @Nonempty String sDataType, @NonNull com.helger.base.state.EMandatory eMandatory)
  • Method Details

    • getName

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

      public final @NonNull com.helger.base.state.EChange setName(@Nonempty @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

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

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

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

      public final @NonNull com.helger.base.state.EChange setDataType(@Nonempty @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.base.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.base.state.IMandatoryIndicator
      Returns:
      true if the PMode property is optional, false if it is mandatory.
    • setMandatory

      public final @NonNull com.helger.base.state.EChange setMandatory(@NonNull com.helger.base.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

      public final @NonNull com.helger.base.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