Skip to content
Snippets Groups Projects
Commit 77b5714b authored by Eirik Steira's avatar Eirik Steira
Browse files

Merge branch 'Fix/imageRepo-update' into 'dev'

Fix/image repo update

See merge request !32
parents b323c9d3 954a76c3
No related branches found
No related tags found
2 merge requests!104Weekly merge to Master,!32Fix/image repo update
Pipeline #76112 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