LookupName

public final class LookupName

Utility class for dealing with lookup names.

Methods

buildLookupFieldName

public static String buildLookupFieldName(String fieldName, String relatedFieldName)

Builds lookup field name which may contain information about the searching by relationship.

Parameters:
  • fieldName – The name of the field from entity
  • relatedFieldName – The name of the field in related entity
Returns:

lookup field name

getFieldName

public static String getFieldName(String lookupFieldName)

Returns the name of the field from entity.

Parameters:
  • lookupFieldName – the lookup field name
Returns:

field name from entity

getRelatedFieldName

public static String getRelatedFieldName(String lookupFieldName)

Returns a field name in related entity.

Parameters:
  • lookupFieldName – the lookup field name
Returns:

field name from related entity

lookupCountMethod

public static String lookupCountMethod(String lookupNameOrMethodName)

Builds count lookup name. The resulting method name will be in form: countXxxYyyZzz.

Parameters:
  • lookupNameOrMethodName – name of the lookup or lookup method name
Returns:

count lookup method name

lookupMethod

public static String lookupMethod(String lookupName)

Builds lookup method name, based on the lookup name. The resulting method name is camelCase, based on the words in the lookup.

Parameters:
  • lookupName – name of the lookup
Returns:

camelCase lookup method name