org.apache.commons.lang3.StringUtils#wrap ( )源码实例Demo

下面列出了org.apache.commons.lang3.StringUtils#wrap ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: herd   文件: JobServiceGetJobsTest.java
@Test
public void testGetJobsAssertJobNameTrimmed() throws Exception
{
    String namespace = "namespace";
    String jobName = StringUtils.wrap("jobName", BLANK_TEXT);
    JobStatusEnum jobStatus = JobStatusEnum.COMPLETED;

    Set<String> authorizedNamespaces = new HashSet<>(Arrays.asList("namespace"));
    when(namespaceSecurityHelper.getAuthorizedNamespaces(any())).thenReturn(authorizedNamespaces);

    NamespaceEntity namespaceEntity = new NamespaceEntity();
    namespaceEntity.setCode(namespace);
    when(namespaceDao.getNamespaceByCd(any())).thenReturn(namespaceEntity);

    jobServiceImpl.getJobs(namespace, jobName, jobStatus, NO_START_TIME, NO_END_TIME);

    verify(jobDefinitionDao).getJobDefinitionsByFilter(eq(authorizedNamespaces), eq(jobName.trim()));
}
 
源代码2 项目: components   文件: SnowflakeReader.java
protected String getQueryString() throws IOException {
    String condition = null;
    if (properties.manualQuery.getValue()) {
        return properties.getQuery();
    } else {
        condition = properties.condition.getStringValue();
    }
    StringBuilder sb = new StringBuilder();
    boolean isUpperCase = properties.convertColumnsAndTableToUppercase.getValue();
    sb.append("select "); //$NON-NLS-1$
    int count = 0;
    for (Schema.Field se : getSchema().getFields()) {
        if (count++ > 0) {
            sb.append(", "); //$NON-NLS-1$
        }
        String columnName = se.getProp(SchemaConstants.TALEND_COLUMN_DB_COLUMN_NAME);
        sb.append(isUpperCase ? columnName : StringUtils.wrap(columnName, '"'));
    }
    sb.append(" from "); //$NON-NLS-1$
    String tableName = isUpperCase ? properties.getTableName() : StringUtils.wrap(properties.getTableName(), '"');
    sb.append(tableName);
    if (condition != null && condition.trim().length() > 0) {
        sb.append(" where ");
        sb.append(condition);
    }
    return sb.toString();
}
 
源代码3 项目: cf-butler   文件: QueryPolicyExecutorTask.java
private static String wrap(String value) {
return value != null ? StringUtils.wrap(value, '"') : StringUtils.wrap("", '"');
  }
 
源代码4 项目: cf-butler   文件: ProductMetric.java
private static String wrap(String value) {
return value != null ? StringUtils.wrap(value, '"') : StringUtils.wrap("", '"');
  }
 
源代码5 项目: cf-butler   文件: Release.java
private static String wrap(String value) {
return value != null ? StringUtils.wrap(value, '"') : StringUtils.wrap("", '"');
  }
 
源代码6 项目: cf-butler   文件: ServiceInstanceDetail.java
private static String wrap(String value) {
	return value != null ? StringUtils.wrap(value, '"') : StringUtils.wrap("", '"');
}
 
源代码7 项目: cf-butler   文件: AppDetail.java
private static String wrap(String value) {
	return value != null ? StringUtils.wrap(value, '"') : StringUtils.wrap("", '"');
}
 
源代码8 项目: cf-butler   文件: HistoricalRecord.java
private static String wrap(String value) {
	return value != null ? StringUtils.wrap(value, '"') : StringUtils.wrap("", '"');
}
 
源代码9 项目: cf-butler   文件: AppRelationship.java
private static String wrap(String value) {
	return value != null ? StringUtils.wrap(value, '"') : StringUtils.wrap("", '"');
}
 
源代码10 项目: cf-butler   文件: UserAccounts.java
private static String wrap(String value) {
	return value != null ? StringUtils.wrap(value, '"') : StringUtils.wrap("", '"');
}
 
 同类方法