test_class.file: persistence/src/test/java/org/devgateway/toolkit/persistence/excel/ExcelFieldServiceTest.java
test_class.identifier: ExcelFieldServiceTest
test_case.body: @Test
      public void getFieldName() throws Exception {
          final ClassFields classFields = new ClassFieldsDefault(OtherClass.class);
          final Iterator<Field> fields = classFields.getFields();
  
          final Field firstField = fields.next();      // get first element
          Assert.assertEquals("Check field name", "valid", ExcelFieldService.getFieldName(null, firstField, null));
  
          final Field secondField = fields.next();      // get second element
          Assert.assertEquals("Check field name", "money", ExcelFieldService.getFieldName(null, secondField, null));
      }
test_case.class_method_signature: ExcelFieldServiceTest.getFieldName()
test_case.full_signature: @Test public void getFieldName()
test_case.identifier: getFieldName
test_case.invocations: getFields next assertEquals getFieldName next assertEquals getFieldName
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void getFieldName()
focal_class.declarator: logger = LoggerFactory.getLogger(ExcelFieldService.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger logger = LoggerFactory.getLogger(ExcelFieldService.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: fieldsTypeCache
focal_class.modifier: private static
focal_class.original_string: private static Map<Field, FieldType> fieldsTypeCache;
focal_class.type: Map<Field, FieldType>
focal_class.var_name: fieldsTypeCache
focal_class.declarator: fieldsClassCache
focal_class.modifier: private static
focal_class.original_string: private static Map<Field, Class> fieldsClassCache;
focal_class.type: Map<Field, Class>
focal_class.var_name: fieldsClassCache
focal_class.declarator: fieldsCache
focal_class.modifier: private static
focal_class.original_string: private static Map<Class, List<Field>> fieldsCache;
focal_class.type: Map<Class, List<Field>>
focal_class.var_name: fieldsCache
focal_class.file: persistence/src/main/java/org/devgateway/toolkit/persistence/excel/ExcelFieldService.java
focal_class.identifier: ExcelFieldService
focal_class.class_method_signature: ExcelFieldService.ExcelFieldService()
focal_class.full_signature: private  ExcelFieldService()
focal_class.identifier: ExcelFieldService
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  ExcelFieldService()
focal_class.class_method_signature: ExcelFieldService.getFieldType(final Field field)
focal_class.full_signature: public static FieldType getFieldType(final Field field)
focal_class.identifier: getFieldType
focal_class.modifiers: public static
focal_class.parameters: (final Field field)
focal_class.return: FieldType
focal_class.signature: FieldType getFieldType(final Field field)
focal_class.class_method_signature: ExcelFieldService.getFieldClass(final Field field)
focal_class.full_signature: public static Class getFieldClass(final Field field)
focal_class.identifier: getFieldClass
focal_class.modifiers: public static
focal_class.parameters: (final Field field)
focal_class.return: Class
focal_class.signature: Class getFieldClass(final Field field)
focal_class.class_method_signature: ExcelFieldService.getFields(final Class clazz)
focal_class.full_signature: public static Iterator<Field> getFields(final Class clazz)
focal_class.identifier: getFields
focal_class.modifiers: public static
focal_class.parameters: (final Class clazz)
focal_class.return: Iterator<Field>
focal_class.signature: Iterator<Field> getFields(final Class clazz)
focal_class.class_method_signature: ExcelFieldService.getObjectID(final Object object)
focal_class.full_signature: public static Long getObjectID(final Object object)
focal_class.identifier: getObjectID
focal_class.modifiers: public static
focal_class.parameters: (final Object object)
focal_class.return: Long
focal_class.signature: Long getObjectID(final Object object)
focal_class.class_method_signature: ExcelFieldService.getFieldName(final Class clazz, final Field field, final TranslateService translateService)
focal_class.full_signature: public static String getFieldName(final Class clazz, final Field field, final TranslateService translateService)
focal_class.identifier: getFieldName
focal_class.modifiers: public static
focal_class.parameters: (final Class clazz, final Field field, final TranslateService translateService)
focal_class.return: String
focal_class.signature: String getFieldName(final Class clazz, final Field field, final TranslateService translateService)
focal_class.class_method_signature: ExcelFieldService.getFieldClazz(final Field field)
focal_class.full_signature: public static Class[] getFieldClazz(final Field field)
focal_class.identifier: getFieldClazz
focal_class.modifiers: public static
focal_class.parameters: (final Field field)
focal_class.return: Class[]
focal_class.signature: Class[] getFieldClazz(final Field field)
focal_class.class_method_signature: ExcelFieldService.isCollection(final Field field)
focal_class.full_signature: public static Boolean isCollection(final Field field)
focal_class.identifier: isCollection
focal_class.modifiers: public static
focal_class.parameters: (final Field field)
focal_class.return: Boolean
focal_class.signature: Boolean isCollection(final Field field)
focal_method.body: public static String getFieldName(final Class clazz, final Field field, final TranslateService translateService) {
          final ExcelExport excelExport = field.getAnnotation(ExcelExport.class);
          if (excelExport != null) {
              String label = null;
              if (excelExport.useTranslation()) {
                  label = translateService.getTranslation(clazz, field);
              }
              if (!excelExport.name().isEmpty()) {
                  if (StringUtils.isEmpty(label)) {
                      return excelExport.name();
                  } else {
                      return excelExport.name() + " - " + label;
                  }
  
              }
          }
  
          return field.getName();
      }
focal_method.class_method_signature: ExcelFieldService.getFieldName(final Class clazz, final Field field, final TranslateService translateService)
focal_method.full_signature: public static String getFieldName(final Class clazz, final Field field, final TranslateService translateService)
focal_method.identifier: getFieldName
focal_method.invocations: getAnnotation useTranslation getTranslation isEmpty name isEmpty name name getName
focal_method.modifiers: public static
focal_method.parameters: (final Class clazz, final Field field, final TranslateService translateService)
focal_method.return: String
focal_method.signature: String getFieldName(final Class clazz, final Field field, final TranslateService translateService)