Package com.atlassian.crowd.model.user
Class BaseImmutableUser
java.lang.Object
com.atlassian.crowd.model.user.BaseImmutableUser
- All Implemented Interfaces:
User,DirectoryEntity,User,Serializable,Comparable<User>,Principal
- Direct Known Subclasses:
ImmutableTimestampedUser,ImmutableTimestampedUserWithAttributes,ImmutableUser,ImmutableUserWithAttributes
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsModifierConstructorDescriptionBaseImmutableUser(long directoryId, String name, String displayName, String emailAddress, boolean active, String firstName, String lastName, String externalId) protectedBaseImmutableUser(BaseImmutableUser.Builder<? extends BaseImmutableUser> builder) -
Method Summary
Modifier and TypeMethodDescriptionintCompareTo must be compatible with the equals() and hashCode() methodsbooleanImplementations must ensure equality based on getDirectoryId() and case-insensitive getName().longgetName()inthashCode()Implementations must produce a hashcode based on getDirectoryId() and case-insensitive getName().booleanisActive()toString()abstract BaseImmutableUserMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.atlassian.crowd.embedded.api.User
isMarkedAsDeleted
-
Constructor Details
-
BaseImmutableUser
-
BaseImmutableUser
-
-
Method Details
-
isActive
public boolean isActive() -
getDirectoryId
public long getDirectoryId()- Specified by:
getDirectoryIdin interfaceDirectoryEntity- Specified by:
getDirectoryIdin interfaceUser- Returns:
- id of the directory in which the DirectoryEntity is stored.
-
getName
- Specified by:
getNamein interfaceDirectoryEntity- Specified by:
getNamein interfacePrincipal- Returns:
- name of the entity.
-
getEmailAddress
- Specified by:
getEmailAddressin interfaceUser- Returns:
- email address of the user.
-
getDisplayName
- Specified by:
getDisplayNamein interfaceUser- Returns:
- display name (eg. full name) of the user, must never be null.
-
getFirstName
- Specified by:
getFirstNamein interfaceUser
-
getLastName
- Specified by:
getLastNamein interfaceUser
-
getExternalId
- Specified by:
getExternalIdin interfaceUser
-
equals
Description copied from interface:DirectoryEntityImplementations must ensure equality based on getDirectoryId() and case-insensitive getName().- Specified by:
equalsin interfaceDirectoryEntity- Specified by:
equalsin interfacePrincipal- Specified by:
equalsin interfaceUser- Overrides:
equalsin classObject- Parameters:
o- object to compare to.- Returns:
trueif and only if the directoryId and the lowercase names of the directory entities match.
-
hashCode
public int hashCode()Description copied from interface:DirectoryEntityImplementations must produce a hashcode based on getDirectoryId() and case-insensitive getName(). -
compareTo
Description copied from interface:UserCompareTo must be compatible with the equals() and hashCode() methods- Specified by:
compareToin interfaceComparable<User>- Specified by:
compareToin interfaceUser
-
withName
-
toString
-