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 boolean
equals(Object obj)
ChannelsBuilders.ChannelsBuilder
getChannelsBuilder()
Get the channels this entity shall be sent through.Conditions.Condition
getCreateCondition()
Get the condition required to persist this entityDeletionStatus
getDeletionStatus()
Get the deletion status :List<HttpSession>
getHttpSessions()
Get the list of httpSession this account is usingLong
getId()
Conditions.Condition
getReadCondition()
Get the condition required to read this entityTracking
getTrackingData()
Get the tracking dataConditions.Condition
getUpdateCondition()
Get the condition required to update this entityUser
getUser()
Long
getUserId()
Return the id of the account ownerint
hashCode()
void
setDeletionStatus(DeletionStatus status)
Set the deletion status :void
setHttpSessions(List<HttpSession> httpSessions)
Set the list of httpSessionvoid
setId(Long id)
set idvoid
setTrackingData(Tracking trackingData)
Set tracking datavoid
setUser(User user)
Set account ownervoid
setUserId(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:
getTrackingData
in interfaceWithTrackingData
- Returns:
- tracking data
-
setTrackingData
public void setTrackingData(Tracking trackingData)
Set tracking data- Specified by:
setTrackingData
in interfaceWithTrackingData
- Parameters:
trackingData
- new tracking data
-
getDeletionStatus
public DeletionStatus getDeletionStatus()
Description copied from interface:WithDeletionStatus
Get the deletion status :Is it in a bin or ready to be definitely deleted.
Null means active.
- Specified by:
getDeletionStatus
in interfaceWithDeletionStatus
- Returns:
- null or a deletion status
-
setDeletionStatus
public void setDeletionStatus(DeletionStatus status)
Description copied from interface:WithDeletionStatus
Set the deletion status :Is it in a bin or ready to be definitely deleted.
Null means active.
- Specified by:
setDeletionStatus
in 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:WithWebsocketChannels
Get the channels this entity shall be sent through.- Specified by:
getChannelsBuilder
in interfaceWithWebsocketChannels
- Returns:
- list of channels
-
getReadCondition
public Conditions.Condition getReadCondition()
Description copied from interface:WithPermission
Get the condition required to read this entity- Specified by:
getReadCondition
in interfaceWithPermission
- Returns:
- the condition
-
getUpdateCondition
public Conditions.Condition getUpdateCondition()
Description copied from interface:WithPermission
Get the condition required to update this entity- Specified by:
getUpdateCondition
in interfaceWithPermission
- Returns:
- the condition
-
getCreateCondition
public Conditions.Condition getCreateCondition()
Description copied from interface:WithPermission
Get the condition required to persist this entity- Specified by:
getCreateCondition
in interfaceWithPermission
- Returns:
- the condition
-
-