@Test public void shouldReturnLookupFieldName() { assertEquals("fieldName.id", LookupName.buildLookupFieldName("fieldName", "id")); assertEquals("collection.name", LookupName.buildLookupFieldName("collection", "name")); assertEquals("field", LookupName.buildLookupFieldName("field", null)); }
public static String buildLookupFieldName(String fieldName, String relatedFieldName) { if (StringUtils.isNotBlank(relatedFieldName)) { return String.format("%s.%s", fieldName, relatedFieldName); } return fieldName; }
LookupName { public static String buildLookupFieldName(String fieldName, String relatedFieldName) { if (StringUtils.isNotBlank(relatedFieldName)) { return String.format("%s.%s", fieldName, relatedFieldName); } return fieldName; } }
LookupName { public static String buildLookupFieldName(String fieldName, String relatedFieldName) { if (StringUtils.isNotBlank(relatedFieldName)) { return String.format("%s.%s", fieldName, relatedFieldName); } return fieldName; } private  LookupName(); }
LookupName { public static String buildLookupFieldName(String fieldName, String relatedFieldName) { if (StringUtils.isNotBlank(relatedFieldName)) { return String.format("%s.%s", fieldName, relatedFieldName); } return fieldName; } private  LookupName(); static String lookupMethod(String lookupName); static String lookupCountMethod(String lookupNameOrMethodName); static String buildLookupFieldName(String fieldName, String relatedFieldName); static String getRelatedFieldName(String lookupFieldName); static String getFieldName(String lookupFieldName); }
LookupName { public static String buildLookupFieldName(String fieldName, String relatedFieldName) { if (StringUtils.isNotBlank(relatedFieldName)) { return String.format("%s.%s", fieldName, relatedFieldName); } return fieldName; } private  LookupName(); static String lookupMethod(String lookupName); static String lookupCountMethod(String lookupNameOrMethodName); static String buildLookupFieldName(String fieldName, String relatedFieldName); static String getRelatedFieldName(String lookupFieldName); static String getFieldName(String lookupFieldName);  }