Class PModeParty

java.lang.Object
com.helger.phase4.model.pmode.PModeParty
All Implemented Interfaces:
com.helger.base.id.IHasID<String>, Serializable

@NotThreadSafe @MustImplementEqualsAndHashcode public class PModeParty extends Object implements com.helger.base.id.IHasID<String>, Serializable
Party within a PMode
Author:
Philip Helger
See Also:
  • Constructor Details

    • PModeParty

      public PModeParty(@Nullable String sIDType, @Nonempty @NonNull @Nonempty String sIDValue, @Nonempty @NonNull @Nonempty String sRole, @Nullable String sUserName, @Nullable String sPassword)
  • Method Details

    • getIDType

      public final @Nullable String getIDType()
      Returns:
      The ID type as passed in the constructor. May be null.
    • hasIDType

      public final boolean hasIDType()
      Returns:
      true if an ID type is present, false if not.
    • setIDType

      public final @NonNull com.helger.base.state.EChange setIDType(@Nullable String sIDType)
      Set the ID type to use.
      Parameters:
      sIDType - ID type to use. May be null.
      Returns:
      EChange.
      Since:
      0.12.0
    • getIDValue

      @Nonempty public final @NonNull @Nonempty String getIDValue()
      Returns:
      The ID value. Neither null nor empty.
    • setIDValue

      public final @NonNull com.helger.base.state.EChange setIDValue(@Nonempty @NonNull @Nonempty String sIDValue)
      Set the ID value to use.
      Parameters:
      sIDValue - ID value to use. May neither be null nor empty.
      Returns:
      EChange.
      Since:
      0.12.0
    • getID

      @Nonempty public final @NonNull @Nonempty String getID()
      Either id-type:id-value or just id-value if not id-type is present.
      Specified by:
      getID in interface com.helger.base.id.IHasID<String>
    • getRole

      @Nonempty public final @NonNull @Nonempty String getRole()
      Returns:
      The party role. Never null nor empty.
    • setRole

      public final @NonNull com.helger.base.state.EChange setRole(@Nonempty @NonNull @Nonempty String sRole)
      Set the role to use.
      Parameters:
      sRole - Role to use. May neither be null nor empty.
      Returns:
      EChange.
      Since:
      0.12.0
    • getUserName

      public final @Nullable String getUserName()
      Returns:
      The user name. May be null.
    • hasUserName

      public final boolean hasUserName()
      Returns:
      true if a user name is present, false if not.
    • setUserName

      public final @NonNull com.helger.base.state.EChange setUserName(@Nullable String sUserName)
      Set the user name to use.
      Parameters:
      sUserName - User name to use. May be null.
      Returns:
      EChange.
      Since:
      0.12.0
    • getPassword

      public final @Nullable String getPassword()
      Returns:
      The password in plain text. May be null.
    • hasPassword

      public final boolean hasPassword()
      Returns:
      true if a password is present, false if not.
    • setPassword

      public final @NonNull com.helger.base.state.EChange setPassword(@Nullable String sPassword)
      Set the password to use.
      Parameters:
      sPassword - Password to use. May be null.
      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
    • createSimple

      public static @NonNull PModeParty createSimple(@Nonempty @NonNull @Nonempty String sIDValue, @Nonempty @NonNull @Nonempty String sRole)