⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bcnewlead.java

📁 与SaaS软件提供的WebService的接口进行连通
💻 JAVA
字号:
package jgd.ebridgechina.bizComp;

import com.sforce.soap.enterprise.sobject.Lead;

/**
 * bcNewLead Class is the instance Class for new Lead.
 * User can produce an Lead instance as following steps:
 * <p></p>
 * <p>bcNewLead nlead = new bcNewLead();</p>
 * <p>nlead.putbcLeadSurname("Wang");</p>
 * <p>......//set other information of an new lead</p>
 * <p>Lead nl = nlead.getLead();</p>
 * <p></p>
 * @author guowei
 *
 */
public class bcNewLead {
	//The following code are perporties of new lead
	private String bcLeadSurName;
	private String bcLeadFamilyName;
	private String bcLeadCompany;
	private String bcLeadTel;
	private String bcLeadSelfPhone;
	private String bcLeadFax;
	private String bcLeadEmail;
	private String bcLeadWebSite;
	private String bcLeadCountry;
	private String bcLeadZipCode;
	private String bcLeadState;
	private String bcLeadCity;
	private String bcLeadStreet;
	private String bcLeadDescription;
	
	/**
	 * Get lead properties
	 * @return
	 */
	public String getbcLeadSurName(){return this.bcLeadSurName;}
	
	/**
	 * Get lead Family Name
	 * @return
	 */
	public String getbcLeadFamilyName(){return this.bcLeadFamilyName;}
	
	/**
	 * Get lead Company
	 * @return
	 */
	public String getbcLeadCompany(){return this.bcLeadCompany;}
	
	/**
	 *Get lead Office Telphone 
	 * @return
	 */
	public String getbcLeadTel(){return this.bcLeadTel;}
	
	/**
	 * Get lead Mobile Phone
	 * @return
	 */
	public String getbcLeadSelfPhone(){return this.bcLeadSelfPhone;}
	
	/**
	 * Get lead Fax Number
	 * @return
	 */
	public String getbcLeadFax(){return this.bcLeadFax;}
	
	/**
	 * Get lead Email Address
	 * @return
	 */
	public String getbcLeadEmail(){return this.bcLeadEmail;}
	
	/**
	 * Get lead Website
	 * @return
	 */
	public String getbcLeadWebSite(){return this.bcLeadWebSite;}
	
	/**
	 * Get led Country
	 * @return
	 */
	public String getbcLeadCountry(){return this.bcLeadCountry;}
	
	/**
	 * Get lead Postcode
	 * @return
	 */
	public String getbcLeadZipCode(){return this.bcLeadZipCode;}
	
	/**
	 * Get lead State
	 * @return
	 */
	public String getbcLeadState(){return this.bcLeadState;}
	
	/**
	 * Get lead City
	 * @return
	 */
	public String getbcLeadCity(){return this.bcLeadCity;}
	
	/**
	 * Get lead Street
	 * @return
	 */
	public String getbcLeadStreet(){return this.bcLeadStreet;}
	
	/**
	 * Get lead self-Description
	 * @return
	 */
	public String getbcLeadDescription(){return this.bcLeadDescription;}
	
	/**
	 * Set lead Surname
	 * @param leadSurName 
	 * @return
	 */
	public boolean putbcLeadSurName(String leadSurName){
		this.bcLeadSurName = leadSurName;
		return true;
	}
	
	/**
	 * Set lead Family Name
	 * @param leadFamilyName
	 * @return
	 */
	public boolean putbcLeadFamilyName(String leadFamilyName){
		this.bcLeadFamilyName = leadFamilyName;
		return true;
	}
	
	/**
	 * Set lead Company Name
	 * @param leadCompany
	 * @return
	 */
	public boolean putbcLeadCompany(String leadCompany){
		this.bcLeadCompany = leadCompany;
		return true;
	}
	
	/**
	 * Set lead Office Telphone Number
	 * @param leadTel
	 * @return
	 */
	public boolean putbcLeadTel(String leadTel){
		this.bcLeadTel = leadTel;
		return true;
	}
	
