package org.gcube.portlets.admin.createusers.shared;

import com.google.gwt.user.client.rpc.SerializationException;
import com.google.gwt.user.client.rpc.SerializationStreamReader;
import com.google.gwt.user.client.rpc.SerializationStreamWriter;
import com.google.gwt.user.client.rpc.impl.ReflectionHelper;

@SuppressWarnings("deprecation")
public class VreUserBean_FieldSerializer implements com.google.gwt.user.client.rpc.impl.TypeHandler {
  private static native java.lang.String getCompany(org.gcube.portlets.admin.createusers.shared.VreUserBean instance) /*-{
    return instance.@org.gcube.portlets.admin.createusers.shared.VreUserBean::company;
  }-*/;
  
  private static native void setCompany(org.gcube.portlets.admin.createusers.shared.VreUserBean instance, java.lang.String value) 
  /*-{
    instance.@org.gcube.portlets.admin.createusers.shared.VreUserBean::company = value;
  }-*/;
  
  private static native java.lang.String getEmail(org.gcube.portlets.admin.createusers.shared.VreUserBean instance) /*-{
    return instance.@org.gcube.portlets.admin.createusers.shared.VreUserBean::email;
  }-*/;
  
  private static native void setEmail(org.gcube.portlets.admin.createusers.shared.VreUserBean instance, java.lang.String value) 
  /*-{
    instance.@org.gcube.portlets.admin.createusers.shared.VreUserBean::email = value;
  }-*/;
  
  private static native boolean getIsMale(org.gcube.portlets.admin.createusers.shared.VreUserBean instance) /*-{
    return instance.@org.gcube.portlets.admin.createusers.shared.VreUserBean::isMale;
  }-*/;
  
  private static native void setIsMale(org.gcube.portlets.admin.createusers.shared.VreUserBean instance, boolean value) 
  /*-{
    instance.@org.gcube.portlets.admin.createusers.shared.VreUserBean::isMale = value;
  }-*/;
  
  private static native java.lang.String getName(org.gcube.portlets.admin.createusers.shared.VreUserBean instance) /*-{
    return instance.@org.gcube.portlets.admin.createusers.shared.VreUserBean::name;
  }-*/;
  
  private static native void setName(org.gcube.portlets.admin.createusers.shared.VreUserBean instance, java.lang.String value) 
  /*-{
    instance.@org.gcube.portlets.admin.createusers.shared.VreUserBean::name = value;
  }-*/;
  
  private static native boolean getPasswordChanged(org.gcube.portlets.admin.createusers.shared.VreUserBean instance) /*-{
    return instance.@org.gcube.portlets.admin.createusers.shared.VreUserBean::passwordChanged;
  }-*/;
  
  private static native void setPasswordChanged(org.gcube.portlets.admin.createusers.shared.VreUserBean instance, boolean value) 
  /*-{
    instance.@org.gcube.portlets.admin.createusers.shared.VreUserBean::passwordChanged = value;
  }-*/;
  
  @com.google.gwt.core.client.UnsafeNativeLong
  private static native long getRegisrationDate(org.gcube.portlets.admin.createusers.shared.VreUserBean instance) /*-{
    return instance.@org.gcube.portlets.admin.createusers.shared.VreUserBean::regisrationDate;
  }-*/;
  
  @com.google.gwt.core.client.UnsafeNativeLong
  private static native void setRegisrationDate(org.gcube.portlets.admin.createusers.shared.VreUserBean instance, long value) 
  /*-{
    instance.@org.gcube.portlets.admin.createusers.shared.VreUserBean::regisrationDate = value;
  }-*/;
  
  private static native java.lang.String getSurname(org.gcube.portlets.admin.createusers.shared.VreUserBean instance) /*-{
    return instance.@org.gcube.portlets.admin.createusers.shared.VreUserBean::surname;
  }-*/;
  
  private static native void setSurname(org.gcube.portlets.admin.createusers.shared.VreUserBean instance, java.lang.String value) 
  /*-{
    instance.@org.gcube.portlets.admin.createusers.shared.VreUserBean::surname = value;
  }-*/;
  
  public static void deserialize(SerializationStreamReader streamReader, org.gcube.portlets.admin.createusers.shared.VreUserBean instance) throws SerializationException {
    setCompany(instance, streamReader.readString());
    setEmail(instance, streamReader.readString());
    setIsMale(instance, streamReader.readBoolean());
    setName(instance, streamReader.readString());
    setPasswordChanged(instance, streamReader.readBoolean());
    setRegisrationDate(instance, streamReader.readLong());
    setSurname(instance, streamReader.readString());
    
  }
  
  public static org.gcube.portlets.admin.createusers.shared.VreUserBean instantiate(SerializationStreamReader streamReader) throws SerializationException {
    return new org.gcube.portlets.admin.createusers.shared.VreUserBean();
  }
  
  public static void serialize(SerializationStreamWriter streamWriter, org.gcube.portlets.admin.createusers.shared.VreUserBean instance) throws SerializationException {
    streamWriter.writeString(getCompany(instance));
    streamWriter.writeString(getEmail(instance));
    streamWriter.writeBoolean(getIsMale(instance));
    streamWriter.writeString(getName(instance));
    streamWriter.writeBoolean(getPasswordChanged(instance));
    streamWriter.writeLong(getRegisrationDate(instance));
    streamWriter.writeString(getSurname(instance));
    
  }
  
  public Object create(SerializationStreamReader reader) throws SerializationException {
    return org.gcube.portlets.admin.createusers.shared.VreUserBean_FieldSerializer.instantiate(reader);
  }
  
  public void deserial(SerializationStreamReader reader, Object object) throws SerializationException {
    org.gcube.portlets.admin.createusers.shared.VreUserBean_FieldSerializer.deserialize(reader, (org.gcube.portlets.admin.createusers.shared.VreUserBean)object);
  }
  
  public void serial(SerializationStreamWriter writer, Object object) throws SerializationException {
    org.gcube.portlets.admin.createusers.shared.VreUserBean_FieldSerializer.serialize(writer, (org.gcube.portlets.admin.createusers.shared.VreUserBean)object);
  }
  
}
