package api.unicore.component;
 
import static api.util.ComponentConstants.DATE_NULL;
import static api.util.ComponentConstants.DATE_NULL_CODE;
import static api.util.ComponentConstants.INTEGER_NULL;
import static api.util.ComponentConstants.INTEGER_NULL_CODE;
import static api.util.ComponentConstants.STRING_NULL;
import static api.util.ComponentConstants.STRING_NULL_CODE;
import static org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion.NON_NULL;
 
import api.UnoComponent;
import api.unicore.VirtualFields;
import api.unicore.component_manual.User;
import api.util.DateFormat;
import api.util.IntegerFormat;
import api.util.StringFormat;
import com.fortify.annotations.FortifyNotPassword;
import iapp.services.ServerObject;
import iapp.util.audit.AuditHelper;
import java.util.Date;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import javax.ws.rs.DefaultValue;
import javax.ws.rs.FormParam;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import org.codehaus.jackson.annotate.JsonPropertyOrder;
import org.codehaus.jackson.map.annotate.JsonDeserialize;
import org.codehaus.jackson.map.annotate.JsonSerialize;
import unipay.validator.CustomValidator;
 
/**
 * @author CodeGen [Alexander Fliagin]
 * @company UnitedThinkers
 * @since 2012/10/11
 */
 
@JsonSerialize(include=NON_NULL)
@XmlType(propOrder={"id", "code", "createDate", "name", "title", "email", "userName", "password", "passwordExpirationDate", "securityImage", "failedLoginCount", "securityType", "securityLevel", "roleCode", "functionPolicy", "department", "securityQuestion", "securityAnswer", "licenseAgreementAcceptanceDate", "timeZone", "notes", "defaultMerchantCode", "defaultMerchantAccountCode", "owner", "ownerCode", "secretKey", "privileges", "additionalPassword", "rawAccountDataModeType", "responseMessageDisplayPolicy", "authenticationMode", "statusType"})
@JsonPropertyOrder({"id", "code", "createDate", "name", "title", "email", "userName", "password", "passwordExpirationDate", "securityImage", "failedLoginCount", "securityType", "securityLevel", "roleCode", "functionPolicy", "department", "securityQuestion", "securityAnswer", "licenseAgreementAcceptanceDate", "timeZone", "notes", "defaultMerchantCode", "defaultMerchantAccountCode", "owner", "ownerCode", "secretKey", "privileges", "additionalPassword", "rawAccountDataModeType", "responseMessageDisplayPolicy", "authenticationMode", "statusType"})
@XmlAccessorType(XmlAccessType.NONE)
@XmlSeeAlso(User.class)
@CustomValidator
public abstract class AbstractUser extends UnoComponent<unicore.model.User> {
 
    @FormParam("id")
    @IntegerFormat
    @DefaultValue(INTEGER_NULL_CODE)
    protected Integer id;
 
    @FormParam("code")
    @StringFormat
    @DefaultValue(STRING_NULL_CODE)
    protected String code;
 
    @FormParam("createDate")
    @DateFormat
    @DefaultValue(DATE_NULL_CODE)
    protected Date createDate;
 
    @FormParam("name")
    @StringFormat
    @DefaultValue(STRING_NULL_CODE)
    protected String name;
 
    @FormParam("title")
    @StringFormat
    @DefaultValue(STRING_NULL_CODE)
    protected String title;
 
    @FormParam("email")
    @StringFormat
    @DefaultValue(STRING_NULL_CODE)
    protected String email;
 
    @FormParam("userName")
    @StringFormat
    @DefaultValue(STRING_NULL_CODE)
    protected String userName;
 
    @FormParam("password")
    @StringFormat
    @DefaultValue(STRING_NULL_CODE)
    @FortifyNotPassword
    protected String password;
 
    @FormParam("passwordExpirationDate")
    @DateFormat
    @DefaultValue(DATE_NULL_CODE)
    protected Date passwordExpirationDate;
 
    @FormParam("securityImage")
    @StringFormat
    @DefaultValue(STRING_NULL_CODE)
    protected String securityImage;
 
    @FormParam("failedLoginCount")
    @IntegerFormat
    @DefaultValue(INTEGER_NULL_CODE)
    protected Integer failedLoginCount;
 
    @FormParam("securityType")
    @StringFormat
    @DefaultValue(STRING_NULL_CODE)
    protected String securityType;
 
    @FormParam("securityLevel")
    @IntegerFormat
    @DefaultValue(INTEGER_NULL_CODE)
    protected Integer securityLevel;
 
    @FormParam("roleCode")
    @StringFormat
    @DefaultValue(STRING_NULL_CODE)
    protected String roleCode;
 
    @FormParam("functionPolicy")
    @StringFormat
    @DefaultValue(STRING_NULL_CODE)
    protected String functionPolicy;
 
    @FormParam("department")
    @StringFormat
    @DefaultValue(STRING_NULL_CODE)
    protected String department;
 
    @FormParam("securityQuestion")
    @StringFormat
    @DefaultValue(STRING_NULL_CODE)
    protected String securityQuestion;
 
    @FormParam("securityAnswer")
    @StringFormat
    @DefaultValue(STRING_NULL_CODE)
    protected String securityAnswer;
 
    @FormParam("licenseAgreementAcceptanceDate")
    @DateFormat
    @DefaultValue(DATE_NULL_CODE)
    protected Date licenseAgreementAcceptanceDate;
 
    @FormParam("timeZone")
    @StringFormat
    @DefaultValue(STRING_NULL_CODE)
    protected String timeZone;
 
    @FormParam("notes")
    @StringFormat
    @DefaultValue(STRING_NULL_CODE)
    protected String notes;
 
    @FormParam("defaultMerchantCode")
    @IntegerFormat
    @DefaultValue(INTEGER_NULL_CODE)
    protected Integer defaultMerchantCode;
 
    @FormParam("defaultMerchantAccountCode")
    @IntegerFormat
    @DefaultValue(INTEGER_NULL_CODE)
    protected Integer defaultMerchantAccountCode;
 
    @FormParam("owner")
    @StringFormat
    @DefaultValue(STRING_NULL_CODE)
    protected String owner;
 
    @FormParam("ownerCode")
    @IntegerFormat
    @DefaultValue(INTEGER_NULL_CODE)
    protected Integer ownerCode;
 
    @FormParam("secretKey")
    @StringFormat
    @DefaultValue(STRING_NULL_CODE)
    protected String secretKey;
 
    @FormParam("privileges")
    @IntegerFormat
    @DefaultValue(INTEGER_NULL_CODE)
    protected Integer privileges;
 
    @FormParam("additionalPassword")
    @StringFormat
    @DefaultValue(STRING_NULL_CODE)
    @FortifyNotPassword
    protected String additionalPassword;
 
    @FormParam("rawAccountDataModeType")
    @StringFormat
    @DefaultValue(STRING_NULL_CODE)
    protected String rawAccountDataModeType;
 
    @FormParam("responseMessageDisplayPolicy")
    @StringFormat
    @DefaultValue(STRING_NULL_CODE)
    protected String responseMessageDisplayPolicy;
 
    @FormParam("authenticationMode")
    @StringFormat
    @DefaultValue(STRING_NULL_CODE)
    protected String authenticationMode;
 
    @FormParam("statusType")
    @StringFormat
    @DefaultValue(STRING_NULL_CODE)
    protected String statusType;
 
 
    public AbstractUser(){
        super();
        applyDefaults();
    }
 
    public AbstractUser(unicore.model.User object){
        super(object);
    }
 
 
    private void applyDefaults() {
        if (!isProxyObject()) {
            id = INTEGER_NULL;
            code = STRING_NULL;
            createDate = DATE_NULL;
            name = STRING_NULL;
            title = STRING_NULL;
            email = STRING_NULL;
            userName = STRING_NULL;
            password = STRING_NULL;
            passwordExpirationDate = DATE_NULL;
            securityImage = STRING_NULL;
            failedLoginCount = INTEGER_NULL;
            securityType = STRING_NULL;
            securityLevel = INTEGER_NULL;
            roleCode = STRING_NULL;
            functionPolicy = STRING_NULL;
            department = STRING_NULL;
            securityQuestion = STRING_NULL;
            securityAnswer = STRING_NULL;
            licenseAgreementAcceptanceDate = DATE_NULL;
            timeZone = STRING_NULL;
            notes = STRING_NULL;
            defaultMerchantCode = INTEGER_NULL;
            defaultMerchantAccountCode = INTEGER_NULL;
            owner = STRING_NULL;
            ownerCode = INTEGER_NULL;
            secretKey = STRING_NULL;
            privileges = INTEGER_NULL;
            additionalPassword = STRING_NULL;
            rawAccountDataModeType = STRING_NULL;
            responseMessageDisplayPolicy = STRING_NULL;
            authenticationMode = STRING_NULL;
            statusType = STRING_NULL;
        }
    }
 
