test_class.file: herd-code/herd-service/src/test/java/org/finra/herd/service/helper/BusinessObjectDataHelperTest.java
test_class.identifier: BusinessObjectDataHelperTest
test_class.superclass: extends AbstractServiceTest
test_case.body: @Test
      public void getStorageUnitByStorageName()
      {
          // Create business object data with several test storage units.
          BusinessObjectData businessObjectData = new BusinessObjectData();
          List<String> testStorageNames = Arrays.asList("Storage_1", "storage-2", "STORAGE3");
  
          List<StorageUnit> storageUnits = new ArrayList<>();
          businessObjectData.setStorageUnits(storageUnits);
          for (String testStorageName : testStorageNames)
          {
              StorageUnit storageUnit = new StorageUnit();
              storageUnits.add(storageUnit);
  
              Storage storage = new Storage();
              storageUnit.setStorage(storage);
              storage.setName(testStorageName);
          }
  
          // Validate that we can find all storage units regardless of the storage name case.
          for (String testStorageName : testStorageNames)
          {
              assertEquals(testStorageName, businessObjectDataHelper.getStorageUnitByStorageName(businessObjectData, testStorageName).getStorage().getName());
              assertEquals(testStorageName,
                  businessObjectDataHelper.getStorageUnitByStorageName(businessObjectData, testStorageName.toUpperCase()).getStorage().getName());
              assertEquals(testStorageName,
                  businessObjectDataHelper.getStorageUnitByStorageName(businessObjectData, testStorageName.toLowerCase()).getStorage().getName());
          }
      }
test_case.class_method_signature: BusinessObjectDataHelperTest.getStorageUnitByStorageName()
test_case.full_signature: @Test public void getStorageUnitByStorageName()
test_case.identifier: getStorageUnitByStorageName
test_case.invocations: asList setStorageUnits add setStorage setName assertEquals getName getStorage getStorageUnitByStorageName assertEquals getName getStorage getStorageUnitByStorageName toUpperCase assertEquals getName getStorage getStorageUnitByStorageName toLowerCase
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void getStorageUnitByStorageName()
focal_class.declarator: alternateKeyHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private AlternateKeyHelper alternateKeyHelper;
focal_class.type: AlternateKeyHelper
focal_class.var_name: alternateKeyHelper
focal_class.declarator: storageUnitHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private StorageUnitHelper storageUnitHelper;
focal_class.type: StorageUnitHelper
focal_class.var_name: storageUnitHelper
focal_class.file: herd-code/herd-service/src/main/java/org/finra/herd/service/helper/BusinessObjectDataHelper.java
focal_class.identifier: BusinessObjectDataHelper
focal_class.class_method_signature: BusinessObjectDataHelper.assertBusinessObjectDataStatusEquals(String expectedBusinessObjectDataStatusCode, BusinessObjectDataEntity businessObjectDataEntity)
focal_class.full_signature: public void assertBusinessObjectDataStatusEquals(String expectedBusinessObjectDataStatusCode, BusinessObjectDataEntity businessObjectDataEntity)
focal_class.identifier: assertBusinessObjectDataStatusEquals
focal_class.modifiers: public
focal_class.parameters: (String expectedBusinessObjectDataStatusCode, BusinessObjectDataEntity businessObjectDataEntity)
focal_class.return: void
focal_class.signature: void assertBusinessObjectDataStatusEquals(String expectedBusinessObjectDataStatusCode, BusinessObjectDataEntity businessObjectDataEntity)
focal_class.class_method_signature: BusinessObjectDataHelper.businessObjectDataEntityAltKeyToString(BusinessObjectDataEntity businessObjectDataEntity)
focal_class.full_signature: public String businessObjectDataEntityAltKeyToString(BusinessObjectDataEntity businessObjectDataEntity)
focal_class.identifier: businessObjectDataEntityAltKeyToString
focal_class.modifiers: public
focal_class.parameters: (BusinessObjectDataEntity businessObjectDataEntity)
focal_class.return: String
focal_class.signature: String businessObjectDataEntityAltKeyToString(BusinessObjectDataEntity businessObjectDataEntity)
focal_class.class_method_signature: BusinessObjectDataHelper.businessObjectDataKeyToString(BusinessObjectDataKey businessObjectDataKey)
focal_class.full_signature: public String businessObjectDataKeyToString(BusinessObjectDataKey businessObjectDataKey)
focal_class.identifier: businessObjectDataKeyToString
focal_class.modifiers: public
focal_class.parameters: (BusinessObjectDataKey businessObjectDataKey)
focal_class.return: String
focal_class.signature: String businessObjectDataKeyToString(BusinessObjectDataKey businessObjectDataKey)
focal_class.class_method_signature: BusinessObjectDataHelper.businessObjectDataKeyToString(String namespace, String businessObjectDefinitionName, String businessObjectFormatUsage,
          String businessObjectFormatFileType, int businessObjectFormatVersion, String businessObjectDataPartitionValue,
          List<String> businessObjectDataSubPartitionValues, int businessObjectDataVersion)
focal_class.full_signature: public String businessObjectDataKeyToString(String namespace, String businessObjectDefinitionName, String businessObjectFormatUsage,
          String businessObjectFormatFileType, int businessObjectFormatVersion, String businessObjectDataPartitionValue,
          List<String> businessObjectDataSubPartitionValues, int businessObjectDataVersion)
focal_class.identifier: businessObjectDataKeyToString
focal_class.modifiers: public
focal_class.parameters: (String namespace, String businessObjectDefinitionName, String businessObjectFormatUsage,
          String businessObjectFormatFileType, int businessObjectFormatVersion, String businessObjectDataPartitionValue,
          List<String> businessObjectDataSubPartitionValues, int businessObjectDataVersion)
focal_class.return: String
focal_class.signature: String businessObjectDataKeyToString(String namespace, String businessObjectDefinitionName, String businessObjectFormatUsage,
          String businessObjectFormatFileType, int businessObjectFormatVersion, String businessObjectDataPartitionValue,
          List<String> businessObjectDataSubPartitionValues, int businessObjectDataVersion)
focal_class.class_method_signature: BusinessObjectDataHelper.createBusinessObjectDataCreateRequest(BusinessObjectFormatEntity businessObjectFormatEntity, String uuid,
          String businessObjectDataStatus, List<Attribute> attributes, StorageEntity storageEntity, String storageDirectoryPath, String storageFilePath,
          Long storageFileSizeBytes, Long storageFileRowCount)
focal_class.full_signature: public BusinessObjectDataCreateRequest createBusinessObjectDataCreateRequest(BusinessObjectFormatEntity businessObjectFormatEntity, String uuid,
          String businessObjectDataStatus, List<Attribute> attributes, StorageEntity storageEntity, String storageDirectoryPath, String storageFilePath,
          Long storageFileSizeBytes, Long storageFileRowCount)
focal_class.identifier: createBusinessObjectDataCreateRequest
focal_class.modifiers: public
focal_class.parameters: (BusinessObjectFormatEntity businessObjectFormatEntity, String uuid,
          String businessObjectDataStatus, List<Attribute> attributes, StorageEntity storageEntity, String storageDirectoryPath, String storageFilePath,
          Long storageFileSizeBytes, Long storageFileRowCount)
focal_class.return: BusinessObjectDataCreateRequest
focal_class.signature: BusinessObjectDataCreateRequest createBusinessObjectDataCreateRequest(BusinessObjectFormatEntity businessObjectFormatEntity, String uuid,
          String businessObjectDataStatus, List<Attribute> attributes, StorageEntity storageEntity, String storageDirectoryPath, String storageFilePath,
          Long storageFileSizeBytes, Long storageFileRowCount)
focal_class.class_method_signature: BusinessObjectDataHelper.createBusinessObjectDataFromEntity(BusinessObjectDataEntity businessObjectDataEntity)
focal_class.full_signature: public BusinessObjectData createBusinessObjectDataFromEntity(BusinessObjectDataEntity businessObjectDataEntity)
focal_class.identifier: createBusinessObjectDataFromEntity
focal_class.modifiers: public
focal_class.parameters: (BusinessObjectDataEntity businessObjectDataEntity)
focal_class.return: BusinessObjectData
focal_class.signature: BusinessObjectData createBusinessObjectDataFromEntity(BusinessObjectDataEntity businessObjectDataEntity)
focal_class.class_method_signature: BusinessObjectDataHelper.createBusinessObjectDataFromEntity(BusinessObjectDataEntity businessObjectDataEntity,
          Boolean includeBusinessObjectDataStatusHistory, Boolean includeStorageUnitStatusHistory, Boolean excludeBusinessObjectDataStorageFiles)
focal_class.full_signature: public BusinessObjectData createBusinessObjectDataFromEntity(BusinessObjectDataEntity businessObjectDataEntity,
          Boolean includeBusinessObjectDataStatusHistory, Boolean includeStorageUnitStatusHistory, Boolean excludeBusinessObjectDataStorageFiles)
focal_class.identifier: createBusinessObjectDataFromEntity
focal_class.modifiers: public
focal_class.parameters: (BusinessObjectDataEntity businessObjectDataEntity,
          Boolean includeBusinessObjectDataStatusHistory, Boolean includeStorageUnitStatusHistory, Boolean excludeBusinessObjectDataStorageFiles)
focal_class.return: BusinessObjectData
focal_class.signature: BusinessObjectData createBusinessObjectDataFromEntity(BusinessObjectDataEntity businessObjectDataEntity,
          Boolean includeBusinessObjectDataStatusHistory, Boolean includeStorageUnitStatusHistory, Boolean excludeBusinessObjectDataStorageFiles)
focal_class.class_method_signature: BusinessObjectDataHelper.createBusinessObjectDataKey(BusinessObjectData businessObjectData)
focal_class.full_signature: public BusinessObjectDataKey createBusinessObjectDataKey(BusinessObjectData businessObjectData)
focal_class.identifier: createBusinessObjectDataKey
focal_class.modifiers: public
focal_class.parameters: (BusinessObjectData businessObjectData)
focal_class.return: BusinessObjectDataKey
focal_class.signature: BusinessObjectDataKey createBusinessObjectDataKey(BusinessObjectData businessObjectData)
focal_class.class_method_signature: BusinessObjectDataHelper.createBusinessObjectDataKeyFromEntity(BusinessObjectDataEntity businessObjectDataEntity)
focal_class.full_signature: public BusinessObjectDataKey createBusinessObjectDataKeyFromEntity(BusinessObjectDataEntity businessObjectDataEntity)
focal_class.identifier: createBusinessObjectDataKeyFromEntity
focal_class.modifiers: public
focal_class.parameters: (BusinessObjectDataEntity businessObjectDataEntity)
focal_class.return: BusinessObjectDataKey
focal_class.signature: BusinessObjectDataKey createBusinessObjectDataKeyFromEntity(BusinessObjectDataEntity businessObjectDataEntity)
focal_class.class_method_signature: BusinessObjectDataHelper.createBusinessObjectDataKeyFromStorageUnitKey(BusinessObjectDataStorageUnitKey storageUnitKey)
focal_class.full_signature: public BusinessObjectDataKey createBusinessObjectDataKeyFromStorageUnitKey(BusinessObjectDataStorageUnitKey storageUnitKey)
focal_class.identifier: createBusinessObjectDataKeyFromStorageUnitKey
focal_class.modifiers: public
focal_class.parameters: (BusinessObjectDataStorageUnitKey storageUnitKey)
focal_class.return: BusinessObjectDataKey
focal_class.signature: BusinessObjectDataKey createBusinessObjectDataKeyFromStorageUnitKey(BusinessObjectDataStorageUnitKey storageUnitKey)
focal_class.class_method_signature: BusinessObjectDataHelper.getBusinessObjectDataKey(BusinessObjectDataEntity businessObjectDataEntity)
focal_class.full_signature: public BusinessObjectDataKey getBusinessObjectDataKey(BusinessObjectDataEntity businessObjectDataEntity)
focal_class.identifier: getBusinessObjectDataKey
focal_class.modifiers: public
focal_class.parameters: (BusinessObjectDataEntity businessObjectDataEntity)
focal_class.return: BusinessObjectDataKey
focal_class.signature: BusinessObjectDataKey getBusinessObjectDataKey(BusinessObjectDataEntity businessObjectDataEntity)
focal_class.class_method_signature: BusinessObjectDataHelper.getBusinessObjectDataKey(BusinessObjectData businessObjectData)
focal_class.full_signature: public BusinessObjectDataKey getBusinessObjectDataKey(BusinessObjectData businessObjectData)
focal_class.identifier: getBusinessObjectDataKey
focal_class.modifiers: public
focal_class.parameters: (BusinessObjectData businessObjectData)
focal_class.return: BusinessObjectDataKey
focal_class.signature: BusinessObjectDataKey getBusinessObjectDataKey(BusinessObjectData businessObjectData)
focal_class.class_method_signature: BusinessObjectDataHelper.getDateFromString(String dateString)
focal_class.full_signature: public Date getDateFromString(String dateString)
focal_class.identifier: getDateFromString
focal_class.modifiers: public
focal_class.parameters: (String dateString)
focal_class.return: Date
focal_class.signature: Date getDateFromString(String dateString)
focal_class.class_method_signature: BusinessObjectDataHelper.getPartitionFilter(BusinessObjectDataKey businessObjectDataKey, List<String> samplePartitionFilter)
focal_class.full_signature: public List<String> getPartitionFilter(BusinessObjectDataKey businessObjectDataKey, List<String> samplePartitionFilter)
focal_class.identifier: getPartitionFilter
focal_class.modifiers: public
focal_class.parameters: (BusinessObjectDataKey businessObjectDataKey, List<String> samplePartitionFilter)
focal_class.return: List<String>
focal_class.signature: List<String> getPartitionFilter(BusinessObjectDataKey businessObjectDataKey, List<String> samplePartitionFilter)
focal_class.class_method_signature: BusinessObjectDataHelper.getPartitionValue(BusinessObjectDataEntity businessObjectDataEntity, int partitionColumnPosition)
focal_class.full_signature: public String getPartitionValue(BusinessObjectDataEntity businessObjectDataEntity, int partitionColumnPosition)
focal_class.identifier: getPartitionValue
focal_class.modifiers: public
focal_class.parameters: (BusinessObjectDataEntity businessObjectDataEntity, int partitionColumnPosition)
focal_class.return: String
focal_class.signature: String getPartitionValue(BusinessObjectDataEntity businessObjectDataEntity, int partitionColumnPosition)
focal_class.class_method_signature: BusinessObjectDataHelper.getPrimaryAndSubPartitionValues(BusinessObjectDataKey businessObjectDataKey)
focal_class.full_signature: public List<String> getPrimaryAndSubPartitionValues(BusinessObjectDataKey businessObjectDataKey)
focal_class.identifier: getPrimaryAndSubPartitionValues
focal_class.modifiers: public
focal_class.parameters: (BusinessObjectDataKey businessObjectDataKey)
focal_class.return: List<String>
focal_class.signature: List<String> getPrimaryAndSubPartitionValues(BusinessObjectDataKey businessObjectDataKey)
focal_class.class_method_signature: BusinessObjectDataHelper.getPrimaryAndSubPartitionValues(BusinessObjectData businessObjectData)
focal_class.full_signature: public List<String> getPrimaryAndSubPartitionValues(BusinessObjectData businessObjectData)
focal_class.identifier: getPrimaryAndSubPartitionValues
focal_class.modifiers: public
focal_class.parameters: (BusinessObjectData businessObjectData)
focal_class.return: List<String>
focal_class.signature: List<String> getPrimaryAndSubPartitionValues(BusinessObjectData businessObjectData)
focal_class.class_method_signature: BusinessObjectDataHelper.getPrimaryAndSubPartitionValues(BusinessObjectDataEntity businessObjectDataEntity)
focal_class.full_signature: public List<String> getPrimaryAndSubPartitionValues(BusinessObjectDataEntity businessObjectDataEntity)
focal_class.identifier: getPrimaryAndSubPartitionValues
focal_class.modifiers: public
focal_class.parameters: (BusinessObjectDataEntity businessObjectDataEntity)
focal_class.return: List<String>
focal_class.signature: List<String> getPrimaryAndSubPartitionValues(BusinessObjectDataEntity businessObjectDataEntity)
focal_class.class_method_signature: BusinessObjectDataHelper.getStorageUnitByStorageName(BusinessObjectData businessObjectData, String storageName)
focal_class.full_signature: public StorageUnit getStorageUnitByStorageName(BusinessObjectData businessObjectData, String storageName)
focal_class.identifier: getStorageUnitByStorageName
focal_class.modifiers: public
focal_class.parameters: (BusinessObjectData businessObjectData, String storageName)
focal_class.return: StorageUnit
focal_class.signature: StorageUnit getStorageUnitByStorageName(BusinessObjectData businessObjectData, String storageName)
focal_class.class_method_signature: BusinessObjectDataHelper.getSubPartitionValues(BusinessObjectDataEntity businessObjectDataEntity)
focal_class.full_signature: public List<String> getSubPartitionValues(BusinessObjectDataEntity businessObjectDataEntity)
focal_class.identifier: getSubPartitionValues
focal_class.modifiers: public
focal_class.parameters: (BusinessObjectDataEntity businessObjectDataEntity)
focal_class.return: List<String>
focal_class.signature: List<String> getSubPartitionValues(BusinessObjectDataEntity businessObjectDataEntity)
focal_class.class_method_signature: BusinessObjectDataHelper.validateBusinessObjectDataKey(BusinessObjectDataKey key, boolean businessObjectFormatVersionRequired, boolean businessObjectDataVersionRequired)
focal_class.full_signature: public void validateBusinessObjectDataKey(BusinessObjectDataKey key, boolean businessObjectFormatVersionRequired, boolean businessObjectDataVersionRequired)
focal_class.identifier: validateBusinessObjectDataKey
focal_class.modifiers: public
focal_class.parameters: (BusinessObjectDataKey key, boolean businessObjectFormatVersionRequired, boolean businessObjectDataVersionRequired)
focal_class.return: void
focal_class.signature: void validateBusinessObjectDataKey(BusinessObjectDataKey key, boolean businessObjectFormatVersionRequired, boolean businessObjectDataVersionRequired)
focal_class.class_method_signature: BusinessObjectDataHelper.validatePartitionValueFilters(List<PartitionValueFilter> partitionValueFilters, PartitionValueFilter standalonePartitionValueFilter,
          boolean allowPartitionValueTokens)
