public String toKotlinPropertyType(String columnType) { String r = kotlinTypeMap.get(columnType); if (StringUtils.hasText(r)) { return r; } else { return "String"; } }
static String replace(String s, Map<String, Object> map) { return StringUtils.replace(s, map); }
public static String getContentTypeMIMEType(String contentType) { if (contentType != null) { // parsing content-type String[] strings = StringUtils.split(contentType, ';'); return strings[0]; } else { return null; } }
public String toClassName(String tablePrefix, String tableName) { String[] tableNameArr = StringUtils.hasText(tablePrefix) ? StringUtils.split(tableName.substring(tablePrefix.length()), '_') : StringUtils.split(tableName, '_'); return Arrays.stream(tableNameArr) .map(s -> Character.toUpperCase(s.charAt(0)) + (s.length() > 1 ? s.substring(1) : "")) .collect(Collectors.joining()); }
return null; String pathToUse = replace(path, WINDOWS_FOLDER_SEPARATOR, FOLDER_SEPARATOR); String[] pathArray = delimitedListToStringArray(pathToUse, FOLDER_SEPARATOR); List<String> pathElements = new LinkedList<String>(); int tops = 0; return prefix + collectionToDelimitedString(pathElements, FOLDER_SEPARATOR);
/** * Create a new {@code ClassPathResource} with optional {@code ClassLoader} * and {@code Class}. Only for internal usage. * @param path relative or absolute path within the classpath * @param classLoader the class loader to load the resource with, if any * @param clazz the class to load resources with, if any */ protected ClassPathResource(String path, ClassLoader classLoader, Class<?> clazz) { this.path = StringUtils.cleanPath(path); this.classLoader = classLoader; this.clazz = clazz; }
/** * This implementation creates a FileSystemResource, applying the given path * relative to the path of the underlying file of this resource descriptor. */ @Override public Resource createRelative(String relativePath) { String pathToUse = StringUtils.applyRelativePath(this.path, relativePath); return new FileSystemResource(pathToUse); }
/** * Convert a {@code Collection} into a delimited {@code String} (e.g., CSV). * <p>Useful for {@code toString()} implementations. * * @param coll the {@code Collection} to convert * @return the delimited {@code String} */ public static String collectionToCommaDelimitedString(Collection<?> coll) { return collectionToDelimitedString(coll, ","); }
if (c == '%' || encode.indexOf(c) >= 0) { buf.append('%'); StringUtils.append(buf, (byte) (0xff & c), 16); } else buf.append(c);
public String toClassName(String tablePrefix, String tableName) { String[] tableNameArr = StringUtils.hasText(tablePrefix) ? StringUtils.split(tableName.substring(tablePrefix.length()), '_') : StringUtils.split(tableName, '_'); return Arrays.stream(tableNameArr) .map(s -> Character.toUpperCase(s.charAt(0)) + (s.length() > 1 ? s.substring(1) : "")) .collect(Collectors.joining()); }
return null; String pathToUse = replace(path, WINDOWS_FOLDER_SEPARATOR, FOLDER_SEPARATOR); String[] pathArray = delimitedListToStringArray(pathToUse, FOLDER_SEPARATOR); List<String> pathElements = new LinkedList<String>(); int tops = 0; return prefix + collectionToDelimitedString(pathElements, FOLDER_SEPARATOR);
/** * Create a new {@code ClassPathResource} with optional {@code ClassLoader} * and {@code Class}. Only for internal usage. * * @param path relative or absolute path within the classpath * @param classLoader the class loader to load the resource with, if any * @param clazz the class to load resources with, if any */ protected ClassPathResource(String path, ClassLoader classLoader, Class<?> clazz) { this.path = StringUtils.cleanPath(path); this.classLoader = classLoader; this.clazz = clazz; }
/** * This implementation creates a ClassPathResource, applying the given path * relative to the path of the underlying resource of this descriptor. */ @Override public Resource createRelative(String relativePath) { String pathToUse = StringUtils.applyRelativePath(this.path, relativePath); return new ClassPathResource(pathToUse, this.classLoader, this.clazz); }
/** * Convert a {@code Collection} into a delimited {@code String} (e.g. CSV). * <p>Useful for {@code toString()} implementations. * * @param coll the {@code Collection} to convert * @param delim the delimiter to use (typically a ",") * @return the delimited {@code String} */ public static String collectionToDelimitedString(Collection<?> coll, String delim) { return collectionToDelimitedString(coll, delim, "", ""); }
if (c == '%' || encode.indexOf(c) >= 0) { buf.append('%'); StringUtils.append(buf, (byte) (0xff & c), 16); } else buf.append(c);
public String toJavaPropertyType(String columnType) { String r = javaTypeMap.get(columnType); if (StringUtils.hasText(r)) { return r; } else { return "String"; } }
static String replace(String s, Object... objs) { return StringUtils.replace(s, objs); }
public static String getContentTypeMIMEType(String contentType) { if (contentType != null) { // parsing content-type String[] strings = StringUtils.split(contentType, ';'); return strings[0]; } else { return null; } }
return null; String pathToUse = replace(path, WINDOWS_FOLDER_SEPARATOR, FOLDER_SEPARATOR); String[] pathArray = delimitedListToStringArray(pathToUse, FOLDER_SEPARATOR); List<String> pathElements = new LinkedList<String>(); int tops = 0; return prefix + collectionToDelimitedString(pathElements, FOLDER_SEPARATOR);
/** * Create a new {@code ClassPathResource} with optional {@code ClassLoader} * and {@code Class}. Only for internal usage. * * @param path relative or absolute path within the classpath * @param classLoader the class loader to load the resource with, if any * @param clazz the class to load resources with, if any */ protected ClassPathResource(String path, ClassLoader classLoader, Class<?> clazz) { this.path = StringUtils.cleanPath(path); this.classLoader = classLoader; this.clazz = clazz; }