Author: alevkovsky
Date: 2009-03-04 06:20:55 -0500 (Wed, 04 Mar 2009)
New Revision: 12819
Modified:
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Album.java
trunk/test-applications/realworld2/ejb/src/main/resources/import.sql
Log:
Realworld: add user album markup, add slideshow for album and image preview
Modified:
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Album.java
===================================================================
---
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Album.java 2009-03-04
10:02:55 UTC (rev 12818)
+++
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Album.java 2009-03-04
11:20:55 UTC (rev 12819)
@@ -23,6 +23,7 @@
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collections;
+import java.util.Date;
import java.util.List;
import javax.persistence.CascadeType;
@@ -39,6 +40,8 @@
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
import javax.persistence.Transient;
import org.hibernate.validator.Length;
@@ -109,6 +112,9 @@
@JoinColumn(name = "PARENT_SHELF_ID", nullable = true)
@org.hibernate.annotations.ForeignKey(name = "FK_SHELF_PARENT_ID")
private Shelf parent;
+
+ @Temporal(TemporalType.TIMESTAMP)
+ private Date created;
// ********************** Accessor Methods ********************** //
@@ -288,4 +294,20 @@
public boolean isEmpty() {
return images == null || images.size() == 0;
}
+
+ /**
+ * @return the created
+ */
+ public Date getCreated() {
+ return created;
+ }
+
+ /**
+ * @param created the created to set
+ */
+ public void setCreated(Date created) {
+ this.created = created;
+ }
+
+
}
Modified: trunk/test-applications/realworld2/ejb/src/main/resources/import.sql
===================================================================
--- trunk/test-applications/realworld2/ejb/src/main/resources/import.sql 2009-03-04
10:02:55 UTC (rev 12818)
+++ trunk/test-applications/realworld2/ejb/src/main/resources/import.sql 2009-03-04
11:20:55 UTC (rev 12819)
@@ -6,16 +6,16 @@
INSERT INTO shelfs(shelf_id, name, description, shelf_user_id) VALUES (2,
'Sport', 'Nature pictures', 1);
INSERT INTO shelfs(shelf_id, name, description, shelf_user_id) VALUES (3,
'Water', 'Nature pictures', 2);
INSERT INTO shelfs(shelf_id, name, description, shelf_user_id) VALUES (4,
'Flowers', 'Nature pictures', 3);
-INSERT INTO albums(album_id, name, description, shared, album_user_id, parent_shelf_id)
VALUES (15, 'Water', 'Rivers pictures', true, 2, 3);
+INSERT INTO albums(album_id, name, description, shared, album_user_id, parent_shelf_id,
created) VALUES (15, 'Water', 'Rivers pictures', true, 2, 3,
'2008-12-18');
-INSERT INTO albums(album_id, name, description, shared, album_user_id, parent_shelf_id)
VALUES (20, 'Sport', 'Nature pictures', true, 1, 1);
+INSERT INTO albums(album_id, name, description, shared, album_user_id, parent_shelf_id,
created) VALUES (20, 'Sport', 'Nature pictures', true, 1, 1,
'2008-12-18');
-INSERT INTO albums(album_id, name, description, shared, album_user_id, parent_shelf_id)
VALUES (26, 'Travel', 'Fun pictures', true, 1, 2);
-INSERT INTO albums(album_id, name, description, shared, album_user_id, parent_shelf_id)
VALUES (25, 'Beach', 'Fun pictures', true, 1, 1);
-INSERT INTO albums(album_id, name, description, shared, album_user_id, parent_shelf_id)
VALUES (23, 'Flowers', 'Fun pictures', true, 3, 4);
-INSERT INTO albums(album_id, name, description, shared, album_user_id, parent_shelf_id)
VALUES (27, 'Very very very very very very very long album name ', 'Long name
test', true, 1, 2);
+INSERT INTO albums(album_id, name, description, shared, album_user_id, parent_shelf_id,
created) VALUES (26, 'Travel', 'Fun pictures', true, 1, 2,
'2008-12-18');
+INSERT INTO albums(album_id, name, description, shared, album_user_id, parent_shelf_id,
created) VALUES (25, 'Beach', 'Fun pictures', true, 1, 1,
'2008-12-18');
+INSERT INTO albums(album_id, name, description, shared, album_user_id, parent_shelf_id,
created) VALUES (23, 'Flowers', 'Fun pictures', true, 3, 4,
'2008-12-18');
+INSERT INTO albums(album_id, name, description, shared, album_user_id, parent_shelf_id,
created) VALUES (27, 'Very very very very very very very long album name ',
'Long name test', true, 1, 2, '2008-12-18');
INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (98, 'korana',
'Viking/15/korana.jpg', 'korana', '2008-12-18', 15, 'Canon
S3', 1024, 1917.000000, 768, '2008-12-01');