All Downloads are FREE. Search and download functionalities are using the official Maven repository.

mel.camel-salesforce-codegen.3.19.0.source-code.sobject-pojo-optional.vm Maven / Gradle / Ivy

There is a newer version: 4.9.0
Show newest version
## ------------------------------------------------------------------------
## Licensed to the Apache Software Foundation (ASF) under one or more
## contributor license agreements.  See the NOTICE file distributed with
## this work for additional information regarding copyright ownership.
## The ASF licenses this file to You under the Apache License, Version 2.0
## (the "License"); you may not use this file except in compliance with
## the License.  You may obtain a copy of the License at
##
## http://www.apache.org/licenses/LICENSE-2.0
##
## Unless required by applicable law or agreed to in writing, software
## distributed under the License is distributed on an "AS IS" BASIS,
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
## See the License for the specific language governing permissions and
## limitations under the License.
## ------------------------------------------------------------------------
## sobject-pojo.vm
/*
 * Salesforce DTO generated by camel-salesforce-maven-plugin
 */
package $packageName;

import java.util.Optional;

import javax.annotation.Generated;

#set ( $hasPicklists = $utility.hasPicklists($desc) )
#set ( $hasMultiSelectPicklists = $utility.hasMultiSelectPicklists($desc) )
#if ( $hasMultiSelectPicklists )
#if ( $useStringsForPicklists )
import org.apache.camel.component.salesforce.api.StringMultiSelectPicklistDeserializer;
import org.apache.camel.component.salesforce.api.StringMultiSelectPicklistSerializer;
#else
import org.apache.camel.component.salesforce.api.MultiSelectPicklistDeserializer;
import org.apache.camel.component.salesforce.api.MultiSelectPicklistSerializer;
#end
#end
import org.apache.camel.component.salesforce.api.dto.AbstractSObjectBase;
import com.fasterxml.jackson.annotation.JsonProperty;
#if ( $hasMultiSelectPicklists )
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
#end

/**
 * Salesforce DTO for SObject $desc.Name
 */
@Generated("org.apache.camel.maven.CamelSalesforceMojo")
public class ${desc.Name}Optional extends AbstractSObjectBase {

#foreach ( $field in $desc.Fields )
#set ( $fieldType = $utility.getFieldType($desc, $field) )
#if ( $utility.notBaseField($field.Name) )
#set ( $fieldName = $field.Name )
#set ( $isMultiSelectPicklist = $utility.isMultiSelectPicklist($field) )
    // $fieldName
#if ( $utility.isBlobField($field) )
#set ( $propertyName = $fieldName + "Url" )
#else
#set ( $propertyName = $fieldName )
#end
#else
#end
    private Optional<$fieldType> $propertyName;

    @JsonProperty("$fieldName")
#if ( $isMultiSelectPicklist )
#if ( $useStringsForPicklists )
    @JsonSerialize(using = StringMultiSelectPicklistSerializer.class)
#else
    @JsonSerialize(using = MultiSelectPicklistSerializer.class)
#end
#end
    public Optional<$fieldType> get$propertyName() {
        return this.$propertyName;
    }

    @JsonProperty("$fieldName")
#if ( $isMultiSelectPicklist )
#if ( $useStringsForPicklists )
    @JsonDeserialize(using = StringMultiSelectPicklistDeserializer.class)
#else
    @JsonDeserialize(using = MultiSelectPicklistDeserializer.class)
#end
#end
    public void set$propertyName(Optional<$fieldType> $propertyName) {
        this.$propertyName = $propertyName;
    }

#end
#end
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy