mel.maven.camel-salesforce-maven-plugin.2.12.0.source-code.sobject-pojo.vm Maven / Gradle / Ivy
## sobject-pojo.vm
/*
* Salesforce DTO generated by camel-salesforce-maven-plugin
* Generated on: $generatedDate
*/
package $packageName;
## add imports for XStreamConverter and PicklistEnumConverter if needed
#set ( $hasPicklists = $utility.hasPicklists($desc) )
import com.thoughtworks.xstream.annotations.XStreamAlias;
#if ( $hasPicklists )
import com.thoughtworks.xstream.annotations.XStreamConverter;
#end
import org.codehaus.jackson.annotate.JsonProperty;
#if ( $hasPicklists )
import org.apache.camel.component.salesforce.api.PicklistEnumConverter;
#end
import org.apache.camel.component.salesforce.api.dto.AbstractSObjectBase;
/**
* Salesforce DTO for SObject $desc.Name
*/
@XStreamAlias("$desc.Name")
public class $desc.Name extends AbstractSObjectBase {
#foreach ( $field in $desc.Fields )
#if ( $utility.notBaseField($field.Name) )
#set ( $fieldName = $field.Name )
#set ( $fieldType = $utility.getFieldType($field) )
// $fieldName
#if ( $utility.isBlobField($field) )
#set ( $propertyName = $fieldName + "Url" )
#else
#set ( $propertyName = $fieldName )
#end
## add a converter annotation if needed
#if ( $utility.isPicklist($field) )
@XStreamConverter(PicklistEnumConverter.class)
#else
## add an alias for blob field url if needed
#if ( $propertyName != $fieldName )
// blob field url, use getBlobField to get the content
@XStreamAlias("$fieldName")
#end
#end
private $fieldType $propertyName;
@JsonProperty("$fieldName")
public $fieldType get$propertyName() {
return this.$propertyName;
}
@JsonProperty("$fieldName")
public void set$propertyName($fieldType $propertyName) {
this.$propertyName = $propertyName;
}
#end
#end
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy