Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Changed Photo inheritance. Fixes #231.

  • Loading branch information...
commit 2078eedf120330bea5f20517e4743a9e4f1356c7 1 parent 1e7f9eb
@jtessler jtessler authored
Showing with 6 additions and 3 deletions.
  1. +6 −3 app/models/Photo.java
View
9 app/models/Photo.java
@@ -13,13 +13,15 @@
import net.coobird.thumbnailator.name.*;
@Entity
-public class Photo extends Post {
+public class Photo extends Commentable {
public static final int MAX_PIXEL_SIZE = 1024;
@Required
public Blob image;
+ public String caption;
+
@Required
public Blob thumbnail120x120,
thumbnail50x50,
@@ -27,13 +29,14 @@
public Photo(User owner, File image) throws IOException,
FileNotFoundException {
- this(owner, image, "");
+ this(owner, image, null);
}
public Photo(User owner, File image, String caption)
throws IOException,
FileNotFoundException {
- super(owner, owner, caption);
+ super(owner);
+ this.caption = caption;
shrinkImage(image);
this.image = fileToBlob(image);
this.createThumbnails();
Please sign in to comment.
Something went wrong with that request. Please try again.