Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Team 14 - IDATT1002
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
Container Registry
Model registry
Operate
Environments
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
Eirik Steira
Team 14 - IDATT1002
Commits
954a76c3
Commit
954a76c3
authored
5 years ago
by
Lars Brodin Østby
Browse files
Options
Downloads
Patches
Plain Diff
Fixed the image repo
parent
65907ba6
No related branches found
Branches containing commit
No related tags found
2 merge requests
!104
Weekly merge to Master
,
!32
Fix/image repo update
Pipeline
#76063
passed
5 years ago
Stage: build
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/NTNU/IDATT1002/repository/ImageRepository.java
+3
-25
3 additions, 25 deletions
src/main/java/NTNU/IDATT1002/repository/ImageRepository.java
with
3 additions
and
25 deletions
src/main/java/NTNU/IDATT1002/repository/ImageRepository.java
+
3
−
25
View file @
954a76c3
package
NTNU.IDATT1002.repository
;
import
NTNU.IDATT1002.models.Image
;
import
java.util.Optional
;
import
javax.persistence.EntityManager
;
import
java.util.List
;
import
javax.persistence.EntityManager
;
/**
...
...
@@ -18,8 +16,6 @@ import java.util.List;
public
class
ImageRepository
extends
GenericRepository
<
Image
,
Long
>
{
private
EntityManager
entityManager
;
/**
* Constructor to inject {@link EntityManager} dependency.
*
...
...
@@ -27,28 +23,10 @@ public class ImageRepository extends GenericRepository<Image, Long> {
*/
public
ImageRepository
(
EntityManager
entityManager
)
{
super
(
entityManager
);
setClassType
(
Image
.
class
);
}
}
/**
* Retrieves all instances of the type image.
*
* @return all entities
*/
public
Optional
<
Image
>
update
(
Image
image
)
{
return
Optional
.
empty
();
}
/**
* Return whether the given image exists.
*
* @param image image album to check existence for
* @return true if the image album exist, else false
*/
public
boolean
exists
(
Image
image
)
{
return
findById
(
image
.
getImageID
()).
isPresent
();
}
}
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