public class Membership extends java.lang.Object implements Identifiable, FluentStyle
Modifier and Type | Field and Description |
---|---|
static Property<java.lang.Integer> |
DATABASE_ID
database numeric ID.
|
static Property<java.lang.Integer> |
GROUP_ID
Group.
|
static Property<java.lang.String> |
GROUP_NAME |
static Property<Project> |
PROJECT |
static Property<java.util.Set<Role>> |
ROLES |
static Property<java.lang.Integer> |
USER_ID
User.
|
static Property<java.lang.String> |
USER_NAME |
Constructor and Description |
---|
Membership(Transport transport) |
Membership(Transport transport,
Project project,
int userId) |
Modifier and Type | Method and Description |
---|---|
Membership |
addRoles(java.util.Collection<Role> roles) |
Membership |
create()
Required attributes: 1) project 2) either userId/groupId or roles collection
|
void |
delete()
this object must have ID property set
|
boolean |
equals(java.lang.Object o) |
java.lang.Integer |
getGroupId() |
java.lang.String |
getGroupName() |
java.lang.Integer |
getId() |
Project |
getProject() |
java.util.Collection<Role> |
getRoles() |
PropertyStorage |
getStorage() |
java.lang.Integer |
getUserId() |
java.lang.String |
getUserName() |
int |
hashCode() |
void |
setGroupId(java.lang.Integer id) |
void |
setGroupName(java.lang.String id) |
Membership |
setId(java.lang.Integer id) |
Membership |
setProject(Project project) |
void |
setTransport(Transport transport) |
Membership |
setUserId(java.lang.Integer id) |
void |
setUserName(java.lang.String id) |
java.lang.String |
toString() |
void |
update() |
public static final Property<java.lang.Integer> DATABASE_ID
public static final Property<java.lang.Integer> USER_ID
public static final Property<java.lang.String> USER_NAME
public static final Property<java.lang.Integer> GROUP_ID
public static final Property<java.lang.String> GROUP_NAME
public Membership(Transport transport)
public Membership setId(java.lang.Integer id)
id
- database ID.public java.lang.Integer getId()
getId
in interface Identifiable
public Project getProject()
public Membership setProject(Project project)
public java.lang.Integer getUserId()
public Membership setUserId(java.lang.Integer id)
public java.lang.Integer getGroupId()
public void setGroupId(java.lang.Integer id)
public java.lang.String getUserName()
public void setUserName(java.lang.String id)
public java.lang.String getGroupName()
public void setGroupName(java.lang.String id)
public java.util.Collection<Role> getRoles()
public Membership addRoles(java.util.Collection<Role> roles)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public PropertyStorage getStorage()
public Membership create() throws RedmineException
RedmineException
public void update() throws RedmineException
RedmineException
public void delete() throws RedmineException
RedmineException
public void setTransport(Transport transport)
setTransport
in interface FluentStyle