geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hogst...@apache.org
Subject svn commit: r465326 - in /geronimo/daytrader/trunk: modules/derby/src/sql/ modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/direct/ modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb/ modules/ejb/src/main/resources/META-...
Date Wed, 18 Oct 2006 18:38:05 GMT
Author: hogstrom
Date: Wed Oct 18 11:38:04 2006
New Revision: 465326

URL: http://svn.apache.org/viewvc?view=rev&rev=465326
Log:
DAYTRADER-11 fix for reserved word of password in various databases

Modified:
    geronimo/daytrader/trunk/modules/derby/src/sql/daytrader.sql
    geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/direct/TradeDirect.java
    geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb/AccountBean.java
    geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb/AccountProfileBean.java
    geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb/LocalAccountProfile.java
    geronimo/daytrader/trunk/modules/ejb/src/main/resources/META-INF/ejb-jar.xml
    geronimo/daytrader/trunk/modules/ejb/src/main/resources/META-INF/jbosscmp-jdbc.xml
    geronimo/daytrader/trunk/plans/dayTrader-db2-plan.xml
    geronimo/daytrader/trunk/plans/dayTrader-plan.xml

Modified: geronimo/daytrader/trunk/modules/derby/src/sql/daytrader.sql
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/modules/derby/src/sql/daytrader.sql?view=diff&rev=465326&r1=465325&r2=465326
==============================================================================
--- geronimo/daytrader/trunk/modules/derby/src/sql/daytrader.sql (original)
+++ geronimo/daytrader/trunk/modules/derby/src/sql/daytrader.sql Wed Oct 18 11:38:04 2006
@@ -18,7 +18,7 @@
 
 create table accountprofileejb
   (address varchar(250),
-   password varchar(250),
+   passwd varchar(250),
    userid varchar(250) not null,
    email varchar(250),
    creditcard varchar(250),

Modified: geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/direct/TradeDirect.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/direct/TradeDirect.java?view=diff&rev=465326&r1=465325&r2=465326
==============================================================================
--- geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/direct/TradeDirect.java
(original)
+++ geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/direct/TradeDirect.java
Wed Oct 18 11:38:04 2006
@@ -1564,7 +1564,7 @@
 				throw new javax.ejb.FinderException("Cannot find account for" + userID);
 			}
 				
