xlawrence    2005/01/07 14:24:36 CET

  Modified files:
    src/java/org/jahia/suite/calendar/framework/model GUID.java 
  Log:
  Made the GUID model simpler and more consistent
  
  Revision  Changes    Path
  1.3       +12 -25    
uwcal_JSR168/src/java/org/jahia/suite/calendar/framework/model/GUID.java
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/uwcal_JSR168/src/java/org/jahia/suite/calendar/framework/model/GUID.java.diff?r1=1.2&r2=1.3&f=h
  
  
  
  Index: GUID.java
  ===================================================================
  RCS file: 
/home/cvs/repository/uwcal_JSR168/src/java/org/jahia/suite/calendar/framework/model/GUID.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- GUID.java 22 Nov 2004 10:58:35 -0000      1.2
  +++ GUID.java 7 Jan 2005 13:24:36 -0000       1.3
  @@ -46,50 +46,37 @@
    */
   public class GUID implements Serializable {
       
  -    private final String hostName;
  -    private final int eventId;
  +    private final String key;
       
       // Should not be used
       protected GUID() {
  -        hostName = null;
  -        eventId = -1;
  +        key = null;
       }
  -    
  +        
       /** 
        * Creates a new instance of GUID 
        * @param hostName The host name of the calendar server
  -     * @param eventId The Id of the event
  -     */
  -    public GUID(String hostName, int eventId) {
  -        this.hostName = hostName;
  -        this.eventId = eventId;
  -    }
  -    
  -    /**
  -     * Getter for property eventId.
  -     * @return Value of property eventId.
        */
  -    public int getEventId() {
  -        return eventId;
  +    public GUID(String key) {
  +        this.key = key;
       }
       
       /**
  -     * Getter for property hostName.
  -     * @return Value of property hostName.
  +     * Getter for property key
  +     * @return Value of property key
        */
  -    public String getHostName() {
  -        return hostName;
  +    public String getKey() {
  +        return key;
       }
  -    
  +       
       public String toString() {
  -        return hostName+":"+eventId;
  +        return key;
       }
       
       public boolean equals(Object o) {
           try {
               GUID tmp = (GUID)o;
  -            if (tmp.getEventId() == this.eventId &&
  -            tmp.getHostName().equals(this.hostName)) {
  +            if (tmp.getKey().equals(this.key)) {
                   return true;
               }
               return false;
  

Reply via email to