[jboss-cvs] JBossAS SVN: r96509 - in projects/snowdrop/trunk/documentation/samples/sportsclub: database and 3 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Nov 18 15:18:22 EST 2009


Author: marius.bogoevici
Date: 2009-11-18 15:18:22 -0500 (Wed, 18 Nov 2009)
New Revision: 96509

Modified:
   projects/snowdrop/trunk/documentation/samples/sportsclub/database/db-setup.sql
   projects/snowdrop/trunk/documentation/samples/sportsclub/pom.xml
   projects/snowdrop/trunk/documentation/samples/sportsclub/sportsclub-domain/src/main/java/org/jboss/snowdrop/samples/sportsclub/domain/entity/Address.java
   projects/snowdrop/trunk/documentation/samples/sportsclub/sportsclub-hibernate-dao/pom.xml
   projects/snowdrop/trunk/documentation/samples/sportsclub/sportsclub-web/src/main/webapp/createForm.xhtml
Log:
minor


Modified: projects/snowdrop/trunk/documentation/samples/sportsclub/database/db-setup.sql
===================================================================
--- projects/snowdrop/trunk/documentation/samples/sportsclub/database/db-setup.sql	2009-11-18 19:19:48 UTC (rev 96508)
+++ projects/snowdrop/trunk/documentation/samples/sportsclub/database/db-setup.sql	2009-11-18 20:18:22 UTC (rev 96509)
@@ -1,5 +1,5 @@
-  alter table Account 
-       drop constraint FK1D0C220D7F5555FE;
+alter table Account
+        drop constraint FK1D0C220DBC471BC1;
 
     drop table Account if exists;
 
@@ -8,7 +8,7 @@
     drop table Person if exists;
 
     create table Account (
-        id integer generated by default as identity (start with 1),
+        id bigint generated by default as identity (start with 1),
         subscriber_id bigint,
         primary key (id)
     );
@@ -23,6 +23,8 @@
     create table Person (
         id bigint generated by default as identity (start with 1),
         city varchar(255),
+        country varchar(255),
+        postalCode varchar(255),
         provinceOrState varchar(255),
         streetAddress varchar(255),
         firstName varchar(255),
@@ -32,9 +34,10 @@
     );
 
     alter table Account
-        add constraint FK1D0C220D7F5555FE
+        add constraint FK1D0C220DBC471BC1
         foreign key (subscriber_id)
         references Person;
+  
 
 
 
@@ -44,6 +47,11 @@
 insert into PUBLIC.PERSON (PERSON.CITY, PERSON.PROVINCEORSTATE, PERSON.STREETADDRESS, PERSON.FIRSTNAME, PERSON.LASTNAME, PERSON.MIDDLENAME)
 values ('Toronto', 'Ontario', '1 Bloor', 'Havelock', 'Vettinari', '');
 
+insert into PUBLIC.PERSON (PERSON.CITY, PERSON.PROVINCEORSTATE, PERSON.STREETADDRESS, PERSON.FIRSTNAME, PERSON.LASTNAME, PERSON.MIDDLENAME)
+values ('Toronto', 'Ontario', '1 Yonge', 'Sybil', 'Vimes', '');
+
 insert into PUBLIC.ACCOUNT(ACCOUNT.SUBSCRIBER_ID) VALUES (1);
 
-insert into PUBLIC.ACCOUNT(ACCOUNT.SUBSCRIBER_ID) VALUES (2);
\ No newline at end of file
+insert into PUBLIC.ACCOUNT(ACCOUNT.SUBSCRIBER_ID) VALUES (2);
+
+insert into PUBLIC.ACCOUNT(ACCOUNT.SUBSCRIBER_ID) VALUES (3);
\ No newline at end of file

Modified: projects/snowdrop/trunk/documentation/samples/sportsclub/pom.xml
===================================================================
--- projects/snowdrop/trunk/documentation/samples/sportsclub/pom.xml	2009-11-18 19:19:48 UTC (rev 96508)
+++ projects/snowdrop/trunk/documentation/samples/sportsclub/pom.xml	2009-11-18 20:18:22 UTC (rev 96509)
@@ -107,37 +107,6 @@
                     <target>1.5</target>
                 </configuration>
             </plugin>
-
-
-            <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>hibernate3-maven-plugin</artifactId>
-                <version>2.2</version>
-                <configuration>
-                    <components>
-                        <component>
-                            <name>hbm2ddl</name>
-                            <implementation>annotationconfiguration</implementation>
-                        </component>
-                    </components>
-                    <componentProperties>
-                        <configurationfile>/src/main/resources/hibernate/hibernate.cfg.xml</configurationfile>
-                        <outputfilename>schema.ddl</outputfilename>
-                        <drop>true</drop>
-                        <create>true</create>
-                        <export>false</export>
-                        <format>true</format>
-                    </componentProperties>
-                </configuration>
-                <dependencies>
-                    <dependency>
-                        <groupId>hsqldb</groupId>
-                        <artifactId>hsqldb</artifactId>
-                        <version>1.8.0.10</version>
-                    </dependency>
-                </dependencies>
-            </plugin>
-
         </plugins>
     </build>
 

Modified: projects/snowdrop/trunk/documentation/samples/sportsclub/sportsclub-domain/src/main/java/org/jboss/snowdrop/samples/sportsclub/domain/entity/Address.java
===================================================================
--- projects/snowdrop/trunk/documentation/samples/sportsclub/sportsclub-domain/src/main/java/org/jboss/snowdrop/samples/sportsclub/domain/entity/Address.java	2009-11-18 19:19:48 UTC (rev 96508)
+++ projects/snowdrop/trunk/documentation/samples/sportsclub/sportsclub-domain/src/main/java/org/jboss/snowdrop/samples/sportsclub/domain/entity/Address.java	2009-11-18 20:18:22 UTC (rev 96509)
@@ -15,11 +15,16 @@
 
    private String provinceOrState;
 
+   private String country;
+
+   private String postalCode;
+
    public String getCity()
    {
       return city;
    }
 
+
    public void setCity(String city)
    {
       this.city = city;
@@ -44,4 +49,24 @@
    {
       this.streetAddress = streetAddress;
    }
+
+    public String getCountry()
+    {
+        return country;
+    }
+
+    public void setCountry(String country)
+    {
+        this.country = country;
+    }
+
+    public String getPostalCode()
+    {
+        return postalCode;
+    }
+
+    public void setPostalCode(String postalCode)
+    {
+        this.postalCode = postalCode;
+    }
 }

Modified: projects/snowdrop/trunk/documentation/samples/sportsclub/sportsclub-hibernate-dao/pom.xml
===================================================================
--- projects/snowdrop/trunk/documentation/samples/sportsclub/sportsclub-hibernate-dao/pom.xml	2009-11-18 19:19:48 UTC (rev 96508)
+++ projects/snowdrop/trunk/documentation/samples/sportsclub/sportsclub-hibernate-dao/pom.xml	2009-11-18 20:18:22 UTC (rev 96509)
@@ -2,33 +2,66 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>sportsclub-parent</artifactId>
-        <groupId>org.jboss.snowdrop.samples.sportsclub</groupId>
-        <version>1.0-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
+  <parent>
+    <artifactId>sportsclub-parent</artifactId>
     <groupId>org.jboss.snowdrop.samples.sportsclub</groupId>
-    <artifactId>sportsclub-hibernate-dao</artifactId>
     <version>1.0-SNAPSHOT</version>
-    <name>Sports Club Sample Hibernate DAO</name>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
 
-    <dependencies>
-        <dependency>
-            <groupId>org.hibernate</groupId>
-            <artifactId>hibernate-core</artifactId>
-        </dependency>
+  <groupId>org.jboss.snowdrop.samples.sportsclub</groupId>
+  <artifactId>sportsclub-hibernate-dao</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <name>Sports Club Sample Hibernate DAO</name>
 
-        <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring</artifactId>
-        </dependency>
+  <dependencies>
+    <dependency>
+      <groupId>org.hibernate</groupId>
+      <artifactId>hibernate-core</artifactId>
+    </dependency>
 
-        <dependency>
-            <groupId>org.jboss.snowdrop.samples.sportsclub</groupId>
-            <artifactId>sportsclub-domain</artifactId>
-        </dependency>
-    </dependencies>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring</artifactId>
+    </dependency>
 
+    <dependency>
+      <groupId>org.jboss.snowdrop.samples.sportsclub</groupId>
+      <artifactId>sportsclub-domain</artifactId>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>hibernate3-maven-plugin</artifactId>
+        <version>2.2</version>
+        <configuration>
+          <components>
+            <component>
+              <name>hbm2ddl</name>
+              <implementation>annotationconfiguration</implementation>
+            </component>
+          </components>
+          <componentProperties>
+            <configurationfile>/src/main/resources/hibernate/hibernate.cfg.xml</configurationfile>
+            <outputfilename>db-create.sql</outputfilename>
+            <drop>true</drop>
+            <create>true</create>
+            <export>false</export>
+            <format>true</format>
+          </componentProperties>
+        </configuration>
+        <dependencies>
+          <dependency>
+            <groupId>hsqldb</groupId>
+            <artifactId>hsqldb</artifactId>
+            <version>1.8.0.10</version>
+          </dependency>
+        </dependencies>
+      </plugin>
+    </plugins>
+  </build>
+
 </project>
\ No newline at end of file

Modified: projects/snowdrop/trunk/documentation/samples/sportsclub/sportsclub-web/src/main/webapp/createForm.xhtml
===================================================================
--- projects/snowdrop/trunk/documentation/samples/sportsclub/sportsclub-web/src/main/webapp/createForm.xhtml	2009-11-18 19:19:48 UTC (rev 96508)
+++ projects/snowdrop/trunk/documentation/samples/sportsclub/sportsclub-web/src/main/webapp/createForm.xhtml	2009-11-18 20:18:22 UTC (rev 96509)
@@ -7,11 +7,11 @@
 	template="layout/template.xhtml">
 	<ui:define name="content">
         <h:form>
-        <h:inputText value="#{accountCreate.firstName}" label="First name"/><p/>
-        <h:inputText value="#{accountCreate.lastName}" label="Last name"/><p/>
-        <h:inputText value="#{accountCreate.address}" label="Address"/><p/>
-        <h:inputText value="#{accountCreate.city}" label="City"/><p/>
-        <h:inputText value="#{accountCreate.provinceOrState}" label="ProvinceOrState"/><p/>
+        First name: <h:inputText value="#{accountCreate.firstName}" label="First name"/>
+        Last name: <h:inputText value="#{accountCreate.lastName}" label="Last name"/><p/>
+        Address: <h:inputText value="#{accountCreate.address}" label="Address"/><p/>
+        City: <h:inputText value="#{accountCreate.city}" label="City"/><p/>
+        Province: <h:inputText value="#{accountCreate.provinceOrState}" label="ProvinceOrState"/><p/>
         <h:commandButton value="Save" action="#{accountCreate.create}" />
         </h:form>
 	</ui:define>




More information about the jboss-cvs-commits mailing list