Records a profile joining or leaving a group within an organisation, along with who or what triggered the change, where it happened, and its previous group or organisation when it was a move rather than a first sign-up. A row is written by logSignup when a membership is created and by deletedSignuplog when one is removed, and the static finders on this class support sign-up and unsubscribe reporting, including date-bucketed and per-group counts.
Implements: Relational
Properties
| Property | Returns | Description |
|---|---|---|
| changedBy | Profile | User who performed this membership change. May be null when the change happened outside of a request, for example a background or async job. |
| changedOrg | boolean | Whether this entry records the membership moving to a different organisation, i.e. it has a previous organisation that differs from the current membership organisation. |
| deletedDate | Date | Date and time the membership was removed, for an entry created by deletedSignuplog. |
| groupEntity | Group | Group the profile joined (or, for a deletion entry, was removed from). |
| id | long | Database primary key of this sign-up log entry. |
| ipAddress | String | The client IP the signup came from. Recorded so that fraud rules can ask how many signups have come from one address recently, which the operation source and id cannot answer. |
| membershipOrg | Organisation | Organisation that the group membership itself is associated with, which may differ from the admin organisation that recorded the entry. |
| opId | String | The id or other reference for the specific item that is the source of the operation, i.e. the request id or async job id, truncated to 2000 characters. |
| opSource | String | The operation that resulted in this change, i.e. an HTTP request URL or an async job's task name, truncated to 200 characters. |
| previousGroup | Group | Group the profile belonged to before this change, when the entry records a move between groups rather than a first sign-up. |
| previousOrg | Organisation | Organisation the membership was associated with before this change, when the entry records a move between organisations rather than a first sign-up. |
| profile | Profile | Profile that the sign-up or membership change applies to. |
| reqDate | Date | Date and time the membership change was recorded. Never null. |
| reqDay | int | Day of the month the request date falls on. |
| reqHour | int | Hour of the day the request date falls in, in 24 hour format. |
| reqMonth | int | Calendar month the request date falls in, using java.util.Calendar's zero-based numbering (0 for January). |
| reqYear | int | Calendar year the request date falls in. Stored alongside the request date so reports can group and filter by year without recomputing it. |
| website | Website | Website that recorded the sign-up, if the change occurred through a website rather than the admin console or a background process. |
Methods
getId() · getProfile() · setProfile(Profile profile) · getGroupEntity() · setGroupEntity(Group group) · getMembershipOrg() · setMembershipOrg(Organisation membershipOrg) · setOrganisation(Organisation organisation) · getWebsite() · setWebsite(Website website) · getReqDate() · setReqDate(Date reqDate) · getReqYear() · setReqYear(int reqYear) · getReqMonth() · setReqMonth(int reqMonth) · getReqDay() · setReqDay(int reqDay) · getReqHour() · setReqHour(int reqHour) · getDeletedDate() · setDeletedDate(Date deletedDate) · getPreviousOrg() · setPreviousOrg(Organisation previousOrg) · getPreviousGroup() · setPreviousGroup(Group previousGroup) · getChangedBy() · setChangedBy(Profile changedBy) · getOpSource() · setOpSource(String opSource) · getOpId() · setOpId(String opId) · getIpAddress() · setIpAddress(String ipAddress) · isChangedOrg()
getId()
Returns: long
Database primary key of this sign-up log entry.
getProfile()
Returns: Profile
Profile that the sign-up or membership change applies to.
setProfile(Profile profile)
Returns: void
Sets the profile the entry applies to.
| Parameter | Description |
|---|---|
profile | the affected profile |
getGroupEntity()
Returns: Group
Group the profile joined (or, for a deletion entry, was removed from).
setGroupEntity(Group group)
Returns: void
Sets the group involved in the membership change.
| Parameter | Description |
|---|---|
group | the group joined or left |
getMembershipOrg()
Returns: Organisation
Organisation that the group membership itself is associated with, which may differ from the admin organisation that recorded the entry.
setMembershipOrg(Organisation membershipOrg)
Returns: void
Sets the organisation the membership is associated with.
| Parameter | Description |
|---|---|
membershipOrg | the membership's organisation |
setOrganisation(Organisation organisation)
Returns: void
Sets the admin organisation this entry is recorded against.
| Parameter | Description |
|---|---|
organisation | the owning admin organisation |
getWebsite()
Returns: Website
Website that recorded the sign-up, if the change occurred through a website rather than the admin console or a background process.
setWebsite(Website website)
Returns: void
Sets the website that recorded the sign-up.
| Parameter | Description |
|---|---|
website | the recording website, or null if none was involved |
getReqDate()
Returns: Date
Date and time the membership change was recorded. Never null.
setReqDate(Date reqDate)
Returns: void
Sets the date and time the membership change was recorded.
| Parameter | Description |
|---|---|
reqDate | the request date |
getReqYear()
Returns: int
Calendar year the request date falls in. Stored alongside the request date so reports can group and filter by year without recomputing it.
setReqYear(int reqYear)
Returns: void
Sets the calendar year the request date falls in.
| Parameter | Description |
|---|---|
reqYear | the request year |
getReqMonth()
Returns: int
Calendar month the request date falls in, using java.util.Calendar's zero-based numbering (0 for January).
setReqMonth(int reqMonth)
Returns: void
Sets the calendar month the request date falls in.
| Parameter | Description |
|---|---|
reqMonth | the request month, zero-based (0 for January) |
getReqDay()
Returns: int
Day of the month the request date falls on.
setReqDay(int reqDay)
Returns: void
Sets the day of the month the request date falls on.
| Parameter | Description |
|---|---|
reqDay | the request day of month |
getReqHour()
Returns: int
Hour of the day the request date falls in, in 24 hour format.
setReqHour(int reqHour)
Returns: void
Sets the hour of the day the request date falls in.
| Parameter | Description |
|---|---|
reqHour | the request hour, in 24 hour format |
getDeletedDate()
Returns: Date
Date and time the membership was removed, for an entry created by deletedSignuplog.
setDeletedDate(Date deletedDate)
Returns: void
Sets the date and time the membership was removed.
| Parameter | Description |
|---|---|
deletedDate | the deletion date |
getPreviousOrg()
Returns: Organisation
Organisation the membership was associated with before this change, when the entry records a move between organisations rather than a first sign-up.
setPreviousOrg(Organisation previousOrg)
Returns: void
Sets the organisation the membership was associated with before this change.
| Parameter | Description |
|---|---|
previousOrg | the previous membership organisation |
getPreviousGroup()
Returns: Group
Group the profile belonged to before this change, when the entry records a move between groups rather than a first sign-up.
setPreviousGroup(Group previousGroup)
Returns: void
Sets the group the profile belonged to before this change.
| Parameter | Description |
|---|---|
previousGroup | the previous group |
getChangedBy()
Returns: Profile
User who performed this membership change. May be null when the change happened outside of a request, for example a background or async job.
setChangedBy(Profile changedBy)
Returns: void
Sets the user who performed this membership change.
| Parameter | Description |
|---|---|
changedBy | the profile that made the change |
getOpSource()
Returns: String
The operation that resulted in this change, i.e. an HTTP request URL or an async job's task name, truncated to 200 characters.
setOpSource(String opSource)
Returns: void
Sets the operation that resulted in this change.
| Parameter | Description |
|---|---|
opSource | the operation source |
getOpId()
Returns: String
The id or other reference for the specific item that is the source of the operation, i.e. the request id or async job id, truncated to 2000 characters.
setOpId(String opId)
Returns: void
Sets the id or other reference for the source of the operation.
| Parameter | Description |
|---|---|
opId | the operation id |
getIpAddress()
Returns: String
The client IP the signup came from. Recorded so that fraud rules can ask how many signups have come from one address recently, which the operation source and id cannot answer.
setIpAddress(String ipAddress)
Returns: void
Sets the client IP the signup came from.
| Parameter | Description |
|---|---|
ipAddress | the client IP address |
isChangedOrg()
Returns: boolean
Whether this entry records the membership moving to a different organisation, i.e. it has a previous organisation that differs from the current membership organisation.