	/**
	 * Set lead Mobile Phone
	 * @param leadSelfPhone
	 * @return
	 */
	public boolean putbcLeadSelfPhone(String leadSelfPhone){
		this.bcLeadSelfPhone = leadSelfPhone;
		return true;
	}
	
	/**
	 * Set lead Fax Number
	 * @param leadFax
	 * @return
	 */
	public boolean putbcLeadFax(String leadFax){
		this.bcLeadFax = leadFax;
		return true;
	}
	
	/**
	 * Set lead Email Address
	 * @param leadEmail
	 * @return
	 */
	public boolean putbcLeadEmail(String leadEmail){
		this.bcLeadEmail = leadEmail;
		return true;
	}
	
	/**
	 * Set lead Company or personal WebSite,generally speaking,
	 * Company WebSite
	 * 
	 * @param leadWebSite
	 * @return
	 */
	public boolean putbcLeadWebSite(String leadWebSite){
		this.bcLeadWebSite = leadWebSite;
		return true;
	}
	
	/**
	 * Set lead Country for his Company
	 * @param leadCountry
	 * @return
	 */
	public boolean putbcLeadCountry(String leadCountry){
		this.bcLeadCountry = leadCountry;
		return true;
	}
	
	/**
	 * Set lead Company Postcode
	 * @param leadZipCode
	 * @return
	 */
	public boolean putbcLeadZipCode(String leadZipCode){
		this.bcLeadZipCode = leadZipCode;
		return true;
	}
	
	/**
	 * Set lead State
	 * @param leadState
	 * @return
	 */
	public boolean putbcLeadState(String leadState){
		this.bcLeadState = leadState;
		return true;
	}
	
	/**
	 * Set  City of lead Company
	 * @param leadCity
	 * @return
	 */
	public boolean putbcLeadCity(String leadCity){
		this.bcLeadCity = leadCity;
		return true;
	}
	
	/**
	 * Set Street of lead Company 
	 * @param leadStreet
	 * @return
	 */
	public boolean putbcLeadStreet(String leadStreet){
		this.bcLeadStreet = leadStreet;
		return true;
	}
	
	/**
	 * Set Description to lead
	 * @param leadDescription
	 * @return
	 */
	public boolean putbcLeadDescription(String leadDescription){
		this.bcLeadDescription = leadDescription;
		return true;
	}	
	
	/**
	 * Convert lead information into lead Class
	 * @return Class Lead instance following the information above
	 */
	public Lead getLead(){
		if(this.bcLeadSurName == null || this.bcLeadCompany == null){
			System.out.println("You at least add lead's family name and company!");
			return null;
		}
		Lead sfLead = new Lead();
		if(this.bcLeadFamilyName != null){
			sfLead.setFirstName(this.bcLeadFamilyName);
		}
		if(this.bcLeadSurName != null){
			sfLead.setLastName(this.bcLeadSurName);
		}
		if(this.bcLeadCompany != null){
			sfLead.setCompany(this.bcLeadCompany);
		}
		if(this.bcLeadTel != null){
			sfLead.setPhone(this.bcLeadTel);
		}
		if(this.bcLeadSelfPhone != null){
			sfLead.setMobilePhone(this.bcLeadSelfPhone);
		}
		if(this.bcLeadFax != null){
			sfLead.setFax(this.bcLeadFax);
		}
		if(this.bcLeadEmail != null){
			sfLead.setEmail(this.bcLeadEmail);
		}
		if(this.bcLeadWebSite != null){
			sfLead.setWebsite(this.bcLeadWebSite);
		}
		if(this.bcLeadCountry != null){
			sfLead.setCountry(this.bcLeadCountry);
		}
		if(this.bcLeadZipCode != null){
			sfLead.setPostalCode(this.bcLeadZipCode);
		}
		if(this.bcLeadState != null){
			sfLead.setState(this.bcLeadState);
		}
		if(this.bcLeadCity != null){
			sfLead.setCity(this.bcLeadCity);
		}
		if(this.bcLeadStreet != null){
			sfLead.setStreet(this.bcLeadStreet);
		}
		if(this.bcLeadDescription != null){
			sfLead.setDescription(this.bcLeadDescription);
		}
		
		return sfLead;
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -