Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
idatt1002_2023_9
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
Andreas Kluge Svendsrud
idatt1002_2023_9
Commits
b2920e43
Commit
b2920e43
authored
6 years ago
by
nilstes
Browse files
Options
Downloads
Patches
Plain Diff
Dao->Repo
parent
de9270e3
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/myapp/repo/MyEntityRepo.java
+3
-3
3 additions, 3 deletions
src/myapp/repo/MyEntityRepo.java
src/myapp/repo/MyEntityRepoTest.java
+3
-3
3 additions, 3 deletions
src/myapp/repo/MyEntityRepoTest.java
src/myapp/view/MyWindow.java
+2
-2
2 additions, 2 deletions
src/myapp/view/MyWindow.java
with
8 additions
and
8 deletions
src/myapp/
da
o/MyEntity
Da
o.java
→
src/myapp/
rep
o/MyEntity
Rep
o.java
+
3
−
3
View file @
b2920e43
package
myapp.
da
o
;
package
myapp.
rep
o
;
import
myapp.data.MyEntity
;
...
...
@@ -6,11 +6,11 @@ import java.util.Arrays;
import
java.util.List
;
/**
*
DataAccessObject
for the MyEntity-entity
*
Repository
for the MyEntity-entity
*
* @author nilstes
*/
public
class
MyEntity
Da
o
{
public
class
MyEntity
Rep
o
{
/**
* Get object with given id
...
...
This diff is collapsed.
Click to expand it.
src/myapp/
da
o/MyEntity
Da
oTest.java
→
src/myapp/
rep
o/MyEntity
Rep
oTest.java
+
3
−
3
View file @
b2920e43
package
myapp.
da
o
;
package
myapp.
rep
o
;
import
myapp.data.MyEntity
;
import
org.junit.Test
;
import
static
org
.
junit
.
Assert
.*;
public
class
MyEntity
Da
oTest
{
public
class
MyEntity
Rep
oTest
{
@Test
public
void
testThatWeCanReadMyEntityFromDatabase
()
{
MyEntity
e
=
new
MyEntity
Da
o
().
getMyEntity
(
"id"
);
MyEntity
e
=
new
MyEntity
Rep
o
().
getMyEntity
(
"id"
);
assertEquals
(
e
.
getName
(),
"name"
);
}
...
...
This diff is collapsed.
Click to expand it.
src/myapp/view/MyWindow.java
+
2
−
2
View file @
b2920e43
package
myapp.view
;
import
myapp.
da
o.MyEntity
Da
o
;
import
myapp.
rep
o.MyEntity
Rep
o
;
import
myapp.data.MyEntity
;
import
java.awt.GridLayout
;
...
...
@@ -25,7 +25,7 @@ public class MyWindow extends JFrame {
setDefaultCloseOperation
(
WindowConstants
.
EXIT_ON_CLOSE
);
setLayout
(
new
GridLayout
(
1
,
1
,
1
,
1
));
MyEntity
Da
o
dao
=
new
MyEntity
Da
o
();
MyEntity
Rep
o
dao
=
new
MyEntity
Rep
o
();
MyEntity
object
=
dao
.
getMyEntity
(
"id"
);
add
(
new
JLabel
(
object
.
getName
()));
...
...
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