001 // 002 // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.1.5-b01-fcs 003 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 004 // Any modifications to this file will be lost upon recompilation of the source schema. 005 // Generated on: 2008.06.27 at 11:37:09 AM GMT-10:00 006 // 007 008 009 package org.hackystat.sensorbase.resource.users.jaxb; 010 011 import java.io.Serializable; 012 import javax.xml.bind.annotation.XmlAccessType; 013 import javax.xml.bind.annotation.XmlAccessorType; 014 import javax.xml.bind.annotation.XmlAttribute; 015 import javax.xml.bind.annotation.XmlElement; 016 import javax.xml.bind.annotation.XmlRootElement; 017 import javax.xml.bind.annotation.XmlSchemaType; 018 import javax.xml.bind.annotation.XmlType; 019 import javax.xml.datatype.XMLGregorianCalendar; 020 021 022 /** 023 * <p>Java class for anonymous complex type. 024 * 025 * <p>The following schema fragment specifies the expected content contained within this class. 026 * 027 * <pre> 028 * <complexType> 029 * <complexContent> 030 * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> 031 * <sequence> 032 * <element ref="{}Email"/> 033 * <element ref="{}Password"/> 034 * <element ref="{}Role" minOccurs="0"/> 035 * <element ref="{}Properties" minOccurs="0"/> 036 * </sequence> 037 * <attribute ref="{}LastMod"/> 038 * </restriction> 039 * </complexContent> 040 * </complexType> 041 * </pre> 042 * 043 * 044 */ 045 @XmlAccessorType(XmlAccessType.FIELD) 046 @XmlType(name = "", propOrder = { 047 "email", 048 "password", 049 "role", 050 "properties" 051 }) 052 @XmlRootElement(name = "User") 053 public class User 054 implements Serializable 055 { 056 057 private final static long serialVersionUID = 12343L; 058 @XmlElement(name = "Email", required = true) 059 protected String email; 060 @XmlElement(name = "Password", required = true) 061 protected String password; 062 @XmlElement(name = "Role") 063 protected String role; 064 @XmlElement(name = "Properties") 065 protected Properties properties; 066 @XmlAttribute(name = "LastMod") 067 @XmlSchemaType(name = "dateTime") 068 protected XMLGregorianCalendar lastMod; 069 070 /** 071 * Gets the value of the email property. 072 * 073 * @return 074 * possible object is 075 * {@link String } 076 * 077 */ 078 public String getEmail() { 079 return email; 080 } 081 082 /** 083 * Sets the value of the email property. 084 * 085 * @param value 086 * allowed object is 087 * {@link String } 088 * 089 */ 090 public void setEmail(String value) { 091 this.email = value; 092 } 093 094 public boolean isSetEmail() { 095 return (this.email!= null); 096 } 097 098 /** 099 * Gets the value of the password property. 100 * 101 * @return 102 * possible object is 103 * {@link String } 104 * 105 */ 106 public String getPassword() { 107 return password; 108 } 109 110 /** 111 * Sets the value of the password property. 112 * 113 * @param value 114 * allowed object is 115 * {@link String } 116 * 117 */ 118 public void setPassword(String value) { 119 this.password = value; 120 } 121 122 public boolean isSetPassword() { 123 return (this.password!= null); 124 } 125 126 /** 127 * Gets the value of the role property. 128 * 129 * @return 130 * possible object is 131 * {@link String } 132 * 133 */ 134 public String getRole() { 135 return role; 136 } 137 138 /** 139 * Sets the value of the role property. 140 * 141 * @param value 142 * allowed object is 143 * {@link String } 144 * 145 */ 146 public void setRole(String value) { 147 this.role = value; 148 } 149 150 public boolean isSetRole() { 151 return (this.role!= null); 152 } 153 154 /** 155 * Gets the value of the properties property. 156 * 157 * @return 158 * possible object is 159 * {@link Properties } 160 * 161 */ 162 public Properties getProperties() { 163 return properties; 164 } 165 166 /** 167 * Sets the value of the properties property. 168 * 169 * @param value 170 * allowed object is 171 * {@link Properties } 172 * 173 */ 174 public void setProperties(Properties value) { 175 this.properties = value; 176 } 177 178 public boolean isSetProperties() { 179 return (this.properties!= null); 180 } 181 182 /** 183 * Gets the value of the lastMod property. 184 * 185 * @return 186 * possible object is 187 * {@link XMLGregorianCalendar } 188 * 189 */ 190 public XMLGregorianCalendar getLastMod() { 191 return lastMod; 192 } 193 194 /** 195 * Sets the value of the lastMod property. 196 * 197 * @param value 198 * allowed object is 199 * {@link XMLGregorianCalendar } 200 * 201 */ 202 public void setLastMod(XMLGregorianCalendar value) { 203 this.lastMod = value; 204 } 205 206 public boolean isSetLastMod() { 207 return (this.lastMod!= null); 208 } 209 210 // Custom methods here. Must be manually maintained. 211 212 /** 213 * Returns the first Property instance with the specified key, or null if not found. 214 * @param key The key for the property of interest. 215 * @return The Property instance for the key, or null if not found. 216 */ 217 public Property findProperty(String key) { 218 for (Property property : this.getProperties().getProperty()) { 219 if ((property.getKey() != null) && (property.getKey().equals(key))) { 220 return property; 221 } 222 } 223 return null; 224 } 225 226 /** 227 * Adds a new property to this instance with the specified key and value. 228 * @param key The key for the new property. 229 * @param value The value for the new property. 230 */ 231 public void addProperty(String key, String value) { 232 if (this.getProperties() == null) { 233 this.setProperties(new Properties()); 234 } 235 Property property = new Property(); 236 property.setKey(key); 237 property.setValue(value); 238 this.getProperties().getProperty().add(property); 239 } 240 241 }