Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package fr.bluebird.report;
- import java.util.ArrayList;
- public class Issue {
- private static ArrayList<Issue> allIsues = new ArrayList<Issue>();
- private final String user;
- private final String description;
- private final String reporter;
- private IssueStatus status = IssueStatus.valueOf(0);
- public Issue(String user, String description, String reporter) {
- this.user = user;
- this.description = description;
- this.reporter = reporter;
- allIsues.add(this);
- }
- public Issue(String user, String description, String reporter, int status) {
- this.user = user;
- this.description = description;
- this.reporter = reporter;
- this.status = IssueStatus.valueOf(status);
- allIsues.add(this);
- }
- public static ArrayList<Issue> getAllIsues() {
- return allIsues;
- }
- public static ArrayList<Issue> getAllIsuesBy(String user) {
- ArrayList<Issue> list = new ArrayList<Issue>();
- for(Issue issue : allIsues)
- if(issue.getReporter().equalsIgnoreCase(user))
- list.add(issue);
- return list;
- }
- public String getUser() {
- return user;
- }
- public String getDescription() {
- return description;
- }
- public String getReporter() {
- return reporter;
- }
- public IssueStatus getStatus() {
- return status;
- }
- public void save() {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement