public final class PSMembership extends Object implements PSEntity
Constructor and Description |
---|
PSMembership()
Create a new membership without setting the group of member.
|
PSMembership(PSGroup group,
PSMember member)
Create a new membership.
|
Modifier and Type | Method and Description |
---|---|
EntityValidity |
checkValid()
Determines whether this object is valid based on known PageSeeder constraints.
|
Date |
getCreated() |
PSDetails |
getDetails() |
String |
getField(int i)
Shorthand method to get the detail field on that membership.
|
PSGroup |
getGroup() |
Long |
getId() |
String |
getIdentifier()
Returns the private ID only.
|
String |
getKey() |
PSMember |
getMember() |
PSNotification |
getNotification() |
PSRole |
getRole() |
boolean |
isIdentifiable()
Indicates whether the membership is identifiable.
|
boolean |
isListed() |
boolean |
isValid()
Determines whether the entity is valid based on known PageSeeder constraints.
|
void |
setCreated(Date created) |
void |
setDetails(PSDetails details) |
void |
setField(int i,
String value)
Shorthand method to set the detail field on that membership.
|
void |
setGroup(PSGroup group) |
void |
setId(Long id) |
void |
setListed(boolean listed) |
void |
setMember(PSMember member) |
void |
setNotification(PSNotification notification) |
void |
setRole(PSRole role) |
String |
toString() |
public PSMembership()
public Long getId()
public String getKey()
public boolean isIdentifiable()
To be identifiable, the membership must have either PageSeeder database ID or it must have both a group and member defined and they both must be identifiable.
isIdentifiable
in interface PSEntity
true
if ID is specified or both group and member are identifiable;
false
otherwise.public String getIdentifier()
getIdentifier
in interface PSEntity
null
.public PSGroup getGroup()
public PSMember getMember()
public boolean isListed()
public PSNotification getNotification()
public PSRole getRole()
public Date getCreated()
public PSDetails getDetails()
public void setId(Long id)
id
- the id to setpublic void setGroup(PSGroup group)
group
- the group to setpublic void setMember(PSMember member)
member
- the member to setpublic void setListed(boolean listed)
listed
- the listed to setpublic void setNotification(PSNotification notification)
notification
- the notification to setpublic void setRole(PSRole role)
role
- the role to setpublic void setCreated(Date created)
created
- the date the membership was created.public void setDetails(PSDetails details)
details
- Membership detail fields if anypublic String getField(int i)
i
- the 1-based index of the field.IndexOutOfBoundsException
- If the index is less than 1 or greater than 15.public void setField(int i, String value)
If this membership has no details, this method will add a new empty PSDetails object.
i
- the 1-based index of the field.value
- the value to set.IndexOutOfBoundsException
- If the index is less than 1 or greater than 15.public EntityValidity checkValid()
PSEntity
checkValid
in interface PSEntity
true
if the object is intrinsically valid based on its internal values;
false
if any of its attributes violates a PageSeeder constraint.public boolean isValid()
PSEntity
Copyright © 2016 Allette Systems. All rights reserved.