    @Override
    public void from() {
        fromInternal();
        super.from();
    }
 
    protected abstract void fromInternal();
    @Override
    public abstract void to();
    @Override
    public abstract void initializeNew();
 
    @Override
    public String toString(){
        StringBuilder sb = new StringBuilder();
        sb.append("user: {");
        sb.append("id: ");
        sb.append(id);
        sb.append(',').append(' ');
        sb.append("code: ");
        sb.append(code);
        sb.append(',').append(' ');
        sb.append("createDate: ");
        sb.append(createDate);
        sb.append(',').append(' ');
        sb.append("name: ");
        sb.append(name);
        sb.append(',').append(' ');
        sb.append("title: ");
        sb.append(title);
        sb.append(',').append(' ');
        sb.append("email: ");
        sb.append(email);
        sb.append(',').append(' ');
        sb.append("userName: ");
        sb.append(userName);
        sb.append(',').append(' ');
        sb.append("password: ");
        sb.append(password);
        sb.append(',').append(' ');
        sb.append("passwordExpirationDate: ");
        sb.append(passwordExpirationDate);
        sb.append(',').append(' ');
        sb.append("securityImage: ");
        sb.append(securityImage);
        sb.append(',').append(' ');
        sb.append("failedLoginCount: ");
        sb.append(failedLoginCount);
        sb.append(',').append(' ');
        sb.append("securityType: ");
        sb.append(securityType);
        sb.append(',').append(' ');
        sb.append("securityLevel: ");
        sb.append(securityLevel);
        sb.append(',').append(' ');
        sb.append("roleCode: ");
        sb.append(roleCode);
        sb.append(',').append(' ');
        sb.append("functionPolicy: ");
        sb.append(functionPolicy);
        sb.append(',').append(' ');
        sb.append("department: ");
        sb.append(department);
        sb.append(',').append(' ');
        sb.append("securityQuestion: ");
        sb.append(securityQuestion);
        sb.append(',').append(' ');
        sb.append("securityAnswer: ");
        sb.append(securityAnswer);
        sb.append(',').append(' ');
        sb.append("licenseAgreementAcceptanceDate: ");
        sb.append(licenseAgreementAcceptanceDate);
        sb.append(',').append(' ');
        sb.append("timeZone: ");
        sb.append(timeZone);
        sb.append(',').append(' ');
        sb.append("notes: ");
        sb.append(notes);
        sb.append(',').append(' ');
        sb.append("defaultMerchantCode: ");
        sb.append(defaultMerchantCode);
        sb.append(',').append(' ');
        sb.append("defaultMerchantAccountCode: ");
        sb.append(defaultMerchantAccountCode);
        sb.append(',').append(' ');
        sb.append("owner: ");
        sb.append(owner);
        sb.append(',').append(' ');
        sb.append("ownerCode: ");
        sb.append(ownerCode);
        sb.append(',').append(' ');
        sb.append("secretKey: ");
        sb.append(secretKey);
        sb.append(',').append(' ');
        sb.append("privileges: ");
        sb.append(privileges);
        sb.append(',').append(' ');
        sb.append("additionalPassword: ");
        sb.append(additionalPassword);
        sb.append(',').append(' ');
        sb.append("rawAccountDataModeType: ");
        sb.append(rawAccountDataModeType);
        sb.append(',').append(' ');
        sb.append("responseMessageDisplayPolicy: ");
        sb.append(responseMessageDisplayPolicy);
        sb.append(',').append(' ');
        sb.append("authenticationMode: ");
        sb.append(authenticationMode);
        sb.append(',').append(' ');
        sb.append("statusType: ");
        sb.append(statusType);
        sb.append('}');
        return sb.toString();
    }
 
 
    @XmlAttribute(name="id")
    @XmlJavaTypeAdapter(value=api.util.IntegerAdapter.class, type=Integer.class)
    @FormParam("id")
    @IntegerFormat
    @JsonDeserialize(using=api.util.NumberDeserializer.class)
    public Integer getId(){
        return id;
    }
 
    public void setId(Integer value){
        this.id = value;
    }
 
    @XmlAttribute(name="code")
    @XmlJavaTypeAdapter(value=api.util.StringAdapter.class, type=String.class)
    @FormParam("code")
    @StringFormat
    @JsonDeserialize(using = api.util.StringDeserializer.class)
    public String getCode(){
        return code;
    }
 
    public void setCode(String value){
        this.code = value;
    }
 
    @XmlAttribute(name="createDate")
    @XmlJavaTypeAdapter(api.util.DateTimeAdapter.class)
    @FormParam("createDate")
    @DateFormat
    @JsonSerialize(using=api.util.DateTimeSerializer.class, include = NON_NULL)
    @JsonDeserialize(using=api.util.DateDeserializer.class)
    public Date getCreateDate(){
        return createDate;
    }
 
 
    @XmlAttribute(name="name")
    @XmlJavaTypeAdapter(value=api.util.StringAdapter.class, type=String.class)
    @FormParam("name")
    @StringFormat
    @JsonDeserialize(using = api.util.StringDeserializer.class)
    @NotNull
    @Size(max = 150)
    @Pattern(regexp = unipay.validator.PatternName.NAME)
    public String getName(){
        return name;
    }
 
    public void setName(String value){
        this.name = value;
    }
 
    @XmlAttribute(name="title")
    @XmlJavaTypeAdapter(value=api.util.StringAdapter.class, type=String.class)
    @FormParam("title")
    @StringFormat
    @JsonDeserialize(using = api.util.StringDeserializer.class)
    public String getTitle(){
        return title;
    }
 
    public void setTitle(String value){
        this.title = value;
    }
 
    @XmlAttribute(name="email")
    @XmlJavaTypeAdapter(value=api.util.StringAdapter.class, type=String.class)
    @FormParam("email")
    @StringFormat
    @JsonDeserialize(using = api.util.StringDeserializer.class)
    @NotNull
    @Pattern(regexp = unipay.validator.PatternName.EMAIL)
    public String getEmail(){
        return email;
    }
 
    public void setEmail(String value){
        this.email = value;
    }
 
    @XmlAttribute(name="userName")
    @XmlJavaTypeAdapter(value=api.util.StringAdapter.class, type=String.class)
    @FormParam("userName")
    @StringFormat
    @JsonDeserialize(using = api.util.StringDeserializer.class)
    @NotNull
    @Size(min = 4, max = 150)
    @Pattern(regexp = unipay.validator.PatternName.USERNAME)
    public String getUserName(){
        return userName;
    }
 
    public void setUserName(String value){
        this.userName = value;
    }
 
    @XmlAttribute(name="password")
    @XmlJavaTypeAdapter(value=api.util.StringAdapter.class, type=String.class)
    @FormParam("password")
    @StringFormat
    @JsonDeserialize(using = api.util.StringDeserializer.class)
    @NotNull
    public String getPassword(){
        return password;
    }
 
    public void setPassword(String value){
        this.password = value;
    }
 
    @XmlAttribute(name="passwordExpirationDate")
    @FormParam("passwordExpirationDate")
    @DateFormat
    @JsonDeserialize(using=api.util.DateDeserializer.class)
    public Date getPasswordExpirationDate(){
        return passwordExpirationDate;
    }
 
    public void setPasswordExpirationDate(Date value){
        this.passwordExpirationDate = value;
    }
 
    @XmlAttribute(name="securityImage")
    @XmlJavaTypeAdapter(value=api.util.StringAdapter.class, type=String.class)
    @FormParam("securityImage")
    @StringFormat
    @JsonDeserialize(using = api.util.StringDeserializer.class)
    public String getSecurityImage(){
        return securityImage;
    }
 
    public void setSecurityImage(String value){
        this.securityImage = value;
    }
 
