-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2913 from HejdaJakub/dev6530
New method for getting sponsored members and their sponsors
- Loading branch information
Showing
9 changed files
with
206 additions
and
11 deletions.
There are no files selected for viewing
56 changes: 56 additions & 0 deletions
56
perun-base/src/main/java/cz/metacentrum/perun/core/api/MemberWithSponsors.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
package cz.metacentrum.perun.core.api; | ||
|
||
import java.util.List; | ||
import java.util.Objects; | ||
|
||
/** | ||
* Sponsored member with list of his sponsors (for GUI) | ||
* | ||
* @author Jakub Hejda <[email protected]> | ||
*/ | ||
public class MemberWithSponsors { | ||
private RichMember member; | ||
private List<User> sponsors; | ||
|
||
/** | ||
* Constructor | ||
*/ | ||
public MemberWithSponsors() { | ||
} | ||
|
||
/** | ||
* Constructor | ||
*/ | ||
public MemberWithSponsors(RichMember member) { | ||
this.member = member; | ||
} | ||
|
||
public Member getMember() { | ||
return member; | ||
} | ||
|
||
public void setMember(RichMember member) { | ||
this.member = member; | ||
} | ||
|
||
public List<User> getSponsors() { | ||
return sponsors; | ||
} | ||
|
||
public void setSponsors(List<User> sponsors) { | ||
this.sponsors = sponsors; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) return true; | ||
if (o == null || getClass() != o.getClass()) return false; | ||
MemberWithSponsors that = (MemberWithSponsors) o; | ||
return Objects.equals(member, that.member); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(member); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters