Java Code Examples for org.apache.commons.lang.StringUtils.equalsIgnoreCase()

The following are Jave code examples for showing how to use equalsIgnoreCase() of the org.apache.commons.lang.StringUtils class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: Hydrograph   File: DataViewerAdapter.java   View Source Code Vote up 6 votes
private long adjustOffsetForJump(long pageNumber, Long numberOfRecords) {
	long tempOffset = 0;
	tempOffset = offset;
	offset = (pageNumber * pageSize) - pageSize;
	if (filterCondition!=null && !filterCondition.isEmpty()) {
		if (StringUtils.equalsIgnoreCase(FilterHelper.INSTANCE.getRemoteCondition(), " ")) {
			if (numberOfRecords != null) {
				if (offset >= rowCount) {
					offset = rowCount - pageSize;
					if (offset < 0) {
						offset = 0;
					}
				}
			}
		} else {
			setOffset(pageNumber);
		}
	} else {
		setOffset(pageNumber);
	}
	return tempOffset;
}
 
Example 2
Project: Hydrograph   File: FilterHelper.java   View Source Code Vote up 6 votes
private void enableAndDisableValue2TextBox(String condition, Text text) {
	if(StringUtils.equalsIgnoreCase(condition,FilterConstants.BETWEEN)
			|| StringUtils.equalsIgnoreCase(condition,FilterConstants.BETWEEN_FIELD)){
		text.setVisible(true);
	} else {
		text.setVisible(false);
	}
}
 
Example 3
Project: Dragonfly   File: FileMetaDataServiceImpl.java   View Source Code Vote up 6 votes
@Override
public List<String> readPieceMd5(String taskId, String fileMd5) {
    List<String> pieceMd5s = null;
    String lockName = lockService.getLockName(LockConstants.FILE_MD5_DATA_LOCK, taskId);
    lockService.lock(lockName);
    try {
        Path path = PathUtil.getMd5DataPath(taskId);
        if (Files.exists(path)) {
            pieceMd5s = Files.readAllLines(path, StandardCharsets.UTF_8);
        }
    } catch (Exception e) {
        logger.error("read piece md5 error for taskId:{}", taskId, e);
    } finally {
        lockService.unlock(lockName);
    }
    if (CollectionUtils.isNotEmpty(pieceMd5s)) {
        String sha1Value = pieceMd5s.remove(pieceMd5s.size() - 1);
        if (StringUtils.equalsIgnoreCase(sha1Value, DigestUtil.sha1(pieceMd5s)) && !pieceMd5s.isEmpty()) {
            String realFileMd5 = pieceMd5s.remove(pieceMd5s.size() - 1);
            if (StringUtils.equalsIgnoreCase(realFileMd5, fileMd5)) {
                return pieceMd5s;
            }
        }
    }
    return null;
}
 
Example 4
Project: Hydrograph   File: FilterHelper.java   View Source Code Vote up 5 votes
private void showToolTip(Text text1, String selectedValue) {
	if (StringUtils.equalsIgnoreCase(selectedValue, FilterConstants.IN)
			|| StringUtils.equalsIgnoreCase(selectedValue, FilterConstants.NOT_IN)) {
		text1.setToolTipText(Messages.COMMA_SEPERATED_VALUE);
	} else {
		text1.setToolTipText("");
	}
}
 
Example 5
Project: Hydrograph   File: OperationConfigWidget.java   View Source Code Vote up 5 votes
public void newWindowLauncher() {
	String [] optionList = null;
	initialMap = new LinkedHashMap<>(initialMap);
	String protocoltext = null;
	for(AbstractWidget widget : widgets){
		if(widget.getPropertyName().equals(Constants.PROTOCOL_SELECTION)){
			FTPProtocolDetails protocolDetails = (FTPProtocolDetails) widget.getProperties().get(Constants.PROTOCOL_SELECTION);
			if(protocolDetails!= null){
				if(StringUtils.equalsIgnoreCase(protocolDetails.getProtocol(), Constants.AWS_S3)){
					protocoltext = protocolDetails.getProtocol();
					optionList = new String[]{Constants.GET_FILE_S3, Constants.PUT_FILE_S3};
				}else{
					protocoltext = protocolDetails.getProtocol();
					optionList = new String[]{Constants.GET_FILE, Constants.PUT_FILE};
				}
			}
		}
	}
	
	String selectedText = protocoltext;
	boolean bol = initialMap.entrySet().stream().anyMatch(val -> val.getValue().getProtocolSelection().equals(selectedText));
	if(!bol){
		initialMap = new LinkedHashMap<>();
	}
	
	FTPOperationConfigDialog authenticationEditorDialog = new FTPOperationConfigDialog(shell, 
			"", propertyDialogButtonBar, initialMap, cursor, optionList, protocoltext);
	authenticationEditorDialog.open();
	
	Map<String, FTPAuthOperationDetails> newValues = authenticationEditorDialog.getOperationParamDetails();
	
	if(isAnyUpdate(initialMap,newValues)){
		propertyDialogButtonBar.enableApplyButton(true);
	}
	
	initialMap = newValues;
	showHideErrorSymbol(widgets);
}
 
Example 6
Project: Hydrograph   File: TrackingStatusUpdateUtils.java   View Source Code Vote up 5 votes
private void updateStatusCountForSubjobComponent(ExecutionStatus executionStatus,Component component, boolean isReplay) {
	ComponentExecutionStatus status=component.getStatus();
		if(status==null || StringUtils.equalsIgnoreCase(ComponentExecutionStatus.BLANK.value(),status.value())){
			boolean isPending =applyPendingStatus(component, executionStatus);
			if(isPending){
				component.updateStatus(ComponentExecutionStatus.PENDING.value());
			}
		}
		if(status!=null && !StringUtils.equalsIgnoreCase(ComponentExecutionStatus.SUCCESSFUL.value(),status.value())){
			boolean isRunning =applyRunningStatus(component, executionStatus);
			if(isRunning){
				component.updateStatus(ComponentExecutionStatus.RUNNING.value());
			}
		} 

		boolean isFail =applyFailStatus(component, executionStatus);
			if(isFail){
				component.updateStatus(ComponentExecutionStatus.FAILED.value());
			}
	
	if((status!=null && (StringUtils.equalsIgnoreCase(ComponentExecutionStatus.RUNNING.value(),status.value()) || StringUtils.equalsIgnoreCase(ComponentExecutionStatus.PENDING.value(),status.value()))) || isReplay){
		boolean isSuccess=applySuccessStatus(component, executionStatus);
 		if(isSuccess)
 			component.updateStatus(ComponentExecutionStatus.SUCCESSFUL.value());
	}

}
 
Example 7
Project: atlas   File: DependencyConvertUtils.java   View Source Code Vote up 5 votes
public static Type getType(String typeName) {
    for (Type type : Type.values()) {
        if (StringUtils.equalsIgnoreCase(typeName, type.type)) {
            return type;
        }
    }
    return Type.OTHER;
}
 
Example 8
Project: Hydrograph   File: SchemaSyncUtility.java   View Source Code Vote up 5 votes
/**
 * Push the schema from schema tab to Mapping in General tab
 *
 * @param component
 * @param schemaGridRowList
 */
public void pushSchemaToMapping( Component component, List<GridRow> schemaGridRowList) {
	if(StringUtils.equalsIgnoreCase(Constants.TRANSFORM, component.getComponentName()) ||
			   StringUtils.equalsIgnoreCase(Constants.AGGREGATE, component.getComponentName()) ||
			   StringUtils.equalsIgnoreCase(Constants.NORMALIZE, component.getComponentName())||
			   StringUtils.equalsIgnoreCase(Constants.GROUP_COMBINE, component.getComponentName())||
			   StringUtils.equalsIgnoreCase(Constants.CUMULATE, component.getComponentName())){
		pushSchemaToTransformMapping(component, schemaGridRowList);
	}
	else if(StringUtils.equalsIgnoreCase(Constants.LOOKUP, component.getComponentName())){
		pushSchemaToLookupMapping( component, schemaGridRowList);
	}else if(StringUtils.equalsIgnoreCase(Constants.JOIN, component.getComponentName())){
		pushSchemaToJoinMapping( component, schemaGridRowList);
	}
}
 
Example 9
Project: Hydrograph   File: ELTSchemaGridWidget.java   View Source Code Vote up 5 votes
private void sequencingOfSchemaFieldsInOrderOfInternalSchemaFields(List<GridRow> outputSchema,
		List<GridRow> internalSchema2) {
	for(int index=0;index<internalSchema2.size();index++){
		if(!StringUtils.equalsIgnoreCase(outputSchema.get(index).getFieldName(), internalSchema2.get(index).getFieldName())){
			outputSchema.set(index,internalSchema2.get(index));
		}
	}
}
 
Example 10
Project: matrix-appservice-email   File: EmailFormatterInbound.java   View Source Code Vote up 5 votes
protected List<_BridgeMessageContent> extractContent(Part p) throws MessagingException, IOException {
    if (p.isMimeType("multipart/*")) {
        log.info("Found multipart content, extracting");

        List<_BridgeMessageContent> contents = new ArrayList<>();
        Multipart mp = (Multipart) p.getContent();
        int count = mp.getCount();
        for (int i = 0; i < count; i++) {
            contents.addAll(extractContent(mp.getBodyPart(i)));
        }
        return contents;
    }

    if (p.isMimeType("message/rfc822")) {
        log.info("Found nested content, extracting");
        return extractContent((Part) p.getContent());
    }

    String content = p.getContent().toString();
    String[] encodings = p.getHeader("Content-Transfer-Encoding");
    String encoding = (encodings != null && encodings.length > 0) ? encodings[0] : null;

    if (StringUtils.equalsIgnoreCase("quoted-printable", encoding)) {
        try {
            // TODO actually extract the charset properly
            // TODO read RFC to know default charset
            log.info("Transfer encoding is {}, decoding", encoding);
            content = new String(QuotedPrintableCodec.decodeQuotedPrintable(content.getBytes()));
        } catch (DecoderException e) {
            log.warn("Content transfer encoding is set to {} but enable to decode: {}", encoding, e.getMessage());
        }
    }

    if (p.isMimeType(MimeTypeUtils.TEXT_PLAIN_VALUE)) {
        log.info("Found plain text content");
        return Collections.singletonList(new BridgeMessageTextContent(content, encoding));
    }

    if (p.isMimeType(MimeTypeUtils.TEXT_HTML_VALUE)) {
        log.info("Found HTML content");
        return Collections.singletonList(new BridgeMessageHtmlContent(content, encoding));
    }

    return Collections.emptyList();
}
 
Example 11
Project: Hydrograph   File: ExternalOperationExpressionUtil.java   View Source Code Vote up 5 votes
private MappingSheetRow getOperationOrExpression(String operationId, TransformMapping transformMapping,
		boolean isExpression, String componentName) {
	for (MappingSheetRow operationOrExpression : transformMapping.getMappingSheetRows()) {
		if (StringUtils.equalsIgnoreCase(operationId, operationOrExpression.getOperationID())) {
			return operationOrExpression;
		}
	}
	MappingSheetRow mappingSheetRow = new MappingSheetRow(new ArrayList<FilterProperties>(),
			new ArrayList<FilterProperties>(), "", "", false, operationId, new ArrayList<NameValueProperty>(),
			isExpression, new ExpressionEditorData("",componentName),
			new ExpressionEditorData("", componentName), true);
	mappingSheetRow.setAccumulator("");
	transformMapping.getMappingSheetRows().add(mappingSheetRow);
	return mappingSheetRow;
}
 
Example 12
Project: Hydrograph   File: SchemaRowValidation.java   View Source Code Vote up 5 votes
private void validationCheckForBigDecimalAndDateDatatype(GridRow gridRow, String componentType, TableItem tableItem){
	if(StringUtils.equalsIgnoreCase(gridRow.getDataTypeValue(), JAVA_MATH_BIG_DECIMAL)){
		validationCheckForBigDecimalDatatype(gridRow, componentType, tableItem);
	}else if(StringUtils.equalsIgnoreCase(gridRow.getDataTypeValue(),JAVA_UTIL_DATE)){
		validationCheckForDateDatatype(gridRow, tableItem);	
	}
	else{
		setBlackColor(tableItem);
	}
}
 
Example 13
Project: Hydrograph   File: FTPAuthenticEditorDialog.java   View Source Code Vote up 5 votes
@Override
protected void okPressed() {
	FTPAuthOperationDetails authOperationDetails;
	String text1Value = "";
	String text2Value = "";
	if(text1 != null && !text1.isDisposed()){
		text1Value = text1.getText();
	}
	if(text2 != null && !text2.isDisposed()){
		text2Value = text2.getText();
	}
	authOperationSelectionMap = new LinkedHashMap<String, FTPAuthOperationDetails>();
	if(authenticationModeCombo.getSelectionIndex() ==1){
		if(StringUtils.equalsIgnoreCase(protocolText, "AWS S3 HTTPS")){
			authOperationDetails = new FTPAuthOperationDetails(null, 
					text2Value, null, null, null, protocolText);
		}else{
			authOperationDetails = new FTPAuthOperationDetails(text1Value, 
					text2Value, null, null, null, protocolText);
		}
	}else{
		authOperationDetails = new FTPAuthOperationDetails(text1Value, 
				text2Value, null, null, null, protocolText);
	}
	
	authOperationSelectionMap.put(authenticationModeCombo.getText(), authOperationDetails);
	
	super.okPressed();
}
 
Example 14
Project: Hydrograph   File: FTPAuthenticEditorDialog.java   View Source Code Vote up 4 votes
/**
 * @param container
 * @return
 */
private Control addIdKeyComposite(Composite container) {
	Composite keyFileComposite = new Composite(container, SWT.BORDER);
	keyFileComposite.setLayout(new GridLayout(3, false));
	keyFileComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));
	
	FTPWidgetUtility ftpWidgetUtility = new FTPWidgetUtility();
	if(!StringUtils.equalsIgnoreCase(protocolText, "AWS S3 HTTPS")){
		Label userIdLbl = (Label) ftpWidgetUtility.createLabel(keyFileComposite, "User ID");
		text1 = (Text) ftpWidgetUtility.createText(keyFileComposite, "", SWT.BORDER);
		new Button(keyFileComposite, SWT.NONE).setVisible(false);
	}
	
	String label2Text = null;
	if(StringUtils.equalsIgnoreCase(protocolText, "AWS S3 HTTPS")){
		label2Text = "Porperty File";
	}else{
		label2Text = "Private Key";
	}
	
	Label privateKeyLbl = (Label) ftpWidgetUtility.createLabel(keyFileComposite, label2Text);
	setPropertyHelpText(privateKeyLbl, "Used to provide the value for authentication");
	privateKeyLbl.setCursor(new Cursor(privateKeyLbl.getDisplay(), SWT.CURSOR_HELP));
	text2 = (Text) ftpWidgetUtility.createText(keyFileComposite, "", SWT.BORDER);
	Utils.INSTANCE.addMouseMoveListener(text2, cursor);
	Button keyFileBrwsBtn = new Button(keyFileComposite, SWT.NONE);
	keyFileBrwsBtn.setText("...");
	
	selectionListener(keyFileBrwsBtn, text2);
	
	ControlDecoration text2ControlDecoration = WidgetUtility.addDecorator(text2,Messages.EMPTYFIELDMESSAGE);
	
	FTPWidgetUtility widgetUtility = new FTPWidgetUtility();
	if(text1 != null && !text1.isDisposed()){
		ControlDecoration text1ControlDecoration = WidgetUtility.addDecorator(text1,Messages.EMPTYFIELDMESSAGE);
		widgetUtility.validateWidgetText(text1, propertyDialogButtonBar, cursor, text1ControlDecoration);
	}
	widgetUtility.validateEmptyWidgetText(text2, propertyDialogButtonBar, cursor, text2ControlDecoration);
	
	if(text1!=null){
		addModifyListener(text1);
	}
	addModifyListener(text2);
	
	return keyFileComposite;
}
 
Example 15
Project: Hydrograph   File: FTPAuthenticEditorDialog.java   View Source Code Vote up 4 votes
/**
 * @param container
 * @return
 */
private Control addBasicAuthenticationComposite(Composite container) {
	Composite basicAuthComposite = new Composite(container, SWT.BORDER);
	basicAuthComposite.setLayout(new GridLayout(2, false));
	basicAuthComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));
	
	String label1Text = null;
	String label2Text = null;
	int textStyle = 0;
	if(StringUtils.equalsIgnoreCase(protocolText, "AWS S3 HTTPS")){
		label1Text = "Access Key ID";
		label2Text = "Secret Access Key";
		textStyle = SWT.BORDER;
	}else{
		label1Text = "User ID";
		label2Text = "Password";
		textStyle = SWT.PASSWORD | SWT.BORDER;
	}
	
	FTPWidgetUtility ftpWidgetUtility = new FTPWidgetUtility();
	Label label1 = (Label) ftpWidgetUtility.createLabel(basicAuthComposite, label1Text);
	setPropertyHelpText(label1, "Used to provide the value for authentication");
	text1 = (Text) ftpWidgetUtility.createText(basicAuthComposite, "", SWT.BORDER);
	Utils.INSTANCE.addMouseMoveListener(text1, cursor);	
	
	Label label2 = (Label) ftpWidgetUtility.createLabel(basicAuthComposite, label2Text);
	setPropertyHelpText(label2, "Used to provide the value for authentication");
	text2 = (Text) ftpWidgetUtility.createText(basicAuthComposite, "", textStyle);
	Utils.INSTANCE.addMouseMoveListener(text2, cursor);	
	
	ControlDecoration text1ControlDecoration = WidgetUtility.addDecorator(text1,Messages.EMPTYFIELDMESSAGE);
	ControlDecoration text2ControlDecoration = WidgetUtility.addDecorator(text2,Messages.EMPTYFIELDMESSAGE);
	
	FTPWidgetUtility widgetUtility = new FTPWidgetUtility();
	widgetUtility.validateWidgetText(text1, propertyDialogButtonBar, cursor, text1ControlDecoration);
	widgetUtility.validateEmptyWidgetText(text2, propertyDialogButtonBar, cursor, text2ControlDecoration);
	
	addModifyListener(text1);
	addModifyListener(text2);
	
	return basicAuthComposite;
}
 
Example 16
Project: ymate-payment-v2   File: DefaultWxPayAccountProvider.java   View Source Code Vote up 4 votes
public WxPayAccountMeta getAccount(String accountId) {
    if (StringUtils.equalsIgnoreCase(accountId, "default")) {
        return __CACHES.get(__owner.getModuleCfg().getDefaultAccountId());
    }
    return __CACHES.get(accountId);
}
 
Example 17
Project: Hydrograph   File: FilterValidator.java   View Source Code Vote up 4 votes
private boolean validate(String type, String value, DebugDataViewer debugDataViewer, String fieldName) throws ParseException {
	if(FilterConstants.TYPE_BOOLEAN.equals(type)){
		Boolean convertedBoolean = Boolean.valueOf(value);
		if(!StringUtils.equalsIgnoreCase(convertedBoolean.toString(), value)){
			return false;
		}
	}
	else if(FilterConstants.TYPE_DOUBLE.equals(type)){
		Double.valueOf(value);
	}
	else if(FilterConstants.TYPE_FLOAT.equals(type)){
		Float.valueOf(value);
	}
	else if(FilterConstants.TYPE_INTEGER.equals(type)){
		Integer.valueOf(value);
	}
	else if(FilterConstants.TYPE_LONG.equals(type)){
		Long.valueOf(value);
	}
	else if(FilterConstants.TYPE_SHORT.equals(type)){
		Short.valueOf(value);
	}
	else if(FilterConstants.TYPE_STRING.equals(type)){
		String.valueOf(value);
	}
	else if(FilterConstants.TYPE_BIGDECIMAL.equals(type)){
		new BigDecimal(value);
	}
	else if(FilterConstants.TYPE_DATE.equals(type)){
		String debugFileName = debugDataViewer.getDebugFileName();
		String debugFileLocation = debugDataViewer.getDebugFileLocation();
		Fields dataViewerFileSchema = ViewDataSchemaHelper.INSTANCE.getFieldsFromSchema(debugFileLocation + 
				debugFileName + AdapterConstants.SCHEMA_FILE_EXTENTION);
		for (Field field : dataViewerFileSchema.getField()) {
				if(field.getName().equalsIgnoreCase(fieldName))
				{
					SimpleDateFormat sdf = new SimpleDateFormat(field.getFormat()); 
					sdf.parse(value);
				}
		}
		
	}
	return true;
	
}
 
Example 18
Project: Dragonfly   File: Constants.java   View Source Code Vote up 4 votes
public static boolean isDebugEnabled() {
    return StringUtils.equalsIgnoreCase(debug_switcher, "on");
}
 
