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 = "enseignant")
public class Enseignant extends Personne implements KvmSerializable {
@DatabaseField
public String localBureau;
@DatabaseField
public String telephone;
@DatabaseField
public String enseignantPrincipal;
public Enseignant() {
}
public Enseignant(AttributeContainer inObj, ExtendedSoapSerializationEnvelope envelope) {
super(inObj, envelope);
if (inObj == null)
return;
SoapObject soapObject = (SoapObject) inObj;
if (soapObject.hasProperty("localBureau")) {
Object obj = soapObject.getProperty("localBureau");
if (obj != null && obj.getClass().equals(SoapPrimitive.class)) {
SoapPrimitive j = (SoapPrimitive) obj;
if (j.toString() != null) {
localBureau = j.toString();
}
} else if (obj != null && obj instanceof String) {
localBureau = (String) obj;
}
}
if (soapObject.hasProperty("telephone")) {
Object obj = soapObject.getProperty("telephone");
if (obj != null && obj.getClass().equals(SoapPrimitive.class)) {
SoapPrimitive j = (SoapPrimitive) obj;
if (j.toString() != null) {
telephone = j.toString();
}
} else if (obj != null && obj instanceof String) {
telephone = (String) obj;
}
}
if (soapObject.hasProperty("enseignantPrincipal")) {
Object obj = soapObject.getProperty("enseignantPrincipal");
if (obj != null && obj.getClass().equals(SoapPrimitive.class)) {
SoapPrimitive j = (SoapPrimitive) obj;
if (j.toString() != null) {
enseignantPrincipal = j.toString();
}
} else if (obj != null && obj instanceof String) {
enseignantPrincipal = (String) obj;
}
}
}
@Override
public Object getProperty(int propertyIndex) {
int count = super.getPropertyCount();
if (propertyIndex == count + 0) {
return localBureau;
}
if (propertyIndex == count + 1) {
return telephone;
}
if (propertyIndex == count + 2) {
return enseignantPrincipal;
}
return super.getProperty(propertyIndex);
}
@Override
public int getPropertyCount() {
return super.getPropertyCount() + 3;
}
@Override
public void getPropertyInfo(int propertyIndex, @SuppressWarnings("rawtypes") Hashtable arg1, PropertyInfo info) {
int count = super.getPropertyCount();
if (propertyIndex == count + 0) {
info.type = PropertyInfo.STRING_CLASS;
info.name = "localBureau";
info.namespace = "http://etsmtl.ca/";
}
if (propertyIndex == count + 1) {
info.type = PropertyInfo.STRING_CLASS;
info.name = "telephone";
info.namespace = "http://etsmtl.ca/";
}
if (propertyIndex == count + 2) {
info.type = PropertyInfo.STRING_CLASS;
info.name = "enseignantPrincipal";
info.namespace = "http://etsmtl.ca/";
}
super.getPropertyInfo(propertyIndex, arg1, info);
}
@Override
public void setProperty(int arg0, Object arg1) {
}
}