    @XmlAttribute(name="failedLoginCount")
    @XmlJavaTypeAdapter(value=api.util.IntegerAdapter.class, type=Integer.class)
    @FormParam("failedLoginCount")
    @IntegerFormat
    @JsonDeserialize(using=api.util.NumberDeserializer.class)
    public Integer getFailedLoginCount(){
        return failedLoginCount;
    }
 
    public void setFailedLoginCount(Integer value){
        this.failedLoginCount = value;
    }
 
    @XmlAttribute(name="securityType")
    @XmlJavaTypeAdapter(value=api.util.StringAdapter.class, type=String.class)
    @FormParam("securityType")
    @StringFormat
    @JsonDeserialize(using = api.util.StringDeserializer.class)
    @NotNull
    public String getSecurityType(){
        return securityType;
    }
 
    public void setSecurityType(String value){
        this.securityType = value;
    }
 
    @XmlAttribute(name="securityLevel")
    @XmlJavaTypeAdapter(value=api.util.IntegerAdapter.class, type=Integer.class)
    @FormParam("securityLevel")
    @IntegerFormat
    @JsonDeserialize(using=api.util.NumberDeserializer.class)
    public Integer getSecurityLevel(){
        return securityLevel;
    }
 
    public void setSecurityLevel(Integer value){
        this.securityLevel = value;
    }
 
    @XmlAttribute(name="roleCode")
    @XmlJavaTypeAdapter(value=api.util.StringAdapter.class, type=String.class)
    @FormParam("roleCode")
    @StringFormat
    @JsonDeserialize(using = api.util.StringDeserializer.class)
    public String getRoleCode(){
        return roleCode;
    }
 
    public void setRoleCode(String value){
        this.roleCode = value;
    }
 
    @XmlAttribute(name="functionPolicy")
    @XmlJavaTypeAdapter(value=api.util.StringAdapter.class, type=String.class)
    @FormParam("functionPolicy")
    @StringFormat
    @JsonDeserialize(using = api.util.StringDeserializer.class)
    public String getFunctionPolicy(){
        return functionPolicy;
    }
 
    public void setFunctionPolicy(String value){
        this.functionPolicy = value;
    }
 
    @XmlAttribute(name="department")
    @XmlJavaTypeAdapter(value=api.util.StringAdapter.class, type=String.class)
    @FormParam("department")
    @StringFormat
    @JsonDeserialize(using = api.util.StringDeserializer.class)
    public String getDepartment(){
        return department;
    }
 
    public void setDepartment(String value){
        this.department = value;
    }
 
    @XmlAttribute(name="securityQuestion")
    @XmlJavaTypeAdapter(value=api.util.StringAdapter.class, type=String.class)
    @FormParam("securityQuestion")
    @StringFormat
    @JsonDeserialize(using = api.util.StringDeserializer.class)
    public String getSecurityQuestion(){
        return securityQuestion;
    }
 
    public void setSecurityQuestion(String value){
        this.securityQuestion = value;
    }
 
    @XmlAttribute(name="securityAnswer")
    @XmlJavaTypeAdapter(value=api.util.StringAdapter.class, type=String.class)
    @FormParam("securityAnswer")
    @StringFormat
    @JsonDeserialize(using = api.util.StringDeserializer.class)
    public String getSecurityAnswer(){
        return securityAnswer;
    }
 
    public void setSecurityAnswer(String value){
        this.securityAnswer = value;
    }
 
    @XmlAttribute(name="licenseAgreementAcceptanceDate")
    @FormParam("licenseAgreementAcceptanceDate")
    @DateFormat
    @JsonDeserialize(using=api.util.DateDeserializer.class)
    public Date getLicenseAgreementAcceptanceDate(){
        return licenseAgreementAcceptanceDate;
    }
 
    public void setLicenseAgreementAcceptanceDate(Date value){
        this.licenseAgreementAcceptanceDate = value;
    }
 
    @XmlAttribute(name="timeZone")
    @XmlJavaTypeAdapter(value=api.util.StringAdapter.class, type=String.class)
    @FormParam("timeZone")
    @StringFormat
    @JsonDeserialize(using = api.util.StringDeserializer.class)
    public String getTimeZone(){
        return timeZone;
    }
 
    public void setTimeZone(String value){
        this.timeZone = value;
    }
 
