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

org.apache.camel.component.jdbc.JdbcEndpointConfigurer Maven / Gradle / Ivy

The newest version!
/* Generated by camel build tools - do NOT edit this file! */
package org.apache.camel.component.jdbc;

import javax.annotation.processing.Generated;
import java.util.Map;

import org.apache.camel.CamelContext;
import org.apache.camel.spi.ExtendedPropertyConfigurerGetter;
import org.apache.camel.spi.PropertyConfigurerGetter;
import org.apache.camel.spi.ConfigurerStrategy;
import org.apache.camel.spi.GeneratedPropertyConfigurer;
import org.apache.camel.util.CaseInsensitiveMap;
import org.apache.camel.support.component.PropertyConfigurerSupport;

/**
 * Generated by camel build tools - do NOT edit this file!
 */
@Generated("org.apache.camel.maven.packaging.EndpointSchemaGeneratorMojo")
@SuppressWarnings("unchecked")
public class JdbcEndpointConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter {

    @Override
    public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
        JdbcEndpoint target = (JdbcEndpoint) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "allownamedparameters":
        case "allowNamedParameters": target.setAllowNamedParameters(property(camelContext, boolean.class, value)); return true;
        case "beanrowmapper":
        case "beanRowMapper": target.setBeanRowMapper(property(camelContext, org.apache.camel.component.jdbc.BeanRowMapper.class, value)); return true;
        case "connectionstrategy":
        case "connectionStrategy": target.setConnectionStrategy(property(camelContext, org.apache.camel.component.jdbc.ConnectionStrategy.class, value)); return true;
        case "lazystartproducer":
        case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
        case "outputclass":
        case "outputClass": target.setOutputClass(property(camelContext, java.lang.String.class, value)); return true;
        case "outputtype":
        case "outputType": target.setOutputType(property(camelContext, org.apache.camel.component.jdbc.JdbcOutputType.class, value)); return true;
        case "parameters": target.setParameters(property(camelContext, java.util.Map.class, value)); return true;
        case "preparestatementstrategy":
        case "prepareStatementStrategy": target.setPrepareStatementStrategy(property(camelContext, org.apache.camel.component.jdbc.JdbcPrepareStatementStrategy.class, value)); return true;
        case "readsize":
        case "readSize": target.setReadSize(property(camelContext, int.class, value)); return true;
        case "resetautocommit":
        case "resetAutoCommit": target.setResetAutoCommit(property(camelContext, boolean.class, value)); return true;
        case "transacted": target.setTransacted(property(camelContext, boolean.class, value)); return true;
        case "usegetbytesforblob":
        case "useGetBytesForBlob": target.setUseGetBytesForBlob(property(camelContext, boolean.class, value)); return true;
        case "useheadersasparameters":
        case "useHeadersAsParameters": target.setUseHeadersAsParameters(property(camelContext, boolean.class, value)); return true;
        case "usejdbc4columnnameandlabelsemantics":
        case "useJDBC4ColumnNameAndLabelSemantics": target.setUseJDBC4ColumnNameAndLabelSemantics(property(camelContext, boolean.class, value)); return true;
        default: return false;
        }
    }

    @Override
    public Class getOptionType(String name, boolean ignoreCase) {
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "allownamedparameters":
        case "allowNamedParameters": return boolean.class;
        case "beanrowmapper":
        case "beanRowMapper": return org.apache.camel.component.jdbc.BeanRowMapper.class;
        case "connectionstrategy":
        case "connectionStrategy": return org.apache.camel.component.jdbc.ConnectionStrategy.class;
        case "lazystartproducer":
        case "lazyStartProducer": return boolean.class;
        case "outputclass":
        case "outputClass": return java.lang.String.class;
        case "outputtype":
        case "outputType": return org.apache.camel.component.jdbc.JdbcOutputType.class;
        case "parameters": return java.util.Map.class;
        case "preparestatementstrategy":
        case "prepareStatementStrategy": return org.apache.camel.component.jdbc.JdbcPrepareStatementStrategy.class;
        case "readsize":
        case "readSize": return int.class;
        case "resetautocommit":
        case "resetAutoCommit": return boolean.class;
        case "transacted": return boolean.class;
        case "usegetbytesforblob":
        case "useGetBytesForBlob": return boolean.class;
        case "useheadersasparameters":
        case "useHeadersAsParameters": return boolean.class;
        case "usejdbc4columnnameandlabelsemantics":
        case "useJDBC4ColumnNameAndLabelSemantics": return boolean.class;
        default: return null;
        }
    }

    @Override
    public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
        JdbcEndpoint target = (JdbcEndpoint) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "allownamedparameters":
        case "allowNamedParameters": return target.isAllowNamedParameters();
        case "beanrowmapper":
        case "beanRowMapper": return target.getBeanRowMapper();
        case "connectionstrategy":
        case "connectionStrategy": return target.getConnectionStrategy();
        case "lazystartproducer":
        case "lazyStartProducer": return target.isLazyStartProducer();
        case "outputclass":
        case "outputClass": return target.getOutputClass();
        case "outputtype":
        case "outputType": return target.getOutputType();
        case "parameters": return target.getParameters();
        case "preparestatementstrategy":
        case "prepareStatementStrategy": return target.getPrepareStatementStrategy();
        case "readsize":
        case "readSize": return target.getReadSize();
        case "resetautocommit":
        case "resetAutoCommit": return target.isResetAutoCommit();
        case "transacted": return target.isTransacted();
        case "usegetbytesforblob":
        case "useGetBytesForBlob": return target.isUseGetBytesForBlob();
        case "useheadersasparameters":
        case "useHeadersAsParameters": return target.isUseHeadersAsParameters();
        case "usejdbc4columnnameandlabelsemantics":
        case "useJDBC4ColumnNameAndLabelSemantics": return target.isUseJDBC4ColumnNameAndLabelSemantics();
        default: return null;
        }
    }

    @Override
    public Object getCollectionValueType(Object target, String name, boolean ignoreCase) {
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "parameters": return java.lang.Object.class;
        default: return null;
        }
    }
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy