org.apache.camel.component.jdbc.JdbcEndpointConfigurer Maven / Gradle / Ivy
/* Generated by org.apache.camel:apt */
package org.apache.camel.component.jdbc;
import java.util.HashMap;
import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.spi.GeneratedPropertyConfigurer;
import org.apache.camel.support.component.PropertyConfigurerSupport;
/**
* Source code generated by org.apache.camel:apt
*/
@SuppressWarnings("unchecked")
public class JdbcEndpointConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer {
@Override
public boolean configure(CamelContext camelContext, Object endpoint, String name, Object value, boolean ignoreCase) {
if (ignoreCase) {
return doConfigureIgnoreCase(camelContext, endpoint, name, value);
} else {
return doConfigure(camelContext, endpoint, name, value);
}
}
private static boolean doConfigure(CamelContext camelContext, Object endpoint, String name, Object value) {
switch (name) {
case "readSize": ((JdbcEndpoint) endpoint).setReadSize(property(camelContext, int.class, value)); return true;
case "transacted": ((JdbcEndpoint) endpoint).setTransacted(property(camelContext, boolean.class, value)); return true;
case "resetAutoCommit": ((JdbcEndpoint) endpoint).setResetAutoCommit(property(camelContext, boolean.class, value)); return true;
case "parameters": ((JdbcEndpoint) endpoint).setParameters(property(camelContext, java.util.Map.class, value)); return true;
case "useJDBC4ColumnNameAndLabelSemantics": ((JdbcEndpoint) endpoint).setUseJDBC4ColumnNameAndLabelSemantics(property(camelContext, boolean.class, value)); return true;
case "useGetBytesForBlob": ((JdbcEndpoint) endpoint).setUseGetBytesForBlob(property(camelContext, boolean.class, value)); return true;
case "prepareStatementStrategy": ((JdbcEndpoint) endpoint).setPrepareStatementStrategy(property(camelContext, org.apache.camel.component.jdbc.JdbcPrepareStatementStrategy.class, value)); return true;
case "allowNamedParameters": ((JdbcEndpoint) endpoint).setAllowNamedParameters(property(camelContext, boolean.class, value)); return true;
case "useHeadersAsParameters": ((JdbcEndpoint) endpoint).setUseHeadersAsParameters(property(camelContext, boolean.class, value)); return true;
case "outputType": ((JdbcEndpoint) endpoint).setOutputType(property(camelContext, org.apache.camel.component.jdbc.JdbcOutputType.class, value)); return true;
case "outputClass": ((JdbcEndpoint) endpoint).setOutputClass(property(camelContext, java.lang.String.class, value)); return true;
case "beanRowMapper": ((JdbcEndpoint) endpoint).setBeanRowMapper(property(camelContext, org.apache.camel.component.jdbc.BeanRowMapper.class, value)); return true;
case "lazyStartProducer": ((JdbcEndpoint) endpoint).setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
case "bridgeErrorHandler": ((JdbcEndpoint) endpoint).setBridgeErrorHandler(property(camelContext, boolean.class, value)); return true;
case "exceptionHandler": ((JdbcEndpoint) endpoint).setExceptionHandler(property(camelContext, org.apache.camel.spi.ExceptionHandler.class, value)); return true;
case "exchangePattern": ((JdbcEndpoint) endpoint).setExchangePattern(property(camelContext, org.apache.camel.ExchangePattern.class, value)); return true;
case "synchronous": ((JdbcEndpoint) endpoint).setSynchronous(property(camelContext, boolean.class, value)); return true;
case "basicPropertyBinding": ((JdbcEndpoint) endpoint).setBasicPropertyBinding(property(camelContext, boolean.class, value)); return true;
default: return false;
}
}
private static boolean doConfigureIgnoreCase(CamelContext camelContext, Object endpoint, String name, Object value) {
switch (name.toLowerCase()) {
case "readsize": ((JdbcEndpoint) endpoint).setReadSize(property(camelContext, int.class, value)); return true;
case "transacted": ((JdbcEndpoint) endpoint).setTransacted(property(camelContext, boolean.class, value)); return true;
case "resetautocommit": ((JdbcEndpoint) endpoint).setResetAutoCommit(property(camelContext, boolean.class, value)); return true;
case "parameters": ((JdbcEndpoint) endpoint).setParameters(property(camelContext, java.util.Map.class, value)); return true;
case "usejdbc4columnnameandlabelsemantics": ((JdbcEndpoint) endpoint).setUseJDBC4ColumnNameAndLabelSemantics(property(camelContext, boolean.class, value)); return true;
case "usegetbytesforblob": ((JdbcEndpoint) endpoint).setUseGetBytesForBlob(property(camelContext, boolean.class, value)); return true;
case "preparestatementstrategy": ((JdbcEndpoint) endpoint).setPrepareStatementStrategy(property(camelContext, org.apache.camel.component.jdbc.JdbcPrepareStatementStrategy.class, value)); return true;
case "allownamedparameters": ((JdbcEndpoint) endpoint).setAllowNamedParameters(property(camelContext, boolean.class, value)); return true;
case "useheadersasparameters": ((JdbcEndpoint) endpoint).setUseHeadersAsParameters(property(camelContext, boolean.class, value)); return true;
case "outputtype": ((JdbcEndpoint) endpoint).setOutputType(property(camelContext, org.apache.camel.component.jdbc.JdbcOutputType.class, value)); return true;
case "outputclass": ((JdbcEndpoint) endpoint).setOutputClass(property(camelContext, java.lang.String.class, value)); return true;
case "beanrowmapper": ((JdbcEndpoint) endpoint).setBeanRowMapper(property(camelContext, org.apache.camel.component.jdbc.BeanRowMapper.class, value)); return true;
case "lazystartproducer": ((JdbcEndpoint) endpoint).setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
case "bridgeerrorhandler": ((JdbcEndpoint) endpoint).setBridgeErrorHandler(property(camelContext, boolean.class, value)); return true;
case "exceptionhandler": ((JdbcEndpoint) endpoint).setExceptionHandler(property(camelContext, org.apache.camel.spi.ExceptionHandler.class, value)); return true;
case "exchangepattern": ((JdbcEndpoint) endpoint).setExchangePattern(property(camelContext, org.apache.camel.ExchangePattern.class, value)); return true;
case "synchronous": ((JdbcEndpoint) endpoint).setSynchronous(property(camelContext, boolean.class, value)); return true;
case "basicpropertybinding": ((JdbcEndpoint) endpoint).setBasicPropertyBinding(property(camelContext, boolean.class, value)); return true;
default: return false;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy