Records that a profile is a member of a group within a particular organisation, which is how nearly all permissions and group-driven behaviour are assigned. The important difference from the usual idea of a user group is that membership here is always qualified by the organisation it applies in, because organisations are nested. The same profile can hold the same group in several organisations and each is a separate row, so Bob can be a Sales Rep in the Southern Region and a Report Viewer in ACME Corporation at the same time. A unique constraint on member, group and organisation stops the same combination being stored twice. Extra per-membership data is kept in the linked NvSet, and the Subordinate rows derived from a membership are what place the member under each organisation above them.

Group: Database Entities

Implements: Serializable, Relational


Properties

PropertyReturnsDescription
createdByProfileThe profile recorded as having created this membership, where the creator was known. Null when the membership was created by a process that did not record one. Lazily loaded.
createdDateDateWhen this membership was created, which is when the profile joined the group in that organisation. Required.
expiryDateDateOptional date after which the membership should no longer be treated as current. Null means it does not expire. Nothing on this class enforces it: the row stays in the database and it is up to the code reading the membership to honour the date.
fieldsNvSetThe set of custom name and value pairs captured against this membership, typically the answers to questions asked when the profile joined the group. Null until the first field value is set. Loaded eagerly.
groupEntityGroupThe group the member belongs to. The property is called groupEntity rather than group because group is a reserved word in SQL. Required, and lazily loaded.
idLongThe database-assigned unique identifier for this membership.
memberProfileThe profile that holds this membership. Required, and lazily loaded.
modifiedDateDateWhen this membership was last changed. Maintained by the code that updates the membership rather than by Hibernate. Required.
notesStringFree text note about this membership, deliberately limited to 200 characters because these rows are held in the second level cache in bulk and a large column here costs memory across the whole system.
subordinatesList<Subordinate>The Subordinate rows derived from this membership, one for the organisation it is held within and one for each organisation above that. They are rebuilt by updateSubordinates and removed when the membership is deleted. Lazily loaded.
withinOrgOrganisationThe organisation the member holds this group within, for example Sally being a Manager in ACME Corporation. This is the qualifier that makes the same profile and group into different memberships in different organisations. Required, and lazily loaded.

Methods

getId() · getFields() · getWithinOrg() · getMember() · getGroupEntity() · getCreatedDate() · getModifiedDate() · getExpiryDate() · getCreatedBy() · getNotes() · getSubordinates() · setFieldValue(String name, String value)

getId()

Returns: Long

The database-assigned unique identifier for this membership.

getFields()

Returns: NvSet

The set of custom name and value pairs captured against this membership, typically the answers to questions asked when the profile joined the group. Null until the first field value is set. Loaded eagerly.

getWithinOrg()

Returns: Organisation

The organisation the member holds this group within, for example Sally being a Manager in ACME Corporation. This is the qualifier that makes the same profile and group into different memberships in different organisations. Required, and lazily loaded.

getMember()

Returns: Profile

The profile that holds this membership. Required, and lazily loaded.

getGroupEntity()

Returns: Group

The group the member belongs to. The property is called groupEntity rather than group because group is a reserved word in SQL. Required, and lazily loaded.

getCreatedDate()

Returns: Date

When this membership was created, which is when the profile joined the group in that organisation. Required.

getModifiedDate()

Returns: Date

When this membership was last changed. Maintained by the code that updates the membership rather than by Hibernate. Required.

getExpiryDate()

Returns: Date

Optional date after which the membership should no longer be treated as current. Null means it does not expire. Nothing on this class enforces it: the row stays in the database and it is up to the code reading the membership to honour the date.

getCreatedBy()

Returns: Profile

The profile recorded as having created this membership, where the creator was known. Null when the membership was created by a process that did not record one. Lazily loaded.

getNotes()

Returns: String

Free text note about this membership, deliberately limited to 200 characters because these rows are held in the second level cache in bulk and a large column here costs memory across the whole system.

getSubordinates()

Returns: List<Subordinate>

The Subordinate rows derived from this membership, one for the organisation it is held within and one for each organisation above that. They are rebuilt by updateSubordinates and removed when the membership is deleted. Lazily loaded.

setFieldValue(String name, String value)

Returns: void

Sets a custom field value on this membership using the session bound to the current request, creating the backing NvSet on first use. Passing a null value removes the field rather than storing an empty one.

ParameterDescription
namethe field name to set
valuethe value to store, or null to remove the field
To get full access to the Kademi Hub existing customers can login here, or new customers can register here.