focal_class.full_signature: public void validatePartitionValueFilters(List<PartitionValueFilter> partitionValueFilters, PartitionValueFilter standalonePartitionValueFilter,
          boolean allowPartitionValueTokens)
focal_class.identifier: validatePartitionValueFilters
focal_class.modifiers: public
focal_class.parameters: (List<PartitionValueFilter> partitionValueFilters, PartitionValueFilter standalonePartitionValueFilter,
          boolean allowPartitionValueTokens)
focal_class.return: void
focal_class.signature: void validatePartitionValueFilters(List<PartitionValueFilter> partitionValueFilters, PartitionValueFilter standalonePartitionValueFilter,
          boolean allowPartitionValueTokens)
focal_class.class_method_signature: BusinessObjectDataHelper.validateRegistrationDateRangeFilter(RegistrationDateRangeFilter registrationDateRangeFilter)
focal_class.full_signature: public void validateRegistrationDateRangeFilter(RegistrationDateRangeFilter registrationDateRangeFilter)
focal_class.identifier: validateRegistrationDateRangeFilter
focal_class.modifiers: public
focal_class.parameters: (RegistrationDateRangeFilter registrationDateRangeFilter)
focal_class.return: void
focal_class.signature: void validateRegistrationDateRangeFilter(RegistrationDateRangeFilter registrationDateRangeFilter)
focal_class.class_method_signature: BusinessObjectDataHelper.validateSubPartitionValues(List<String> subPartitionValues)
focal_class.full_signature: public void validateSubPartitionValues(List<String> subPartitionValues)
focal_class.identifier: validateSubPartitionValues
focal_class.modifiers: public
focal_class.parameters: (List<String> subPartitionValues)
focal_class.return: void
focal_class.signature: void validateSubPartitionValues(List<String> subPartitionValues)
focal_method.body: public StorageUnit getStorageUnitByStorageName(BusinessObjectData businessObjectData, String storageName) throws IllegalStateException
      {
          StorageUnit resultStorageUnit = null;
  
          // Find a storage unit that belongs to the specified storage.
          for (StorageUnit storageUnit : businessObjectData.getStorageUnits())
          {
              if (storageUnit.getStorage().getName().equalsIgnoreCase(storageName))
              {
                  resultStorageUnit = storageUnit;
                  break;
              }
          }
  
          // Validate that we found a storage unit that belongs to the specified storage.
          if (resultStorageUnit == null)
          {
              throw new IllegalStateException(String.format("Business object data has no storage unit with storage name \"%s\".", storageName));
          }
  
          return resultStorageUnit;
      }
focal_method.class_method_signature: BusinessObjectDataHelper.getStorageUnitByStorageName(BusinessObjectData businessObjectData, String storageName)
focal_method.full_signature: public StorageUnit getStorageUnitByStorageName(BusinessObjectData businessObjectData, String storageName)
focal_method.identifier: getStorageUnitByStorageName
focal_method.invocations: getStorageUnits equalsIgnoreCase getName getStorage format
focal_method.modifiers: public
focal_method.parameters: (BusinessObjectData businessObjectData, String storageName)
focal_method.return: StorageUnit
focal_method.signature: StorageUnit getStorageUnitByStorageName(BusinessObjectData businessObjectData, String storageName)