logo       

roller/src/org/roller/pojos FolderData.java,1.8,1.9 UserData.java,1.9,1.10 : msg#00177

Subject: roller/src/org/roller/pojos FolderData.java,1.8,1.9 UserData.java,1.9,1.10 BookmarkData.java,1.6,1.7
Update of /cvsroot/roller/roller/src/org/roller/pojos
In directory sc8-pr-cvs1:/tmp/cvs-serv7610/src/org/roller/pojos

Modified Files:
        FolderData.java UserData.java BookmarkData.java 
Log Message:
Further refactoring of biz and persistence layers:
- moved all base managers over to Query API. 
- made begin, commit, and rollback behavior consistent.
- removed Hibernate and Castor specific methods.
- moved persistence package up to org.roller level.

Index: FolderData.java
===================================================================
RCS file: /cvsroot/roller/roller/src/org/roller/pojos/FolderData.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** FolderData.java     24 Nov 2003 03:16:07 -0000      1.8
--- FolderData.java     29 Nov 2003 19:11:21 -0000      1.9
***************
*** 53,56 ****
--- 53,69 ----
      }
      
+     public FolderData(
+         FolderData parent,
+         String name, 
+         String desc, 
+         WebsiteData website)
+     {
+         this.parent = parent;
+         this.name = name;
+         this.description = desc;
+         this.website = website;
+         this.parent = parent;
+     }
+ 
      public void setData(org.roller.pojos.PersistentObject otherData)
      {

Index: UserData.java
===================================================================
RCS file: /cvsroot/roller/roller/src/org/roller/pojos/UserData.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** UserData.java       26 Nov 2003 03:34:13 -0000      1.9
--- UserData.java       29 Nov 2003 19:11:21 -0000      1.10
***************
*** 2,5 ****
--- 2,7 ----
  package org.roller.pojos;
  
+ import java.util.Date;
+ 
  
  /**
***************
*** 236,239 ****
--- 238,242 ----
              lEquals = lEquals && this.emailAddress.equals( lTest.emailAddress 
);
           }
+          
                if( this.dateCreated == null )
                {
***************
*** 242,250 ****
                else
                {
!                  lEquals = lEquals && this.dateCreated.equals( 
lTest.dateCreated );
                }
                if( this.userEnabled == null )
                {
!                  lEquals = lEquals && ( lTest.userEnabled == null );
                }
                else
--- 245,254 ----
                else
                {
!                  lEquals = lEquals && datesEquivalent(this.dateCreated, 
lTest.dateCreated);
                }
+         
                if( this.userEnabled == null )
                {
!             lEquals = lEquals && ( lTest.userEnabled == null );
                }
                else
***************
*** 260,263 ****
--- 264,279 ----
        }
     }
+    
+     private boolean datesEquivalent(Date d1, Date d2)
+     {
+         boolean equiv = true;
+         equiv = equiv && d1.getHours() == d1.getHours();
+         equiv = equiv && d1.getMinutes() == d1.getMinutes();
+         equiv = equiv && d1.getSeconds() == d1.getSeconds();
+         equiv = equiv && d1.getMonth() == d1.getMonth();
+         equiv = equiv && d1.getDay() == d1.getDay();
+         equiv = equiv && d1.getYear() == d1.getYear();
+         return equiv;
+     }
  
     public int hashCode()

Index: BookmarkData.java
===================================================================
RCS file: /cvsroot/roller/roller/src/org/roller/pojos/BookmarkData.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** BookmarkData.java   24 Nov 2003 03:16:07 -0000      1.6
--- BookmarkData.java   29 Nov 2003 19:11:21 -0000      1.7
***************
*** 45,48 ****
--- 45,68 ----
      {
      }
+     
+     public BookmarkData(
+         FolderData parent,
+         String name, 
+         String desc, 
+         String url, 
+         String feedUrl,
+         Integer weight, 
+         Integer priority, 
+         String image)
+     {
+         this.folder = parent;
+         this.name = name;
+         this.description = desc;
+         this.url = url;
+         this.feedUrl = feedUrl;
+         this.weight = weight;
+         this.priority = priority;
+         this.image = image;   
+     }
  
      /** For use by BookmarkManager implementations only. */




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
web.pylons.gene...    hurd.l4/2002-10...    kernel.commits....    user-groups.lin...    yellowdog.gener...    java.drools.use...    security.openva...    package-managem...    linux.debian.us...    qnx.openqnx.dev...    genealogy.gramp...    file-systems.if...    voip.wengophone...    tex.context/200...    ietf.smime/2003...    audio.csound.de...    culture.region....    xfree86.devel/2...    mobile.kannel.u...    distributed.con...    education.engli...    org.user-groups...    bug-tracking.gn...    recreation.bicy...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe