private static <T> Tris<List<KeyInfo>, List<IndexInfo>, List<PropertyDescriptor>> getKeyAndIndexInfo(Class<T> javaType) {
    List<KeyInfo> keys = new ArrayList<>();
    List<IndexInfo> indexes = new ArrayList<>();
    List<PropertyDescriptor> properties = new ArrayList<>();
    Map<String, PropertyDescriptor> propertyDescriptorMap = getProperties(javaType);

    for (Map.Entry<String, PropertyDescriptor> propertyDescriptorEntry : propertyDescriptorMap.entrySet()) {
      properties.add(propertyDescriptorEntry.getValue());
      KeyComponent keyComponent = getAnnotationOnProperty(propertyDescriptorEntry.getValue(), javaType, KeyComponent.class);
      Index index = getAnnotationOnProperty(propertyDescriptorEntry.getValue(), javaType, Index.class);

      if (keyComponent != null) {
        KeyInfo keyInfo = new KeyInfo(keyComponent, propertyDescriptorEntry.getValue());
        if (propertyDescriptorEntry.getValue().getPropertyType() == Date.class) {
          DateFormat dateFormat = getAnnotationOnProperty(propertyDescriptorEntry.getValue(), javaType, DateFormat.class);
          keyInfo.setDateFormat(dateFormat == null ? "yyyyMMdd" : dateFormat.value());
        }
        keys.add(keyInfo);
      }

      if (index != null) {
        IndexInfo indexInfo = new IndexInfo(index, propertyDescriptorEntry.getValue());
        if (propertyDescriptorEntry.getValue().getPropertyType() == Date.class) {
          DateFormat dateFormat = getAnnotationOnProperty(propertyDescriptorEntry.getValue(), javaType, DateFormat.class);
          indexInfo.setDateFormat(dateFormat == null ? "yyyyMMdd" : dateFormat.value());
        }
        indexes.add(indexInfo);
      }
    }

    return new Tris<>(keys, indexes, properties);
  }