-			String pw = rs.getString("password");
+			String pw = rs.getString("passwd");
 			stmt.close();
 	    	if ( (pw==null) || (pw.equals(password) == false) )
 	    	{
@@ -1736,7 +1736,7 @@
 		else			
 			accountProfileData = new AccountProfileDataBean(
 				rs.getString("userID"),
-				rs.getString("password"),
+				rs.getString("passwd"),
 				rs.getString("fullName"),
 				rs.getString("address"),
 				rs.getString("email"),
@@ -2115,7 +2115,7 @@
 
 	private static final String createAccountProfileSQL =
 		"insert into accountprofileejb " +
-		"( userid, password, fullname, address, email, creditcard ) " +
+		"( userid, passwd, fullname, address, email, creditcard ) " +
 		"VALUES (  ?  ,  ?  ,  ?  ,  ?  ,  ?  ,  ?  )";
 
 	private static final String createHoldingSQL  = 
@@ -2136,7 +2136,7 @@
 	
 	private final static String updateAccountProfileSQL = 
 		"update accountprofileejb set " +
-		"password = ?, fullname = ?, address = ?, email = ?, creditcard = ? " +
+		"passwd = ?, fullname = ?, address = ?, email = ?, creditcard = ? " +
 		"where userid = (select profile_userid from accountejb a " +
 		"where a.profile_userid=?)";
 

Modified: geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb/AccountBean.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb/AccountBean.java?view=diff&rev=465326&r1=465325&r2=465326
==============================================================================
--- geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb/AccountBean.java
(original)
+++ geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb/AccountBean.java
Wed Oct 18 11:38:04 2006
@@ -67,11 +67,11 @@
     public void login(String password)
     {
     	LocalAccountProfile profile = getProfile();
-    	if ( (profile==null) || (profile.getPassword().equals(password) == false) )
+    	if ( (profile==null) || (profile.getPasswd().equals(password) == false) )
     	{
     		String error = "AccountBean:Login failure for account: " + getAccountID() + 
     					( (profile==null)? "null AccountProfile" :
-    						"\n\tIncorrect password-->" + profile.getUserID() + ":" + profile.getPassword()
);
+    						"\n\tIncorrect password-->" + profile.getUserID() + ":" + profile.getPasswd()
);
     		throw new EJBException(error);
     	}
     	

Modified: geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb/AccountProfileBean.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb/AccountProfileBean.java?view=diff&rev=465326&r1=465325&r2=465326
==============================================================================
--- geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb/AccountProfileBean.java
(original)
+++ geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb/AccountProfileBean.java
Wed Oct 18 11:38:04 2006
@@ -28,8 +28,8 @@
     /* Accessor methods for persistent fields */
 
	public abstract String		getUserID();				/* userID */
     public abstract void		setUserID(String userID);  
-    public abstract String		getPassword();				/* password */
-    public abstract void		setPassword(String password);
+    public abstract String		getPasswd();				/* password */
+    public abstract void		setPasswd(String password);
     public abstract String		getFullName();				/* fullName */
     public abstract void		setFullName(String fullName);  
     public abstract String		getAddress();				/* address */
@@ -59,7 +59,7 @@
     
 	public AccountProfileDataBean updateAccountProfile(AccountProfileDataBean profileData)
 	{
-		setPassword(profileData.getPassword());    
+		setPasswd(profileData.getPassword());    
 		setFullName(profileData.getFullName());      
 		setAddress(profileData.getAddress());  
 		setEmail(profileData.getEmail());          
@@ -71,7 +71,7 @@
 	public AccountProfileDataBean getDataBean()
 	{
 		return new AccountProfileDataBean(getUserID(),
-									getPassword(),
+									getPasswd(),
 									getFullName(),
 									getAddress(),
 									getEmail(),
@@ -91,7 +91,7 @@
     throws CreateException {
 		
         setUserID(userID);
-        setPassword(password);
+        setPasswd(password);
         setFullName(fullname);
         setAddress(address);
         setEmail(email);

Modified: geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb/LocalAccountProfile.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb/LocalAccountProfile.java?view=diff&rev=465326&r1=465325&r2=465326
==============================================================================
--- geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb/LocalAccountProfile.java
(original)
+++ geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb/LocalAccountProfile.java
Wed Oct 18 11:38:04 2006
@@ -30,8 +30,8 @@
 
 	public String	getUserID();				/* userID */
     //public void		setUserID(String userID);  
-    public String	getPassword();				/* password */
-    public void		setPassword(String password);
+    public String	getPasswd();				/* password */
+    public void		setPasswd(String password);
     public String	getFullName();				/* fullName */
     public void		setFullName(String fullName);  
     public String	getAddress();				/* address */

Modified: geronimo/daytrader/trunk/modules/ejb/src/main/resources/META-INF/ejb-jar.xml
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/modules/ejb/src/main/resources/META-INF/ejb-jar.xml?view=diff&rev=465326&r1=465325&r2=465326
==============================================================================
--- geronimo/daytrader/trunk/modules/ejb/src/main/resources/META-INF/ejb-jar.xml (original)
+++ geronimo/daytrader/trunk/modules/ejb/src/main/resources/META-INF/ejb-jar.xml Wed Oct 18
11:38:04 2006
@@ -231,7 +231,7 @@
                 <field-name>address</field-name>
             </cmp-field>
             <cmp-field>
-                <field-name>password</field-name>
+                <field-name>passwd</field-name>
             </cmp-field>
             <cmp-field>
                 <field-name>userID</field-name>

Modified: geronimo/daytrader/trunk/modules/ejb/src/main/resources/META-INF/jbosscmp-jdbc.xml
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/modules/ejb/src/main/resources/META-INF/jbosscmp-jdbc.xml?view=diff&rev=465326&r1=465325&r2=465326
==============================================================================
--- geronimo/daytrader/trunk/modules/ejb/src/main/resources/META-INF/jbosscmp-jdbc.xml (original)
+++ geronimo/daytrader/trunk/modules/ejb/src/main/resources/META-INF/jbosscmp-jdbc.xml Wed
Oct 18 11:38:04 2006
@@ -163,7 +163,7 @@
                <sql-type>VARCHAR(250)</sql-type>
             </cmp-field>
             <cmp-field>
-               <field-name>password</field-name>
+               <field-name>passwd</field-name>
                <jdbc-type>VARCHAR</jdbc-type>
                <sql-type>VARCHAR(250)</sql-type>
             </cmp-field>

Modified: geronimo/daytrader/trunk/plans/dayTrader-db2-plan.xml
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/plans/dayTrader-db2-plan.xml?view=diff&rev=465326&r1=465325&r2=465326
==============================================================================
--- geronimo/daytrader/trunk/plans/dayTrader-db2-plan.xml (original)
+++ geronimo/daytrader/trunk/plans/dayTrader-db2-plan.xml Wed Oct 18 11:38:04 2006
@@ -97,8 +97,8 @@
             <table-column>address</table-column>
           </cmp-field-mapping>
           <cmp-field-mapping>
-            <cmp-field-name>password</cmp-field-name>
-            <table-column>password</table-column>
+            <cmp-field-name>passwd</cmp-field-name>
+            <table-column>passwd</table-column>
           </cmp-field-mapping>
           <cmp-field-mapping>
             <cmp-field-name>userID</cmp-field-name>

Modified: geronimo/daytrader/trunk/plans/dayTrader-plan.xml
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/plans/dayTrader-plan.xml?view=diff&rev=465326&r1=465325&r2=465326
==============================================================================
--- geronimo/daytrader/trunk/plans/dayTrader-plan.xml (original)
+++ geronimo/daytrader/trunk/plans/dayTrader-plan.xml Wed Oct 18 11:38:04 2006
@@ -112,8 +112,8 @@
                         <table-column>address</table-column>
                     </cmp-field-mapping>
                     <cmp-field-mapping>
-                        <cmp-field-name>password</cmp-field-name>
-                        <table-column>password</table-column>
+                        <cmp-field-name>passwd</cmp-field-name>
+                        <table-column>passwd</table-column>
                     </cmp-field-mapping>
                     <cmp-field-mapping>
                         <cmp-field-name>userID</cmp-field-name>



Mime
View raw message