[seam-commits] Seam SVN: r10758 - in examples/trunk/booking: ejb-jar/src/main/resources and 2 other directories.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Sun May 3 02:31:11 EDT 2009
Author: dan.j.allen
Date: 2009-05-03 02:31:11 -0400 (Sun, 03 May 2009)
New Revision: 10758
Added:
examples/trunk/booking/war/src/main/webapp/img/1-star.gif
examples/trunk/booking/war/src/main/webapp/img/2-star.gif
examples/trunk/booking/war/src/main/webapp/img/3-star.gif
examples/trunk/booking/war/src/main/webapp/img/4-star.gif
examples/trunk/booking/war/src/main/webapp/img/5-star.gif
Modified:
examples/trunk/booking/ejb-jar/src/main/java/org/jboss/seam/examples/booking/model/Hotel.java
examples/trunk/booking/ejb-jar/src/main/java/org/jboss/seam/examples/booking/model/User.java
examples/trunk/booking/ejb-jar/src/main/resources/import.sql
examples/trunk/booking/war/src/main/webapp/WEB-INF/fragments/hotel.xhtml
Log:
add star class to hotel
Modified: examples/trunk/booking/ejb-jar/src/main/java/org/jboss/seam/examples/booking/model/Hotel.java
===================================================================
--- examples/trunk/booking/ejb-jar/src/main/java/org/jboss/seam/examples/booking/model/Hotel.java 2009-05-03 06:30:46 UTC (rev 10757)
+++ examples/trunk/booking/ejb-jar/src/main/java/org/jboss/seam/examples/booking/model/Hotel.java 2009-05-03 06:31:11 UTC (rev 10758)
@@ -31,7 +31,10 @@
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
+import javax.persistence.Table;
import javax.persistence.Transient;
+import javax.validation.constraints.Max;
+import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
@@ -43,6 +46,7 @@
*/
public
@Entity
+ at Table(name = "hotel")
class Hotel implements Serializable
{
private Long id;
@@ -52,6 +56,7 @@
private String state;
private String zip;
private String country;
+ private Integer stars;
private BigDecimal price;
@Id
@@ -138,6 +143,18 @@
this.country = country;
}
+ @Min(1)
+ @Max(5)
+ public Integer getStars()
+ {
+ return stars;
+ }
+
+ public void setStars(Integer stars)
+ {
+ this.stars = stars;
+ }
+
@Column(precision = 6, scale = 2)
public BigDecimal getPrice()
{
Modified: examples/trunk/booking/ejb-jar/src/main/java/org/jboss/seam/examples/booking/model/User.java
===================================================================
--- examples/trunk/booking/ejb-jar/src/main/java/org/jboss/seam/examples/booking/model/User.java 2009-05-03 06:30:46 UTC (rev 10757)
+++ examples/trunk/booking/ejb-jar/src/main/java/org/jboss/seam/examples/booking/model/User.java 2009-05-03 06:31:11 UTC (rev 10758)
@@ -42,7 +42,7 @@
*/
public
@Entity
- at Table(name = "Customer")
+ at Table(name = "customer")
class User implements Serializable
{
private String username;
Modified: examples/trunk/booking/ejb-jar/src/main/resources/import.sql
===================================================================
--- examples/trunk/booking/ejb-jar/src/main/resources/import.sql 2009-05-03 06:30:46 UTC (rev 10757)
+++ examples/trunk/booking/ejb-jar/src/main/resources/import.sql 2009-05-03 06:31:11 UTC (rev 10758)
@@ -1,24 +1,28 @@
-insert into Customer (username, password, name) values ('gavin', 'mexico', 'Gavin King')
-insert into Customer (username, password, name) values ('pete', 'edinburgh', 'Pete Muir')
-insert into Customer (username, password, name) values ('shane', 'brisbane', 'Shane Bryzak')
-insert into Customer (username, password, name) values ('dan', 'laurel', 'Dan Allen')
-insert into Hotel (id, price, name, address, city, state, zip, country) values (1, 120, 'Marriott Courtyard', 'Tower Place, Buckhead', 'Atlanta', 'GA', '30305', 'USA')
-insert into Hotel (id, price, name, address, city, state, zip, country) values (2, 180, 'Doubletree', 'Tower Place, Buckhead', 'Atlanta', 'GA', '30305', 'USA')
-insert into Hotel (id, price, name, address, city, state, zip, country) values (3, 450, 'W Hotel', 'Union Square, Manhattan', 'NY', 'NY', '10011', 'USA')
-insert into Hotel (id, price, name, address, city, state, zip, country) values (4, 450, 'W Hotel', 'Lexington Ave, Manhattan', 'NY', 'NY', '10011', 'USA')
-insert into Hotel (id, price, name, address, city, state, zip, country) values (5, 250, 'Hotel Rouge', '1315 16th Street NW', 'Washington', 'DC', '20036', 'USA')
-insert into Hotel (id, price, name, address, city, state, zip, country) values (6, 300, '70 Park Avenue Hotel', '70 Park Avenue', 'NY', 'NY', '10011', 'USA')
-insert into Hotel (id, price, name, address, city, state, zip, country) values (8, 300, 'Conrad Miami', '1395 Brickell Ave', 'Miami', 'FL', '33131', 'USA')
-insert into Hotel (id, price, name, address, city, state, zip, country) values (9, 80, 'Sea Horse Inn', '2106 N Clairemont Ave', 'Eau Claire', 'WI', '54703', 'USA')
-insert into Hotel (id, price, name, address, city, state, zip, country) values (10, 90, 'Super 8 Eau Claire Campus Area', '1151 W Macarthur Ave', 'Eau Claire', 'WI', '54701', 'USA')
-insert into Hotel (id, price, name, address, city, state, zip, country) values (11, 160, 'Marriot Downtown', '55 Fourth Street', 'San Francisco', 'CA', '94103', 'USA')
-insert into Hotel (id, price, name, address, city, state, zip, country) values (12, 200, 'Hilton Diagonal Mar', 'Passeig del Taulat 262-264', 'Barcelona', 'Catalunya', '08019', 'Spain')
-insert into Hotel (id, price, name, address, city, state, zip, country) values (13, 210, 'Hilton Tel Aviv', 'Independence Park', 'Tel Aviv', '', '63405', 'Israel')
-insert into Hotel (id, price, name, address, city, state, zip, country) values (14, 240, 'InterContinental Tokyo Bay', 'Takeshiba Pier', 'Tokyo', '', '105', 'Japan')
-insert into Hotel (id, price, name, address, city, state, zip, country) values (15, 130, 'Hotel Beaulac', ' Esplanade Léopold-Robert 2', 'Neuchatel', '', '2000', 'Switzerland')
-insert into Hotel (id, price, name, address, city, state, zip, country) values (16, 140, 'Conrad Treasury Place', 'William & George Streets', 'Brisbane', 'QLD', '4001', 'Australia')
-insert into Hotel (id, price, name, address, city, state, zip, country) values (17, 230, 'Ritz Carlton', '1228 Sherbrooke St', 'West Montreal', 'Quebec', 'H3G1H6', 'Canada')
-insert into Hotel (id, price, name, address, city, state, zip, country) values (18, 460, 'Ritz Carlton', 'Peachtree Rd, Buckhead', 'Atlanta', 'GA', '30326', 'USA')
-insert into Hotel (id, price, name, address, city, state, zip, country) values (19, 220, 'Swissotel', '68 Market Street', 'Sydney', 'NSW', '2000', 'Australia')
-insert into Hotel (id, price, name, address, city, state, zip, country) values (20, 250, 'Meliá White House', 'Albany Street', 'Regents Park London', '', 'NW13UP', 'Great Britain')
-insert into Hotel (id, price, name, address, city, state, zip, country) values (21, 210, 'Hotel Allegro', '171 West Randolph Street', 'Chicago', 'IL', '60601', 'USA')
+insert into customer (username, password, name) values ('gavin', 'mexico', 'Gavin King')
+insert into customer (username, password, name) values ('pete', 'edinburgh', 'Pete Muir')
+insert into customer (username, password, name) values ('shane', 'brisbane', 'Shane Bryzak')
+insert into customer (username, password, name) values ('dan', 'laurel', 'Dan Allen')
+insert into hotel (id, price, stars, name, address, city, state, zip, country) values (1, 129, 3, 'Marriott Courtyard', 'Tower Place, Buckhead', 'Atlanta', 'GA', '30305', 'USA')
+insert into hotel (id, price, stars, name, address, city, state, zip, country) values (2, 84, 4, 'Doubletree Atlanta-Buckhead', '3342 Peachtree Road NE', 'Atlanta', 'GA', '30326', 'USA')
+insert into hotel (id, price, stars, name, address, city, state, zip, country) values (3, 289, 4, 'W New York - Union Square', '201 Park Avenue South', 'New York', 'NY', '10003', 'USA')
+insert into hotel (id, price, stars, name, address, city, state, zip, country) values (4, 219, 3, 'W New York', '541 Lexington Avenue', 'New York', 'NY', '10022', 'USA')
+insert into hotel (id, price, stars, name, address, city, state, zip, country) values (5, 250, 3, 'Hotel Rouge', '1315 16th Street NW', 'Washington', 'DC', '20036', 'USA')
+insert into hotel (id, price, stars, name, address, city, state, zip, country) values (6, 159, 4, '70 Park Avenue Hotel', '70 Park Avenue, 38th St', 'New York', 'NY', '10016', 'USA')
+insert into hotel (id, price, stars, name, address, city, state, zip, country) values (7, 198, 4, 'Parc 55', '55 Cyril Magnin Street', 'San Francisco', 'CA', '94102', 'USA')
+insert into hotel (id, price, stars, name, address, city, state, zip, country) values (8, 189, 4, 'Conrad Miami', '1395 Brickell Ave', 'Miami', 'FL', '33131', 'USA')
+insert into hotel (id, price, stars, name, address, city, state, zip, country) values (9, 111, 4, 'Grand Hyatt', '345 Stockton Street', 'San Francisco', 'CA', '94108', 'USA')
+insert into hotel (id, price, stars, name, address, city, state, zip, country) values (10, 54, 1, 'Super 8 Eau Claire Campus Area', '1151 W MacArthur Ave', 'Eau Claire', 'WI', '54701', 'USA')
+insert into hotel (id, price, stars, name, address, city, state, zip, country) values (11, 199, 4, 'San Francisco Marriott', '55 Fourth Street', 'San Francisco', 'CA', '94103', 'USA')
+insert into hotel (id, price, stars, name, address, city, state, zip, country) values (12, 543, 4, 'Hilton Diagonal Mar', 'Passeig del Taulat 262-264', 'Barcelona', 'Catalunya', '08019', 'ES')
+insert into hotel (id, price, stars, name, address, city, state, zip, country) values (13, 335, 5, 'Hilton Tel Aviv', 'Independence Park', 'Tel Aviv', '', '63405', 'IL')
+insert into hotel (id, price, stars, name, address, city, state, zip, country) values (14, 242, 5, 'InterContinental Hotel Tokyo Bay', '1-15-2 Kaigan', 'Tokyo', 'Minato', '105', 'JP')
+insert into hotel (id, price, stars, name, address, city, state, zip, country) values (15, 130, 4, 'Hotel Beaulac', ' Esplanade Léopold-Robert 2', 'Neuchatel', '', '2000', 'CH')
+insert into hotel (id, price, stars, name, address, city, state, zip, country) values (16, 266, 5, 'Conrad Treasury Place', '130 William Street', 'Brisbane', 'QL', '4001', 'AU')
+insert into hotel (id, price, stars, name, address, city, state, zip, country) values (17, 170, 4, 'Ritz-Carlton Montreal', '1228 Sherbrooke St West', 'Montreal', 'Quebec', 'H3G1H6', 'CA')
+insert into hotel (id, price, stars, name, address, city, state, zip, country) values (18, 179, 4, 'Ritz-Carlton Atlanta', '181 Peachtree St NE', 'Atlanta', 'GA', '30303', 'USA')
+insert into hotel (id, price, stars, name, address, city, state, zip, country) values (19, 145, 4, 'Swissotel Sydney', '68 Market Street', 'Sydney', 'NSW', '2000', 'AU')
+insert into hotel (id, price, stars, name, address, city, state, zip, country) values (20, 178, 4, 'Meliá White House', 'Albany Street Regents Park', 'London', '', 'NW13UP', 'GB')
+insert into hotel (id, price, stars, name, address, city, state, zip, country) values (21, 159, 3, 'Hotel Allegro', '171 W Randolph Street', 'Chicago', 'IL', '60601', 'USA')
+insert into hotel (id, price, stars, name, address, city, state, zip, country) values (22, 296, 5, 'Caesar''s Palace', '3570 Las Vegas Blvd S', 'Las Vegas', 'NV', '89109', 'USA')
+insert into hotel (id, price, stars, name, address, city, state, zip, country) values (23, 300, 4, 'Mandalay Bay Resort & Casino', '3950 Las Vegas Blvd S', 'Las Vegas', 'NV', '89119', 'USA')
+insert into hotel (id, price, stars, name, address, city, state, zip, country) values (24, 100, 2, 'Hotel Cammerpoorte', 'Nationalestraat 38-40', 'Antwerp', '', '2000', 'BE')
Modified: examples/trunk/booking/war/src/main/webapp/WEB-INF/fragments/hotel.xhtml
===================================================================
--- examples/trunk/booking/war/src/main/webapp/WEB-INF/fragments/hotel.xhtml 2009-05-03 06:30:46 UTC (rev 10757)
+++ examples/trunk/booking/war/src/main/webapp/WEB-INF/fragments/hotel.xhtml 2009-05-03 06:31:11 UTC (rev 10758)
@@ -12,6 +12,9 @@
<p:display label="State" value="#{hotel.state}"/>
<p:display label="Zip" value="#{hotel.zip}"/>
<p:display label="Country" value="#{hotel.country}"/>
+ <p:display label="Class" override="true">
+ <h:graphicImage value="/img/#{hotel.stars}-star.gif" style="padding-top: 4px;"/>
+ </p:display>
<p:display label="Nightly rate" override="true">
<h:outputText value="#{hotel.price}">
<f:convertNumber type="currency" currencySymbol="$"/>
Added: examples/trunk/booking/war/src/main/webapp/img/1-star.gif
===================================================================
(Binary files differ)
Property changes on: examples/trunk/booking/war/src/main/webapp/img/1-star.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: examples/trunk/booking/war/src/main/webapp/img/2-star.gif
===================================================================
(Binary files differ)
Property changes on: examples/trunk/booking/war/src/main/webapp/img/2-star.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: examples/trunk/booking/war/src/main/webapp/img/3-star.gif
===================================================================
(Binary files differ)
Property changes on: examples/trunk/booking/war/src/main/webapp/img/3-star.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: examples/trunk/booking/war/src/main/webapp/img/4-star.gif
===================================================================
(Binary files differ)
Property changes on: examples/trunk/booking/war/src/main/webapp/img/4-star.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: examples/trunk/booking/war/src/main/webapp/img/5-star.gif
===================================================================
(Binary files differ)
Property changes on: examples/trunk/booking/war/src/main/webapp/img/5-star.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
More information about the seam-commits
mailing list