/FileExtraction/Java_unseen/IMS-MAXIMS_openMAXIMS/Source Library/openmaxims_workspace/ValueObjects/src/ims/admin/vo/AppUserVo.java
//#############################################################################
//#                                                                           #
//#  Copyright (C) <2015>  <IMS MAXIMS>                                       #
//#                                                                           #
//#  This program is free software: you can redistribute it and/or modify     #
//#  it under the terms of the GNU Affero General Public License as           #
//#  published by the Free Software Foundation, either version 3 of the       #
//#  License, or (at your option) any later version.                          # 
//#                                                                           #
//#  This program is distributed in the hope that it will be useful,          #
//#  but WITHOUT ANY WARRANTY; without even the implied warranty of           #
//#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            #
//#  GNU Affero General Public License for more details.                      #
//#                                                                           #
//#  You should have received a copy of the GNU Affero General Public License #
//#  along with this program.  If not, see <http://www.gnu.org/licenses/>.    #
//#                                                                           #
//#  IMS MAXIMS provides absolutely NO GUARANTEE OF THE CLINICAL SAFTEY of    #
//#  this program.  Users of this software do so entirely at their own risk.  #
//#  IMS MAXIMS only ensures the Clinical Safety of unaltered run-time        #
//#  software that it builds, deploys and maintains.                          #
//#                                                                           #
//#############################################################################
//#EOH
// This code was generated by Barbara Worwood using IMS Development Environment (version 1.80 build 5589.25814)
// Copyright (C) 1995-2015 IMS MAXIMS. All rights reserved.
// WARNING: DO NOT MODIFY the content of this file

package ims.admin.vo;

/**
 * Linked to core.configuration.AppUser business object (ID: 1021100004).
 */
public class AppUserVo extends ims.admin.vo.AppUserShortVo implements ims.vo.ImsCloneable, Comparable, ims.framework.interfaces.IAppUser
{
	private static final long serialVersionUID = 1L;

	public AppUserVo()
	{
	}
	public AppUserVo(Integer id, int version)
	{
		super(id, version);
	}
	public AppUserVo(ims.admin.vo.beans.AppUserVoBean bean)
	{
		this.id = bean.getId();
		this.version = bean.getVersion();
		this.username = bean.getUsername();
		this.password = bean.getPassword();
		this.encodedpassword = bean.getEncodedPassword();
		this.theme = bean.getTheme();
		this.pwdexpdate = bean.getPwdExpDate() == null ? null : bean.getPwdExpDate().buildDateTime();
		this.effectivefrom = bean.getEffectiveFrom() == null ? null : bean.getEffectiveFrom().buildDateTime();
		this.effectiveto = bean.getEffectiveTo() == null ? null : bean.getEffectiveTo().buildDateTime();
		this.isactive = bean.getIsActive();
		this.userrealname = bean.getUserRealName();
		this.debugmode = bean.getDebugMode();
		this.ldapusername = bean.getLDAPUsername();
		this.ldappassword = bean.getLDAPPassword();
		this.locked = bean.getLocked();
		this.roles = ims.admin.vo.AppRoleShortVoCollection.buildFromBeanCollection(bean.getRoles());
		this.mos = bean.getMos() == null ? null : bean.getMos().buildVo();
		this.clearpassword = bean.getClearPassword();
		this.logintime = bean.getLoginTime() == null ? null : bean.getLoginTime().buildDateTime();
		this.hostname = bean.getHostName();
		this.ishcpchecked = bean.getIsHcpChecked();
		this.previouspasswords = ims.admin.vo.AppUserPasswordVoCollection.buildFromBeanCollection(bean.getPreviousPasswords());
		this.emailaccount = bean.getEmailAccount() == null ? null : bean.getEmailAccount().buildVo();
		this.useexternalauthentication = bean.getUseExternalAuthentication();
		this.notificationdetails = bean.getNotificationDetails() == null ? null : bean.getNotificationDetails().buildVo();
		this.secretkey = bean.getSecretKey();
		this.sdsuserid = bean.getSdsUserId();
	}
	public void populate(ims.vo.ValueObjectBeanMap map, ims.admin.vo.beans.AppUserVoBean bean)
	{
		this.id = bean.getId();
		this.version = bean.getVersion();
		this.username = bean.getUsername();
		this.password = bean.getPassword();
		this.encodedpassword = bean.getEncodedPassword();
		this.theme = bean.getTheme();
		this.pwdexpdate = bean.getPwdExpDate() == null ? null : bean.getPwdExpDate().buildDateTime();
		this.effectivefrom = bean.getEffectiveFrom() == null ? null : bean.getEffectiveFrom().buildDateTime();
		this.effectiveto = bean.getEffectiveTo() == null ? null : bean.getEffectiveTo().buildDateTime();
		this.isactive = bean.getIsActive();
		this.userrealname = bean.getUserRealName();
		this.debugmode = bean.getDebugMode();
		this.ldapusername = bean.getLDAPUsername();
		this.ldappassword = bean.getLDAPPassword();
		this.locked = bean.getLocked();
		this.roles = ims.admin.vo.AppRoleShortVoCollection.buildFromBeanCollection(bean.getRoles());
		this.mos = bean.getMos() == null ? null : bean.getMos().buildVo(map);
		this.clearpassword = bean.getClearPassword();
		this.logintime = bean.getLoginTime() == null ? null : bean.getLoginTime().buildDateTime();
		this.hostname = bean.getHostName();
		this.ishcpchecked = bean.getIsHcpChecked();
		this.previouspasswords = ims.admin.vo.AppUserPasswordVoCollection.buildFromBeanCollection(bean.getPreviousPasswords());
		this.emailaccount = bean.getEmailAccount() == null ? null : bean.getEmailAccount().buildVo(map);
		this.useexternalauthentication = bean.getUseExternalAuthentication();
		this.notificationdetails = bean.getNotificationDetails() == null ? null : bean.getNotificationDetails().buildVo(map);
		this.secretkey = bean.getSecretKey();
		this.sdsuserid = bean.getSdsUserId();
	}
	public ims.vo.ValueObjectBean getBean()
	{
		return this.getBean(new ims.vo.ValueObjectBeanMap());
	}
	public ims.vo.ValueObjectBean getBean(ims.vo.ValueObjectBeanMap map)
	{
		ims.admin.vo.beans.AppUserVoBean bean = null;
		if(map != null)
			bean = (ims.admin.vo.beans.AppUserVoBean)map.getValueObjectBean(this);
		if (bean == null)
		{
			bean = new ims.admin.vo.beans.AppUserVoBean();
			map.addValueObjectBean(this, bean);
			bean.populate(map, this);
		}
		return bean;
	}
	public Object getFieldValueByFieldName(String fieldName)
	{
		if(fieldName == null)
			throw new ims.framework.exceptions.CodingRuntimeException("Invalid field name");
		fieldName = fieldName.toUpperCase();
		if(fieldName.equals("ROLES"))
			return getRoles();
		if(fieldName.equals("MOS"))
			return getMos();
		if(fieldName.equals("CLEARPASSWORD"))
			return getClearPassword();
		if(fieldName.equals("LOGINTIME"))
			return getLoginTime();
		if(fieldName.equals("HOSTNAME"))
			return getHostName();
		if(fieldName.equals("ISHCPCHECKED"))
			return getIsHcpChecked();
		if(fieldName.equals("PREVIOUSPASSWORDS"))
			return getPreviousPasswords();
		if(fieldName.equals("EMAILACCOUNT"))
			return getEmailAccount();
		if(fieldName.equals("USEEXTERNALAUTHENTICATION"))
			return getUseExternalAuthentication();
		if(fieldName.equals("NOTIFICATIONDETAILS"))
			return getNotificationDetails();
		if(fieldName.equals("SECRETKEY"))
			return getSecretKey();
		if(fieldName.equals("SDSUSERID"))
			return getSdsUserId();
		return super.getFieldValueByFieldName(fieldName);
	}
	public boolean getRolesIsNotNull()
	{
		return this.roles != null;
	}
	public ims.admin.vo.AppRoleShortVoCollection getRoles()
	{
		return this.roles;
	}
	public void setRoles(ims.admin.vo.AppRoleShortVoCollection value)
	{
		this.isValidated = false;
		this.roles = value;
	}
	public boolean getMosIsNotNull()
	{
		return this.mos != null;
	}
	public ims.core.vo.MemberOfStaffShortVo getMos()
	{
		return this.mos;
	}
	public void setMos(ims.core.vo.MemberOfStaffShortVo value)
	{
		this.isValidated = false;
		this.mos = value;
	}
	public boolean getClearPasswordIsNotNull()
	{
		return this.clearpassword != null;
	}
	public String getClearPassword()
	{
		return this.clearpassword;
	}
	public static int getClearPasswordMaxLength()
	{
		return 255;
	}
	public void setClearPassword(String value)
	{
		this.isValidated = false;
		this.clearpassword = value;
	}
	public boolean getLoginTimeIsNotNull()
	{
		return this.logintime != null;
	}
	public ims.framework.utils.DateTime getLoginTime()
	{
		return this.logintime;
	}
	public void setLoginTime(ims.framework.utils.DateTime value)
	{
		this.isValidated = false;
		this.logintime = value;
	}
	public boolean getHostNameIsNotNull()
	{
		return this.hostname != null;
	}
	public String getHostName()
	{
		return this.hostname;
	}
	public static int getHostNameMaxLength()
	{
		return 255;
	}
	public void setHostName(String value)
	{
		this.isValidated = false;
		this.hostname = value;
	}
	public boolean getIsHcpCheckedIsNotNull()
	{
		return this.ishcpchecked != null;
	}
	public Boolean getIsHcpChecked()
	{
		return this.ishcpchecked;
	}
	public void setIsHcpChecked(Boolean value)
	{
		this.isValidated = false;
		this.ishcpchecked = value;
	}
	public boolean getPreviousPasswordsIsNotNull()
	{
		return this.previouspasswords != null;
	}
	public ims.admin.vo.AppUserPasswordVoCollection getPreviousPasswords()
	{
		return this.previouspasswords;
	}
	public void setPreviousPasswords(ims.admin.vo.AppUserPasswordVoCollection value)
	{
		this.isValidated = false;
		this.previouspasswords = value;
	}
	public boolean getEmailAccountIsNotNull()
	{
		return this.emailaccount != null;
	}
	public ims.admin.vo.UserEmailAccountVo getEmailAccount()
	{
		return this.emailaccount;
	}
	public void setEmailAccount(ims.admin.vo.UserEmailAccountVo value)
	{
		this.isValidated = false;
		this.emailaccount = value;
	}
	public boolean getUseExternalAuthenticationIsNotNull()
	{
		return this.useexternalauthentication != null;
	}
	public Boolean getUseExternalAuthentication()
	{
		return this.useexternalauthentication;
	}
	public void setUseExternalAuthentication(Boolean value)
	{
		this.isValidated = false;
		this.useexternalauthentication = value;
	}
	public boolean getNotificationDetailsIsNotNull()
	{
		return this.notificationdetails != null;
	}
	public ims.admin.vo.UserNotificationDetailsVo getNotificationDetails()
	{
		return this.notificationdetails;
	}
	public void setNotificationDetails(ims.admin.vo.UserNotificationDetailsVo value)
	{
		this.isValidated = false;
		this.notificationdetails = value;
	}
	public boolean getSecretKeyIsNotNull()
	{
		return this.secretkey != null;
	}
	public String getSecretKey()
	{
		return this.secretkey;
	}
	public static int getSecretKeyMaxLength()
	{
		return 32;
	}
	public void setSecretKey(String value)
	{
		this.isValidated = false;
		this.secretkey = value;
	}
	public boolean getSdsUserIdIsNotNull()
	{
		return this.sdsuserid != null;
	}
	public String getSdsUserId()
	{
		return this.sdsuserid;
	}
	public static int getSdsUserIdMaxLength()
	{
		return 30;
	}
	public void setSdsUserId(String value)
	{
		this.isValidated = false;
		this.sdsuserid = value;
	}
	/**
	* IAppUser Interface methods
	*/
		public int getUserId()
		{
			if (this.getID_AppUser() != null)
				return this.getID_AppUser().intValue();
			else
				return 0;
		}
		public String getLDAPUsername()
		{
			return this.ldapusername;
		}
		public String getLDAPPassword()
		{
			return this.ldappassword;
		}
		public ims.framework.interfaces.IAppRoleLight[] getAppRoles()
		{		
			AppRoleShortVoCollection coll = new AppRoleShortVoCollection();
			if (this.getRoles()== null)
				return new ims.framework.interfaces.IAppRoleLight[0];
			else
			{				
				for (int i = 0; i < this.getRoles().size(); i++) 
				{
					if (this.getRoles().get(i).isactive)
					{
						coll.add(this.getRoles().get(i));
					}
				}
			}
				
			if (coll.size() == 0)
				return new ims.framework.interfaces.IAppRoleLight[0];
			else
				return coll.sort().toArray();
		}
		public ims.framework.interfaces.IAppRoleLight getAppRole(int roleId)
		{
			AppRoleShortVoCollection coll = this.getRoles();
			for (int i = 0; i < coll.size(); i++)
			{
				if (coll.get(i).getID_AppRole() != null && coll.get(i).getID_AppRole().intValue() == roleId)
					return coll.get(i);
			}
			return null;
		}
		public Integer getMosId()
		{
			if (this.getMos() == null)
				return null;
			else
				return this.getMos().getID_MemberOfStaff();
		}
		public String getUserRealName()
		{
			if (this.getMos() == null)
				return null;
			if (this.getMos().getName() == null)
				return null;
			else
				return this.getMos().getName().toString();
		}
		public Integer getHcpId()
		{
			if (this.getMos() == null)
				return null;
			if (this.getMos().getHcp() == null)
				return null;
			else
				return this.getMos().getHcp().getID_Hcp();
		}
		public boolean isHcpChecked()
		{
			if (this.getIsHcpChecked() == null)
				return false;
			else
				return this.getIsHcpChecked().booleanValue();
		}
		public void setUserRealName(String realName)
		{
			//Do Nothing
		}
		public void setHcpChecked(boolean value)
		{
			this.setIsHcpChecked(new Boolean(value));
			
		}
		public void setHcpId(Integer value)
		{
			//Do Nothing
		}
		public String[] getUserPreviousPasswords() 
		{
			if(previouspasswords == null)
				return new String[0];
			
			String[] result = new String[previouspasswords.size()];
			
			for(int x = 0; x < previouspasswords.size(); x++)			
			{
				if(previouspasswords.get(x) == null || previouspasswords.get(x).getEncodedPassword() == null)
				{
					result[x] = "";
				}
				else
				{				
					result[x] = ims.configuration.Configuration.decryptPasswordWithCloak(previouspasswords.get(x).getEncodedPassword());
				}
			}
			
			return result;
		}
		public boolean useExternalAuthentication()
		{
			return useexternalauthentication == null ? false : useexternalauthentication;
		}
		public String getNotificationEmailAddress()
		{
			if(notificationdetails == null)
				return null;
			return notificationdetails.getEmail();
		}
		public String getNotificationMobilePhone()
		{
			if(notificationdetails == null)
				return null;
			return notificationdetails.getMobilePhone();
		}
		public String[] getNotificationMobileDeviceTokenIds()
		{
			if(notificationdetails == null || notificationdetails.getMobileDevices() == null)
				return new String[0];
			java.util.ArrayList<String> data = new java.util.ArrayList<String>(); 
			for(int x = 0; x < notificationdetails.getMobileDevices().size(); x++)
			{
				if(notificationdetails.getMobileDevices().get(x).getActive() != null && notificationdetails.getMobileDevices().get(x).getActive())
				{
					data.add(notificationdetails.getMobileDevices().get(x).getTokenId());
				}
			}			
			String[] result = new String[data.size()];
			data.toArray(result);
			return result;
		}
		public boolean isLocked()
		{
			return locked == null ? false : locked;
		}
		public void setLocked(boolean value)
		{
			this.setLocked(new Boolean(value));
			
		}
	
		public String getsdsUserId()
		{
			return this.sdsuserid;
		}
	
	public boolean isValidated()
	{
		if(this.isBusy)
			return true;
		this.isBusy = true;
	
		if(!this.isValidated)
		{
			this.isBusy = false;
			return false;
		}
		if(this.roles != null)
		{
			if(!this.roles.isValidated())
			{
				this.isBusy = false;
				return false;
			}
		}
		if(this.mos != null)
		{
			if(!this.mos.isValidated())
			{
				this.isBusy = false;
				return false;
			}
		}
		if(this.previouspasswords != null)
		{
			if(!this.previouspasswords.isValidated())
			{
				this.isBusy = false;
				return false;
			}
		}
		if(this.emailaccount != null)
		{
			if(!this.emailaccount.isValidated())
			{
				this.isBusy = false;
				return false;
			}
		}
		if(this.notificationdetails != null)
		{
			if(!this.notificationdetails.isValidated())
			{
				this.isBusy = false;
				return false;
			}
		}
		this.isBusy = false;
		return true;
	}
	public String[] validate()
	{
		return validate(null);
	}
	public String[] validate(String[] existingErrors)
	{
		if(this.isBusy)
			return null;
		this.isBusy = true;
	
		java.util.ArrayList<String> listOfErrors = new java.util.ArrayList<String>();
		if(existingErrors != null)
		{
			for(int x = 0; x < existingErrors.length; x++)
			{
				listOfErrors.add(existingErrors[x]);
			}
		}
		if(this.username == null || this.username.length() == 0)
			listOfErrors.add("Username is mandatory");
		else if(this.username.length() > 30)
			listOfErrors.add("The length of the field [username] in the value object [ims.admin.vo.AppUserVo] is too big. It should be less or equal to 30");
		if(this.password == null || this.password.length() == 0)
			listOfErrors.add("Password is mandatory");
		else if(this.password.length() > 30)
			listOfErrors.add("The length of the field [password] in the value object [ims.admin.vo.AppUserVo] is too big. It should be less or equal to 30");
		if(this.encodedpassword != null)
			if(this.encodedpassword.length() > 255)
				listOfErrors.add("The length of the field [encodedpassword] in the value object [ims.admin.vo.AppUserVo] is too big. It should be less or equal to 255");
		if(this.theme != null)
			if(this.theme.length() > 20)
				listOfErrors.add("The length of the field [theme] in the value object [ims.admin.vo.AppUserVo] is too big. It should be less or equal to 20");
		if(this.isactive == null)
			listOfErrors.add("IsActive is mandatory");
		if(this.ldapusername != null)
			if(this.ldapusername.length() > 255)
				listOfErrors.add("255");
		if(this.ldappassword != null)
			if(this.ldappassword.length() > 255)
				listOfErrors.add("255");
		if(this.roles != null)
		{
			String[] listOfOtherErrors = this.roles.validate();
			if(listOfOtherErrors != null)
			{
				for(int x = 0; x < listOfOtherErrors.length; x++)
				{
					listOfErrors.add(listOfOtherErrors[x]);
				}
			}
		}
		if(this.mos != null)
		{
			String[] listOfOtherErrors = this.mos.validate();
			if(listOfOtherErrors != null)
			{
				for(int x = 0; x < listOfOtherErrors.length; x++)
				{
					listOfErrors.add(listOfOtherErrors[x]);
				}
			}
		}
		if(this.previouspasswords != null)
		{
			String[] listOfOtherErrors = this.previouspasswords.validate();
			if(listOfOtherErrors != null)
			{
				for(int x = 0; x < listOfOtherErrors.length; x++)
				{
					listOfErrors.add(listOfOtherErrors[x]);
				}
			}
		}
		if(this.emailaccount != null)
		{
			String[] listOfOtherErrors = this.emailaccount.validate();
			if(listOfOtherErrors != null)
			{
				for(int x = 0; x < listOfOtherErrors.length; x++)
				{
					listOfErrors.add(listOfOtherErrors[x]);
				}
			}
		}
		if(this.notificationdetails != null)
		{
			String[] listOfOtherErrors = this.notificationdetails.validate();
			if(listOfOtherErrors != null)
			{
				for(int x = 0; x < listOfOtherErrors.length; x++)
				{
					listOfErrors.add(listOfOtherErrors[x]);
				}
			}
		}
		if(this.secretkey != null)
			if(this.secretkey.length() > 32)
				listOfErrors.add("The length of the field [secretkey] in the value object [ims.admin.vo.AppUserVo] is too big. It should be less or equal to 32");
		if(this.sdsuserid != null)
			if(this.sdsuserid.length() > 30)
				listOfErrors.add("The length of the field [sdsuserid] in the value object [ims.admin.vo.AppUserVo] is too big. It should be less or equal to 30");
		int errorCount = listOfErrors.size();
		if(errorCount == 0)
		{
			this.isBusy = false;
			this.isValidated = true;
			return null;
		}
		String[] result = new String[errorCount];
		for(int x = 0; x < errorCount; x++)
			result[x] = (String)listOfErrors.get(x);
		this.isBusy = false;
		this.isValidated = false;
		return result;
	}
	public void clearIDAndVersion()
	{
		this.id = null;
		this.version = 0;
	}
	public Object clone()
	{
		if(this.isBusy)
			return this;
		this.isBusy = true;
	
		AppUserVo clone = new AppUserVo(this.id, this.version);
		
		clone.username = this.username;
		clone.password = this.password;
		clone.encodedpassword = this.encodedpassword;
		clone.theme = this.theme;
		if(this.pwdexpdate == null)
			clone.pwdexpdate = null;
		else
			clone.pwdexpdate = (ims.framework.utils.DateTime)this.pwdexpdate.clone();
		if(this.effectivefrom == null)
			clone.effectivefrom = null;
		else
			clone.effectivefrom = (ims.framework.utils.DateTime)this.effectivefrom.clone();
		if(this.effectiveto == null)
			clone.effectiveto = null;
		else
			clone.effectiveto = (ims.framework.utils.DateTime)this.effectiveto.clone();
		clone.isactive = this.isactive;
		clone.userrealname = this.userrealname;
		clone.debugmode = this.debugmode;
		clone.ldapusername = this.ldapusername;
		clone.ldappassword = this.ldappassword;
		clone.locked = this.locked;
		if(this.roles == null)
			clone.roles = null;
		else
			clone.roles = (ims.admin.vo.AppRoleShortVoCollection)this.roles.clone();
		if(this.mos == null)
			clone.mos = null;
		else
			clone.mos = (ims.core.vo.MemberOfStaffShortVo)this.mos.clone();
		clone.clearpassword = this.clearpassword;
		if(this.logintime == null)
			clone.logintime = null;
		else
			clone.logintime = (ims.framework.utils.DateTime)this.logintime.clone();
		clone.hostname = this.hostname;
		clone.ishcpchecked = this.ishcpchecked;
		if(this.previouspasswords == null)
			clone.previouspasswords = null;
		else
			clone.previouspasswords = (ims.admin.vo.AppUserPasswordVoCollection)this.previouspasswords.clone();
		if(this.emailaccount == null)
			clone.emailaccount = null;
		else
			clone.emailaccount = (ims.admin.vo.UserEmailAccountVo)this.emailaccount.clone();
		clone.useexternalauthentication = this.useexternalauthentication;
		if(this.notificationdetails == null)
			clone.notificationdetails = null;
		else
			clone.notificationdetails = (ims.admin.vo.UserNotificationDetailsVo)this.notificationdetails.clone();
		clone.secretkey = this.secretkey;
		clone.sdsuserid = this.sdsuserid;
		clone.isValidated = this.isValidated;
		
		this.isBusy = false;
		return clone;
	}
	public int compareTo(Object obj)
	{
		return compareTo(obj, true);
	}
	public int compareTo(Object obj, boolean caseInsensitive)
	{
		if (obj == null)
		{
			return -1;
		}
		if(caseInsensitive); // this is to avoid eclipse warning only.
		if (!(AppUserVo.class.isAssignableFrom(obj.getClass())))
		{
			throw new ClassCastException("A AppUserVo object cannot be compared an Object of type " + obj.getClass().getName());
		}
		if (this.id == null)
			return 1;
		if (((AppUserVo)obj).getBoId() == null)
			return -1;
		return this.id.compareTo(((AppUserVo)obj).getBoId());
	}
	public synchronized static int generateValueObjectUniqueID()
	{
		return ims.vo.ValueObject.generateUniqueID();
	}
	public int countFieldsWithValue()
	{
		int count = super.countFieldsWithValue();
		if(this.roles != null)
			count++;
		if(this.mos != null)
			count++;
		if(this.clearpassword != null)
			count++;
		if(this.logintime != null)
			count++;
		if(this.hostname != null)
			count++;
		if(this.ishcpchecked != null)
			count++;
		if(this.previouspasswords != null)
			count++;
		if(this.emailaccount != null)
			count++;
		if(this.useexternalauthentication != null)
			count++;
		if(this.notificationdetails != null)
			count++;
		if(this.secretkey != null)
			count++;
		if(this.sdsuserid != null)
			count++;
		return count;
	}
	public int countValueObjectFields()
	{
		return super.countValueObjectFields() + 12;
	}
	protected ims.admin.vo.AppRoleShortVoCollection roles;
	protected ims.core.vo.MemberOfStaffShortVo mos;
	protected String clearpassword;
	protected ims.framework.utils.DateTime logintime;
	protected String hostname;
	protected Boolean ishcpchecked;
	protected ims.admin.vo.AppUserPasswordVoCollection previouspasswords;
	protected ims.admin.vo.UserEmailAccountVo emailaccount;
	protected Boolean useexternalauthentication;
	protected ims.admin.vo.UserNotificationDetailsVo notificationdetails;
	protected String secretkey;
	protected String sdsuserid;
	private boolean isValidated = false;
	private boolean isBusy = false;
}