    @XmlAttribute(name="notes")
    @XmlJavaTypeAdapter(value=api.util.StringAdapter.class, type=String.class)
    @FormParam("notes")
    @StringFormat
    @JsonDeserialize(using = api.util.StringDeserializer.class)
    public String getNotes(){
        return notes;
    }
 
    public void setNotes(String value){
        this.notes = value;
    }
 
    @XmlAttribute(name="defaultMerchantCode")
    @XmlJavaTypeAdapter(value=api.util.IntegerAdapter.class, type=Integer.class)
    @FormParam("defaultMerchantCode")
    @IntegerFormat
    @JsonDeserialize(using=api.util.NumberDeserializer.class)
    public Integer getDefaultMerchantCode(){
        return defaultMerchantCode;
    }
 
    public void setDefaultMerchantCode(Integer value){
        this.defaultMerchantCode = value;
    }
 
    @XmlAttribute(name="defaultMerchantAccountCode")
    @XmlJavaTypeAdapter(value=api.util.IntegerAdapter.class, type=Integer.class)
    @FormParam("defaultMerchantAccountCode")
    @IntegerFormat
    @JsonDeserialize(using=api.util.NumberDeserializer.class)
    public Integer getDefaultMerchantAccountCode(){
        return defaultMerchantAccountCode;
    }
 
    public void setDefaultMerchantAccountCode(Integer value){
        this.defaultMerchantAccountCode = value;
    }
 
    @XmlAttribute(name="owner")
    @XmlJavaTypeAdapter(value=api.util.StringAdapter.class, type=String.class)
    @FormParam("owner")
    @StringFormat
    @JsonDeserialize(using = api.util.StringDeserializer.class)
    public String getOwner(){
        return owner;
    }
 
    public void setOwner(String value){
        this.owner = value;
    }
 
    @XmlAttribute(name="ownerCode")
    @XmlJavaTypeAdapter(value=api.util.IntegerAdapter.class, type=Integer.class)
    @FormParam("ownerCode")
    @IntegerFormat
    @JsonDeserialize(using=api.util.NumberDeserializer.class)
    public Integer getOwnerCode(){
        return ownerCode;
    }
 
    public void setOwnerCode(Integer value){
        this.ownerCode = value;
    }
 
    @XmlAttribute(name="secretKey")
    @XmlJavaTypeAdapter(value=api.util.StringAdapter.class, type=String.class)
    @FormParam("secretKey")
    @StringFormat
    @JsonDeserialize(using = api.util.StringDeserializer.class)
    public String getSecretKey(){
        return secretKey;
    }
 
    public void setSecretKey(String value){
        this.secretKey = value;
    }
 
    @XmlAttribute(name="privileges")
    @XmlJavaTypeAdapter(value=api.util.IntegerAdapter.class, type=Integer.class)
    @FormParam("privileges")
    @IntegerFormat
    @JsonDeserialize(using=api.util.NumberDeserializer.class)
    public Integer getPrivileges(){
        return privileges;
    }
 
    public void setPrivileges(Integer value){
        this.privileges = value;
    }
 
    @XmlAttribute(name="additionalPassword")
    @XmlJavaTypeAdapter(value=api.util.StringAdapter.class, type=String.class)
    @FormParam("additionalPassword")
    @StringFormat
    @JsonDeserialize(using = api.util.StringDeserializer.class)
    public String getAdditionalPassword(){
        return additionalPassword;
    }
 
    public void setAdditionalPassword(String value){
        this.additionalPassword = value;
    }
 
    @XmlAttribute(name="rawAccountDataModeType")
    @XmlJavaTypeAdapter(value=api.util.StringAdapter.class, type=String.class)
    @FormParam("rawAccountDataModeType")
    @StringFormat
    @JsonDeserialize(using = api.util.StringDeserializer.class)
    @NotNull
    public String getRawAccountDataModeType(){
        return rawAccountDataModeType;
    }
 
    public void setRawAccountDataModeType(String value){
        this.rawAccountDataModeType = value;
    }
 
    @XmlAttribute(name="responseMessageDisplayPolicy")
    @XmlJavaTypeAdapter(value=api.util.StringAdapter.class, type=String.class)
    @FormParam("responseMessageDisplayPolicy")
    @StringFormat
    @JsonDeserialize(using = api.util.StringDeserializer.class)
    @NotNull
    @Size(min = 3, max = 3)
    public String getResponseMessageDisplayPolicy(){
        return responseMessageDisplayPolicy;
    }
 
