class ReadableOptinPopulator extends AbstractDataPopulator<Optin, ReadableOptin> {

	@Override
	public ReadableOptin populate(Optin source, ReadableOptin target, MerchantStore store, Language language)
			throws ConversionException {<FILL_FUNCTION_BODY>}

	@Override
	protected ReadableOptin createTarget() {
		// TODO Auto-generated method stub
		return null;
	}

}

		Validate.notNull(store,"MerchantStore cannot be null");
		Validate.notNull(source,"Optin cannot be null");
		
		if(target==null) {
			target = new ReadableOptin();
		}
		
		target.setCode(source.getCode());
		target.setDescription(source.getDescription());
		target.setEndDate(source.getEndDate());
		target.setId(source.getId());
		target.setOptinType(source.getOptinType().name());
		target.setStartDate(source.getStartDate());
		target.setStore(store.getCode());

		return target;
	
<methods>public non-sealed void <init>() ,public java.util.Locale getLocale() ,public com.salesmanager.shop.model.system.ReadableOptin populate(com.salesmanager.core.model.system.optin.Optin, com.salesmanager.core.model.merchant.MerchantStore, com.salesmanager.core.model.reference.language.Language) throws com.salesmanager.core.business.exception.ConversionException,public void setLocale(java.util.Locale) <variables>private java.util.Locale locale