Package com.helger.phase4.model.pmode
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull PModePartycreateSimple(@NonNull @Nonempty String sIDValue, @NonNull @Nonempty String sRole) booleanfinal @NonNull @Nonempty StringgetID()Eitherid-type:id-valueor justid-valueif not id-type is present.final @Nullable Stringfinal @NonNull @Nonempty Stringfinal @Nullable Stringfinal @NonNull @Nonempty StringgetRole()final @Nullable StringinthashCode()final booleanfinal booleanfinal booleanfinal @NonNull com.helger.base.state.EChangeSet the ID type to use.final @NonNull com.helger.base.state.EChangesetIDValue(@NonNull @Nonempty String sIDValue) Set the ID value to use.final @NonNull com.helger.base.state.EChangesetPassword(@Nullable String sPassword) Set the password to use.final @NonNull com.helger.base.state.EChangeSet the role to use.final @NonNull com.helger.base.state.EChangesetUserName(@Nullable String sUserName) Set the user name to use.toString()
-
Constructor Details
-
PModeParty
-
-
Method Details
-
getIDType
- Returns:
- The ID type as passed in the constructor. May be
null.
-
hasIDType
public final boolean hasIDType()- Returns:
trueif an ID type is present,falseif not.
-
setIDType
Set the ID type to use.- Parameters:
sIDType- ID type to use. May benull.- Returns:
EChange.- Since:
- 0.12.0
-
getIDValue
- Returns:
- The ID value. Neither
nullnor 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 benullnor empty.- Returns:
EChange.- Since:
- 0.12.0
-
getID
Eitherid-type:id-valueor justid-valueif not id-type is present.- Specified by:
getIDin interfacecom.helger.base.id.IHasID<String>
-
getRole
- Returns:
- The party role. Never
nullnor 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 benullnor empty.- Returns:
EChange.- Since:
- 0.12.0
-
getUserName
- Returns:
- The user name. May be
null.
-
hasUserName
public final boolean hasUserName()- Returns:
trueif a user name is present,falseif not.
-
setUserName
Set the user name to use.- Parameters:
sUserName- User name to use. May benull.- Returns:
EChange.- Since:
- 0.12.0
-
getPassword
- Returns:
- The password in plain text. May be
null.
-
hasPassword
public final boolean hasPassword()- Returns:
trueif a password is present,falseif not.
-
setPassword
Set the password to use.- Parameters:
sPassword- Password to use. May benull.- Returns:
EChange.- Since:
- 0.12.0
-
equals
-
hashCode
public int hashCode() -
toString
-
createSimple
public static @NonNull PModeParty createSimple(@Nonempty @NonNull @Nonempty String sIDValue, @Nonempty @NonNull @Nonempty String sRole)
-