001    /*-----------------------------------------------------------------------
002     *  Copyright (C) 2006
003     *  Associated Universities, Inc. Washington DC, USA.
004     *  This program is free software; you can redistribute it and/or
005     *  modify it under the terms of the GNU General Public License as
006     *  published by the Free Software Foundation; either version 2 of
007     *  the License, or (at your option) any later version.
008     *
009     *  This program is distributed in the hope that it will be useful,
010     *  but WITHOUT ANY WARRANTY; without even the implied warranty of
011     *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
012     *  GNU General Public License for more details.
013     *
014     *  Correspondence concerning this software should be addressed as follows:
015     *         Internet email: switz@nrao.edu
016     *         Postal address: User Database
017     *                         National Radio Astronomy Observatory
018     *                         Post Office Box 0
019     *                         Socorro, NM 87801  USA
020     *-----------------------------------------------------------------------*/
021    package edu.nrao.sss.model.user;
022    
023    import edu.nrao.sss.xml.XMLTransform;
024    
025    public class EntryStatus extends ObjectId implements XMLable {
026    
027            private static final long serialVersionUID = 1L;
028    
029            private String entryStatus;
030    
031            public boolean equals(Object obj) {
032                    if (null == obj)
033                            return false;
034                    if (!(obj instanceof EntryStatus))
035                            return false;
036                    else {
037                            EntryStatus mObj = (EntryStatus) obj;
038                            return (this.getId() == mObj.getId());
039                    }
040            }
041    
042            public String getEntryStatus() {
043                    return entryStatus;
044            }
045    
046            public void setEntryStatus(String entryStatus) {
047                    this.entryStatus = entryStatus;
048            }
049    
050            public final String toXML() {
051                    return "<entry-status>" + XMLTransform.encode(getEntryStatus())
052                                    + "</entry-status>\n";
053            }
054    
055            public String toString() {
056                    return getEntryStatus();
057            }
058    }