code: public static List<StructuralProperty> getAllProperties(StructuredType structuredType,
                                                              EntityDataModel entityDataModel) throws ODataException {
          List<StructuralProperty> properties = new ArrayList<>();
  
          String baseTypeName = structuredType.getBaseTypeName();
          if (!isNullOrEmpty(baseTypeName)) {
              StructuredType baseType = (StructuredType) entityDataModel.getType(baseTypeName);
              if (baseType == null) {
                  throw new ODataUnmarshallingException("OData type not found: " + baseTypeName);
              }
  
              // Get the properties of the base type
              properties.addAll(getAllProperties(baseType, entityDataModel));
          }
  
          properties.addAll(structuredType.getStructuralProperties());
          LOG.info("Total number of properties returning are {} for given structured type {}", properties.size(),
                  structuredType.getName());
          return properties;
      }
docs: Gets the properties of a structural type, including the properties of its base types (recursively).
  
  @param structuredType structuredType
  @param entityDataModel The entity data model
  @return listOfProperties
  @throws ODataException If unable to get all properties from edm