Class PModeParty

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

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

  • Method Details

    • getIDType

      @Nullable public final 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

      @Nonnull public final com.helger.commons.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

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

      @Nonnull public final com.helger.commons.state.EChange setIDValue(@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

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

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

      @Nonnull public final com.helger.commons.state.EChange setRole(@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

      @Nullable public final 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

      @Nonnull public final com.helger.commons.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

      @Nullable public final 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

      @Nonnull public final com.helger.commons.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

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