/** * Concat multiple ids into one composite id with IDS_SPLITOR * @param ids the string id values to be concatted * @return concatted string value */ public static String concat(String... ids) { // NOTE: must support string id when using this method return StringUtil.escape(IDS_SPLITOR, ESCAPE, ids); }
/** * Concat property values with NAME_SPLITOR * @param values the property values to be concatted * @return concatted string value */ public static String concatValues(List<?> values) { // Convert the object list to string array int valuesSize = values.size(); String[] parts = new String[valuesSize]; for (int i = 0; i < valuesSize; i++) { parts[i] = values.get(i).toString(); } return StringUtil.escape(NAME_SPLITOR, ESCAPE, parts); }
/** * Concat multiple parts into a single id with ID_SPLITOR * @param parts the string id values to be spliced * @return spliced id object */ public static Id splicing(String... parts) { String escaped = StringUtil.escape(ID_SPLITOR, ESCAPE, parts); return IdGenerator.of(escaped); }
/** * Concat multiple ids into one composite id with IDS_SPLITOR * @param ids the string id values to be concatted * @return concatted string value */ public static String concat(String... ids) { // NOTE: must support string id when using this method return StringUtil.escape(IDS_SPLITOR, ESCAPE, ids); }
/** * Concat property values with NAME_SPLITOR * @param values the property values to be concatted * @return concatted string value */ public static String concatValues(List<?> values) { // Convert the object list to string array int valuesSize = values.size(); String[] parts = new String[valuesSize]; for (int i = 0; i < valuesSize; i++) { parts[i] = values.get(i).toString(); } return StringUtil.escape(NAME_SPLITOR, ESCAPE, parts); }
/** * Concat multiple parts into a single id with ID_SPLITOR * @param parts the string id values to be spliced * @return spliced id object */ public static Id splicing(String... parts) { String escaped = StringUtil.escape(ID_SPLITOR, ESCAPE, parts); return IdGenerator.of(escaped); }