Example 19
Project: Hydrograph   File: CategoriesDialogTargetComposite.java   View Source Code Vote up 4 votes
private boolean isFieldAvailable(String fieldName) {
	for (String string : targetList.getItems())
		if (StringUtils.equalsIgnoreCase(string, fieldName))
			return false;
	return true;
}
 
Example 20
Project: otter-G   File: DBDataSourceService.java   View Source Code Vote up 4 votes
private DataSource createDataSource(String url, String userName, String password, String driverClassName,
                                    DataMediaType dataMediaType, String encoding) {
    BasicDataSource dbcpDs = new BasicDataSource();

    dbcpDs.setInitialSize(initialSize);// 初始化连接池时创建的连接数
    dbcpDs.setMaxActive(maxActive);// 连接池允许的最大并发连接数,值为非正数时表示不限制
    dbcpDs.setMaxIdle(maxIdle);// 连接池中的最大空闲连接数,超过时,多余的空闲连接将会被释放,值为负数时表示不限制
    dbcpDs.setMinIdle(minIdle);// 连接池中的最小空闲连接数,低于此数值时将会创建所欠缺的连接,值为0时表示不创建
    dbcpDs.setMaxWait(maxWait);// 以毫秒表示的当连接池中没有可用连接时等待可用连接返回的时间,超时则抛出异常,值为-1时表示无限等待
    dbcpDs.setRemoveAbandoned(true);// 是否清除已经超过removeAbandonedTimeout设置的无效连接
    dbcpDs.setLogAbandoned(true);// 当清除无效链接时是否在日志中记录清除信息的标志
    dbcpDs.setRemoveAbandonedTimeout(removeAbandonedTimeout); // 以秒表示清除无效链接的时限
    dbcpDs.setNumTestsPerEvictionRun(numTestsPerEvictionRun);// 确保连接池中没有已破损的连接
    dbcpDs.setTestOnBorrow(false);// 指定连接被调用时是否经过校验
    dbcpDs.setTestOnReturn(false);// 指定连接返回到池中时是否经过校验
    dbcpDs.setTestWhileIdle(true);// 指定连接进入空闲状态时是否经过空闲对象驱逐进程的校验
    dbcpDs.setTimeBetweenEvictionRunsMillis(timeBetweenEvictionRunsMillis); // 以毫秒表示空闲对象驱逐进程由运行状态进入休眠状态的时长,值为非正数时表示不运行任何空闲对象驱逐进程
    dbcpDs.setMinEvictableIdleTimeMillis(minEvictableIdleTimeMillis); // 以毫秒表示连接被空闲对象驱逐进程驱逐前在池中保持空闲状态的最小时间

    // 动态的参数
    dbcpDs.setDriverClassName(driverClassName);
    dbcpDs.setUrl(url);
    dbcpDs.setUsername(userName);
    dbcpDs.setPassword(password);

    if (dataMediaType.isOracle()) {
        dbcpDs.addConnectionProperty("restrictGetTables", "true");
        dbcpDs.setValidationQuery("select 1 from dual");
    } else if (dataMediaType.isMysql()) {
        // open the batch mode for mysql since 5.1.8
        dbcpDs.addConnectionProperty("useServerPrepStmts", "false");
        dbcpDs.addConnectionProperty("rewriteBatchedStatements", "true");
        dbcpDs.addConnectionProperty("zeroDateTimeBehavior", "convertToNull");// 将0000-00-00的时间类型返回null
        dbcpDs.addConnectionProperty("yearIsDateType", "false");// 直接返回字符串,不做year转换date处理
        dbcpDs.addConnectionProperty("noDatetimeStringSync", "true");// 返回时间类型的字符串,不做时区处理
        if (StringUtils.isNotEmpty(encoding)) {
            if (StringUtils.equalsIgnoreCase(encoding, "utf8mb4")) {
                dbcpDs.addConnectionProperty("characterEncoding", "utf8");
                dbcpDs.setConnectionInitSqls(Arrays.asList("set names utf8mb4"));
            } else {
                dbcpDs.addConnectionProperty("characterEncoding", encoding);
            }
        }
        dbcpDs.setValidationQuery("select 1");
    } else {
        logger.error("ERROR ## Unknow database type");
    }

    return dbcpDs;
}