Class Account
- java.lang.Object
-
- ch.colabproject.colab.api.model.user.Account
-
- All Implemented Interfaces:
ColabEntity,WithDeletionStatus,WithPermission,WithTrackingData,WithWebsocketChannels,WithId,WithJsonDiscriminator,Serializable
- Direct Known Subclasses:
LocalAccount
@Entity public abstract class Account extends Object implements ColabEntity, WithWebsocketChannels
Accounts are used by users to authenticate.- Author:
- maxence
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Account()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)ChannelsBuilders.ChannelsBuildergetChannelsBuilder()Get the channels this entity shall be sent through.Conditions.ConditiongetCreateCondition()Get the condition required to persist this entityDeletionStatusgetDeletionStatus()Get the deletion status :List<HttpSession>getHttpSessions()Get the list of httpSession this account is usingLonggetId()Conditions.ConditiongetReadCondition()Get the condition required to read this entityTrackinggetTrackingData()Get the tracking dataConditions.ConditiongetUpdateCondition()Get the condition required to update this entityUsergetUser()LonggetUserId()Return the id of the account ownerinthashCode()voidsetDeletionStatus(DeletionStatus status)Set the deletion status :voidsetHttpSessions(List<HttpSession> httpSessions)Set the list of httpSessionvoidsetId(Long id)set idvoidsetTrackingData(Tracking trackingData)Set tracking datavoidsetUser(User user)Set account ownervoidsetUserId(Long id)set the id of the account owner.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface ch.colabproject.colab.api.model.ColabEntity
mergeToDuplicate, mergeToUpdate
-
Methods inherited from interface ch.colabproject.colab.generator.model.interfaces.WithJsonDiscriminator
getJsonDiscriminator
-
Methods inherited from interface ch.colabproject.colab.api.model.WithPermission
getDeleteCondition
-
Methods inherited from interface ch.colabproject.colab.api.model.WithTrackingData
initErasureTrackingData, resetErasureTrackingData, touch
-
Methods inherited from interface ch.colabproject.colab.api.model.WithWebsocketChannels
getIndexEntryPayload
-
-
-
-
Method Detail
-
setId
public void setId(Long id)
set id- Parameters:
id- id
-
getTrackingData
public Tracking getTrackingData()
Get the tracking data- Specified by:
getTrackingDatain interfaceWithTrackingData- Returns:
- tracking data
-
setTrackingData
public void setTrackingData(Tracking trackingData)
Set tracking data- Specified by:
setTrackingDatain interfaceWithTrackingData- Parameters:
trackingData- new tracking data
-
getDeletionStatus
public DeletionStatus getDeletionStatus()
Description copied from interface:WithDeletionStatusGet the deletion status :Is it in a bin or ready to be definitely deleted.
Null means active.
- Specified by:
getDeletionStatusin interfaceWithDeletionStatus- Returns:
- null or a deletion status
-
setDeletionStatus
public void setDeletionStatus(DeletionStatus status)
Description copied from interface:WithDeletionStatusSet the deletion status :Is it in a bin or ready to be definitely deleted.
Null means active.
- Specified by:
setDeletionStatusin interfaceWithDeletionStatus- Parameters:
status- null or a deletion status
-
getUser
public User getUser()
- Returns:
- the user
-
setUser
public void setUser(User user)
Set account owner- Parameters:
user- user who owns this account
-
getUserId
public Long getUserId()
Return the id of the account owner- Returns:
- id of the user
-
setUserId
public void setUserId(Long id)
set the id of the account owner. For serialization only- Parameters:
id- if of the user
-
getHttpSessions
public List<HttpSession> getHttpSessions()
Get the list of httpSession this account is using- Returns:
- httpSession list
-
setHttpSessions
public void setHttpSessions(List<HttpSession> httpSessions)
Set the list of httpSession- Parameters:
httpSessions- new httpSessions
-
getChannelsBuilder
public ChannelsBuilders.ChannelsBuilder getChannelsBuilder()
Description copied from interface:WithWebsocketChannelsGet the channels this entity shall be sent through.- Specified by:
getChannelsBuilderin interfaceWithWebsocketChannels- Returns:
- list of channels
-
getReadCondition
public Conditions.Condition getReadCondition()
Description copied from interface:WithPermissionGet the condition required to read this entity- Specified by:
getReadConditionin interfaceWithPermission- Returns:
- the condition
-
getUpdateCondition
public Conditions.Condition getUpdateCondition()
Description copied from interface:WithPermissionGet the condition required to update this entity- Specified by:
getUpdateConditionin interfaceWithPermission- Returns:
- the condition
-
getCreateCondition
public Conditions.Condition getCreateCondition()
Description copied from interface:WithPermissionGet the condition required to persist this entity- Specified by:
getCreateConditionin interfaceWithPermission- Returns:
- the condition
-
-