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 = "cours") public class Cours extends AttributeContainer implements KvmSerializable { @DatabaseField public String sigle; @DatabaseField public String groupe; @DatabaseField public String session; @DatabaseField public String programmeEtudes; @DatabaseField public String cote; @DatabaseField public Integer nbCredits = 0; @DatabaseField public String titreCours; @DatabaseField(id = true) public int id; public Cours() { } public Cours(AttributeContainer inObj, ExtendedSoapSerializationEnvelope envelope) { if (inObj == null) return; SoapObject soapObject = (SoapObject) inObj; if (soapObject.hasProperty("sigle")) { Object obj = soapObject.getProperty("sigle"); if (obj != null && obj.getClass().equals(SoapPrimitive.class)) { SoapPrimitive j = (SoapPrimitive) obj; if (j.toString() != null) { sigle = j.toString(); } } else if (obj != null && obj instanceof String) { sigle = (String) obj; } } if (soapObject.hasProperty("groupe")) { Object obj = soapObject.getProperty("groupe"); if (obj != null && obj.getClass().equals(SoapPrimitive.class)) { SoapPrimitive j = (SoapPrimitive) obj; if (j.toString() != null) { groupe = j.toString(); } } else if (obj != null && obj instanceof String) { groupe = (String) obj; } } if (soapObject.hasProperty("session")) { Object obj = soapObject.getProperty("session"); if (obj != null && obj.getClass().equals(SoapPrimitive.class)) { SoapPrimitive j = (SoapPrimitive) obj; if (j.toString() != null) { session = j.toString(); } } else if (obj != null && obj instanceof String) { session = (String) obj; } } if (soapObject.hasProperty("programmeEtudes")) { Object obj = soapObject.getProperty("programmeEtudes"); if (obj != null && obj.getClass().equals(SoapPrimitive.class)) { SoapPrimitive j = (SoapPrimitive) obj; if (j.toString() != null) { programmeEtudes = j.toString(); } } else if (obj != null && obj instanceof String) { programmeEtudes = (String) obj; } } if (soapObject.hasProperty("cote")) { Object obj = soapObject.getProperty("cote"); if (obj != null && obj.getClass().equals(SoapPrimitive.class)) { SoapPrimitive j = (SoapPrimitive) obj; if (j.toString() != null) { cote = j.toString(); } } else if (obj != null && obj instanceof String) { cote = (String) obj; } } if (soapObject.hasProperty("nbCredits")) { Object obj = soapObject.getProperty("nbCredits"); if (obj != null && obj.getClass().equals(SoapPrimitive.class)) { SoapPrimitive j = (SoapPrimitive) obj; if (j.toString() != null) { nbCredits = Integer.parseInt(j.toString()); } } else if (obj != null && obj instanceof Integer) { nbCredits = (Integer) obj; } } if (soapObject.hasProperty("titreCours")) { Object obj = soapObject.getProperty("titreCours"); if (obj != null && obj.getClass().equals(SoapPrimitive.class)) { SoapPrimitive j = (SoapPrimitive) obj; if (j.toString() != null) { titreCours = j.toString(); } } else if (obj != null && obj instanceof String) { titreCours = (String) obj; } } } @Override public Object getProperty(int propertyIndex) { if (propertyIndex == 0) { return sigle; } if (propertyIndex == 1) { return groupe; } if (propertyIndex == 2) { return session; } if (propertyIndex == 3) { return programmeEtudes; } if (propertyIndex == 4) { return cote; } if (propertyIndex == 5) { return nbCredits; } if (propertyIndex == 6) { return titreCours; } return null; } @Override public int getPropertyCount() { return 7; } @Override public void getPropertyInfo(int propertyIndex, @SuppressWarnings("rawtypes") Hashtable arg1, PropertyInfo info) { if (propertyIndex == +0) { info.type = PropertyInfo.STRING_CLASS; info.name = "sigle"; info.namespace = "http://etsmtl.ca/"; } if (propertyIndex == +1) { info.type = PropertyInfo.STRING_CLASS; info.name = "groupe"; info.namespace = "http://etsmtl.ca/"; } if (propertyIndex == +2) { info.type = PropertyInfo.STRING_CLASS; info.name = "session"; info.namespace = "http://etsmtl.ca/"; } if (propertyIndex == +3) { info.type = PropertyInfo.STRING_CLASS; info.name = "programmeEtudes"; info.namespace = "http://etsmtl.ca/"; } if (propertyIndex == +4) { info.type = PropertyInfo.STRING_CLASS; info.name = "cote"; info.namespace = "http://etsmtl.ca/"; } if (propertyIndex == +5) { info.type = PropertyInfo.INTEGER_CLASS; info.name = "nbCredits"; info.namespace = "http://etsmtl.ca/"; } if (propertyIndex == +6) { info.type = PropertyInfo.STRING_CLASS; info.name = "titreCours"; info.namespace = "http://etsmtl.ca/"; } } @Override public void setProperty(int arg0, Object arg1) { } }