Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
Ryhmä25 SuperBugTracker
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MarkmanAndTheBoys
Ryhmä25 SuperBugTracker
Commits
389dde2c
Commit
389dde2c
authored
3 years ago
by
markman
Browse files
Options
Downloads
Patches
Plain Diff
Javadoc to Model(Role, Status, TeamProjectInfo)
parent
48223dff
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/main/java/Model/Role.java
+28
-0
28 additions, 0 deletions
src/main/java/Model/Role.java
src/main/java/Model/Status.java
+4
-0
4 additions, 0 deletions
src/main/java/Model/Status.java
src/main/java/Model/TeamProjectInfo.java
+65
-0
65 additions, 0 deletions
src/main/java/Model/TeamProjectInfo.java
with
97 additions
and
0 deletions
src/main/java/Model/Role.java
+
28
−
0
View file @
389dde2c
package
Model
;
/**
* Class is used to define the role of the user
*/
public
class
Role
{
private
int
id
;
private
String
name
;
/**
* Class constructor (empty), used to call role without parameters needed
*/
public
Role
(){}
/**
* Class constructor
* @param _id User identification number
* @param _name The name of the user to be assigned the role
*/
public
Role
(
int
_id
,
String
_name
)
{
this
.
id
=
_id
;
this
.
name
=
_name
;
}
/**
* Returns role id
* @return Value of role id
*/
public
int
getId
()
{
return
id
;
}
/**
* For setting role id
* @param id Role id
*/
public
void
setId
(
int
id
)
{
this
.
id
=
id
;
}
/**
* Returns name of the user role
* @return role name
*/
public
String
getName
()
{
return
name
;
}
/**
* Using to set name to the user role
* @param name Role name
*/
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
...
...
This diff is collapsed.
Click to expand it.
src/main/java/Model/Status.java
+
4
−
0
View file @
389dde2c
package
Model
;
/**
* Enum class for determine the object status throw database. DEFAULT means the object existing
* REMOVED means the object is removed and is not available anymore
*/
public
enum
Status
{
DEFAULT
,
REMOVED
}
This diff is collapsed.
Click to expand it.
src/main/java/Model/TeamProjectInfo.java
+
65
−
0
View file @
389dde2c
...
...
@@ -2,6 +2,9 @@ package Model;
import
java.util.List
;
/**
* Class is intended to hold info about team project as project name and summary about project bugs
*/
public
class
TeamProjectInfo
{
private
Project
project
;
private
List
<
Bug
>
bugs
;
...
...
@@ -10,6 +13,11 @@ public class TeamProjectInfo {
private
int
solvedBugs
;
private
int
totalBugs
;
/**
* Constructor to build info about project bugs
* @param _project Project object about info will be built
* @param _bugs List of Bug objects to count
*/
public
TeamProjectInfo
(
Project
_project
,
List
<
Bug
>
_bugs
)
{
this
.
project
=
_project
;
this
.
bugs
=
_bugs
;
...
...
@@ -19,54 +27,106 @@ public class TeamProjectInfo {
this
.
totalBugs
=
_bugs
.
size
();
}
/**
* Returned Project object to to count info about
* @return Project object, used to get bug info
*/
public
Project
getProject
()
{
return
project
;
}
/**
* Used to set Project object to get info from
* @param project Project object
*/
public
void
setProject
(
Project
project
)
{
this
.
project
=
project
;
}
/**
* Used to receive selected project bugs
* @return List of Bug objects
*/
public
List
<
Bug
>
getBugs
()
{
return
bugs
;
}
/**
* Used to set selected project bugs
* @param bugs List of Bug objects
*/
public
void
setBugs
(
List
<
Bug
>
bugs
)
{
this
.
bugs
=
bugs
;
}
/**
* Used to receive selected project name
* @return Project name of selected project
*/
public
String
getProjectName
()
{
return
projectName
;
}
/**
* Used to set project name
* @param projectName Project name
*/
public
void
setProjectName
(
String
projectName
)
{
this
.
projectName
=
projectName
;
}
/**
* Returning amount of unsolved bugs of project
* @return Number of project bugs, that are not solved
*/
public
int
getUnsolvedBugs
()
{
return
unsolvedBugs
;
}
/**
* Used to set amount of project unsolved bugs
* @param unsolvedBugs Amount of unsolved bugs
*/
public
void
setUnsolvedBugs
(
int
unsolvedBugs
)
{
this
.
unsolvedBugs
=
unsolvedBugs
;
}
/**
* Used to receive amount of project solved bugs
* @return Amount of solved bugs from selected project
*/
public
int
getSolvedBugs
()
{
return
solvedBugs
;
}
/**
* Used to set amount of project solved bugs
* @param solvedBugs Amount of solved bugs
*/
public
void
setSolvedBugs
(
int
solvedBugs
)
{
this
.
solvedBugs
=
solvedBugs
;
}
/**
* Used to receive selected project total bugs
* @return Amount of total bugs
*/
public
int
getTotalBugs
()
{
return
totalBugs
;
}
/**
* Used to set amount of total bugs of selected project
* @param totalBugs Amount of project total bugs
*/
public
void
setTotalBugs
(
int
totalBugs
)
{
this
.
totalBugs
=
totalBugs
;
}
/**
* Used to count selected project all unsolved bugs
* @return Amount of project unsolved bugs
*/
public
int
countUnsolvedBugs
()
{
int
count
=
0
;
for
(
Bug
b:
bugs
)
{
...
...
@@ -76,6 +136,11 @@ public class TeamProjectInfo {
}
return
count
;
}
/**
* Used to count all solved bugs from selected project
* @return Amount of project solved bugs
*/
public
int
countSolvedBugs
()
{
int
count
=
0
;
for
(
Bug
b:
bugs
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment