Skip to content
Snippets Groups Projects
Commit 954a76c3 authored by Lars Brodin Østby's avatar Lars Brodin Østby
Browse files

Fixed the image repo

parent 65907ba6
No related branches found
No related tags found
2 merge requests!104Weekly merge to Master,!32Fix/image repo update
Pipeline #76063 passed
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();
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment