// Path: spring-jdbc/src/main/java/io/crate/spring/jdbc/samples/dao/ImagesDao.java
// public interface ImagesDao {
// 
//     boolean imageExists(String digest);
// 
//     List<Image> getImages();
// 
//     InputStream getImageAsInputStream(String digest);
// 
//     boolean deleteImage(String digest);
// 
//     Map<String, String> insertImage(String digest, byte[] decoded);
// }
// 
// Path: spring-jdbc/src/main/java/io/crate/spring/jdbc/samples/model/Image.java
// public class Image {
// 
//     private final String digest;
// 
//     @JsonProperty("last_modified")
//     private final Date lastModified;
// 
//     public Image(String digest, Date last_modified) {
//         this.digest = digest;
//         this.lastModified = last_modified;
//     }
// 
//     public String getDigest() {
//         return digest;
//     }
// 
//     public Date getLastModified() {
//         return lastModified;
//     }
// 
//     @Override
//     public boolean equals(Object o) {
//         if (this == o) return true;
//         if (o == null || getClass() != o.getClass()) return false;
//         Image image = (Image) o;
//         return Objects.equals(digest, image.digest) &&
//                 Objects.equals(lastModified, image.lastModified);
//     }
// 
//     @Override
//     public int hashCode() {
//         return Objects.hash(digest, lastModified);
//     }
// }


import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Base64;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.tomcat.util.http.fileupload.IOUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import io.crate.spring.jdbc.samples.dao.ImagesDao;
import io.crate.spring.jdbc.samples.model.Image;
package io.crate.spring.jdbc.samples;





@RestController
public class ImagesController {

    private static final Log logger = LogFactory.getLog(ImagesController.class);

    @Autowired
// Path: spring-jdbc/src/main/java/io/crate/spring/jdbc/samples/dao/ImagesDao.java
// public interface ImagesDao {
// 
//     boolean imageExists(String digest);
// 
//     List<Image> getImages();
// 
//     InputStream getImageAsInputStream(String digest);
// 
//     boolean deleteImage(String digest);
// 
//     Map<String, String> insertImage(String digest, byte[] decoded);
// }
// 
// Path: spring-jdbc/src/main/java/io/crate/spring/jdbc/samples/model/Image.java
// public class Image {
// 
//     private final String digest;
// 
//     @JsonProperty("last_modified")
//     private final Date lastModified;
// 
//     public Image(String digest, Date last_modified) {
//         this.digest = digest;
//         this.lastModified = last_modified;
//     }
// 
//     public String getDigest() {
//         return digest;
//     }
// 
//     public Date getLastModified() {
//         return lastModified;
//     }
// 
//     @Override
//     public boolean equals(Object o) {
//         if (this == o) return true;
//         if (o == null || getClass() != o.getClass()) return false;
//         Image image = (Image) o;
//         return Objects.equals(digest, image.digest) &&
//                 Objects.equals(lastModified, image.lastModified);
//     }
// 
//     @Override
//     public int hashCode() {
//         return Objects.hash(digest, lastModified);
//     }
// }


// Path: spring-jdbc/src/main/java/io/crate/spring/jdbc/samples/ImagesController.java
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Base64;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.tomcat.util.http.fileupload.IOUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import io.crate.spring.jdbc.samples.dao.ImagesDao;
import io.crate.spring.jdbc.samples.model.Image;

package io.crate.spring.jdbc.samples;





@RestController
public class ImagesController {

    private static final Log logger = LogFactory.getLog(ImagesController.class);

    @Autowired
    private ImagesDao dao;