    public void setResponseMessageDisplayPolicy(String value){
        this.responseMessageDisplayPolicy = value;
    }
 
    @XmlAttribute(name="authenticationMode")
    @XmlJavaTypeAdapter(value=api.util.StringAdapter.class, type=String.class)
    @FormParam("authenticationMode")
    @StringFormat
    @JsonDeserialize(using = api.util.StringDeserializer.class)
    @NotNull
    public String getAuthenticationMode(){
        return authenticationMode;
    }
 
    public void setAuthenticationMode(String value){
        this.authenticationMode = value;
    }
 
    @XmlAttribute(name="statusType")
    @XmlJavaTypeAdapter(value=api.util.StringAdapter.class, type=String.class)
    @FormParam("statusType")
    @StringFormat
    @JsonDeserialize(using = api.util.StringDeserializer.class)
    public String getStatusType(){
        return statusType;
    }
 
    public void setStatusType(String value){
        this.statusType = value;
    }
 
 
    public void audit(AuditHelper helper, ServerObject object) {
        unicore.model.User s_object = (unicore.model.User) object;
        helper.audit("id", id, s_object.getCode());
        helper.audit("code", code, s_object.getRefCode());
        helper.audit("createDate", createDate, s_object.getCreateDate());
        helper.audit("name", name, s_object.getName());
        helper.audit("title", title, s_object.getTitle());
        helper.audit("email", email, s_object.getEmail());
        helper.audit("userName", userName, s_object.getUserName());
        helper.audit("password", password, s_object.getPassword());
        helper.audit("passwordExpirationDate", passwordExpirationDate, s_object.getPasswordExpirationDate());
        helper.audit("securityImage", securityImage, s_object.getSecurityImage());
        helper.audit("failedLoginCount", failedLoginCount, s_object.getFailedLoginCount());
        helper.audit("securityType", securityType, VirtualFields.SecurityType.get(s_object));
        helper.audit("securityLevel", securityLevel, s_object.getSecurityLevel());
        helper.audit("roleCode", roleCode, VirtualFields.RoleCode.get(s_object));
        helper.audit("functionPolicy", functionPolicy, s_object.getFunctionPolicy());
        helper.audit("department", department, s_object.getDepartment());
        helper.audit("securityQuestion", securityQuestion, s_object.getSecurityQuestion());
        helper.audit("securityAnswer", securityAnswer, s_object.getSecurityAnswer());
        helper.audit("licenseAgreementAcceptanceDate", licenseAgreementAcceptanceDate, s_object.getLicenseAgreementAcceptanceDate());
        helper.audit("timeZone", timeZone, s_object.getTimeZoneCode());
        helper.audit("notes", notes, s_object.getNotes());
        helper.audit("defaultMerchantCode", defaultMerchantCode, s_object.getDefaultMerchantCode());
        helper.audit("defaultMerchantAccountCode", defaultMerchantAccountCode, s_object.getDefaultMerchantAccountCode());
        helper.audit("owner", owner, s_object.getOwnerCl() == null ? null : s_object.getOwnerCl().getValue());
        helper.audit("ownerCode", ownerCode, s_object.getOwnerCode());
        helper.audit("secretKey", secretKey, s_object.getSecretKey());
        helper.audit("privileges", privileges, s_object.getPrivileges());
        helper.audit("additionalPassword", additionalPassword, s_object.getAdditionalPassword());
        helper.audit("rawAccountDataModeType", rawAccountDataModeType, s_object.getRawAccountDataModeCl() == null ? null : s_object.getRawAccountDataModeCl().getValue());
        helper.audit("responseMessageDisplayPolicy", responseMessageDisplayPolicy, s_object.getResponseMessageDisplayPolicy());
        helper.audit("authenticationMode", authenticationMode, s_object.getAuthenticationCl() == null ? null : s_object.getAuthenticationCl().getValue());
        helper.audit("statusType", statusType, s_object.getUserStatusCl() == null ? null : s_object.getUserStatusCl().getValue());
 
    }
 
    public static String objectTypeCode(){
        return "user";
    }
 
}