package ca.etsmtl.applets.etsmobile.model;
//----------------------------------------------------
//
// Generated by www.easywsdl.com
// Version: 2.0.0.4
//
// Created by Quasar Development at 15-01-2014
//
//---------------------------------------------------
import java.util.Hashtable;
import org.ksoap2.serialization.AttributeContainer;
import org.ksoap2.serialization.KvmSerializable;
import org.ksoap2.serialization.PropertyInfo;
import org.ksoap2.serialization.SoapObject;
import org.ksoap2.serialization.SoapPrimitive;
import ca.etsmtl.applets.etsmobile.http.soap.ExtendedSoapSerializationEnvelope;
import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;
@DatabaseTable(tableName = "personne")
public class Personne extends AttributeContainer implements KvmSerializable {
@DatabaseField
public String nom;
@DatabaseField
public String prenom;
@DatabaseField(id = true)
public String courriel;
public Personne() {
}
public Personne(AttributeContainer inObj, ExtendedSoapSerializationEnvelope envelope) {
if (inObj == null)
return;
SoapObject soapObject = (SoapObject) inObj;
if (soapObject.hasProperty("nom")) {
Object obj = soapObject.getProperty("nom");
if (obj != null && obj.getClass().equals(SoapPrimitive.class)) {
SoapPrimitive j = (SoapPrimitive) obj;
if (j.toString() != null) {
nom = j.toString();
}
} else if (obj != null && obj instanceof String) {
nom = (String) obj;
}
}
if (soapObject.hasProperty("prenom")) {
Object obj = soapObject.getProperty("prenom");
if (obj != null && obj.getClass().equals(SoapPrimitive.class)) {
SoapPrimitive j = (SoapPrimitive) obj;
if (j.toString() != null) {
prenom = j.toString();
}
} else if (obj != null && obj instanceof String) {
prenom = (String) obj;
}
}
if (soapObject.hasProperty("courriel")) {
Object obj = soapObject.getProperty("courriel");
if (obj != null && obj.getClass().equals(SoapPrimitive.class)) {
SoapPrimitive j = (SoapPrimitive) obj;
if (j.toString() != null) {
courriel = j.toString();
}
} else if (obj != null && obj instanceof String) {
courriel = (String) obj;
}
}
}
@Override
public Object getProperty(int propertyIndex) {
if (propertyIndex == 0) {
return nom;
}
if (propertyIndex == 1) {
return prenom;
}
if (propertyIndex == 2) {
return courriel;
}
return null;
}
@Override
public int getPropertyCount() {
return 3;
}
@Override
public void getPropertyInfo(int propertyIndex, @SuppressWarnings("rawtypes") Hashtable arg1, PropertyInfo info) {
if (propertyIndex == +0) {
info.type = PropertyInfo.STRING_CLASS;
info.name = "nom";
info.namespace = "http://etsmtl.ca/";
}
if (propertyIndex == +1) {
info.type = PropertyInfo.STRING_CLASS;
info.name = "prenom";
info.namespace = "http://etsmtl.ca/";
}
if (propertyIndex == +2) {
info.type = PropertyInfo.STRING_CLASS;
info.name = "courriel";
info.namespace = "http://etsmtl.ca/";
}
}
@Override
public void setProperty(int arg0, Object arg1) {
}
}