in bigtop-data-generators/bigpetstore-data-generator/src/main/java/org/apache/bigtop/datagenerators/bigpetstore/generators/products/ProductCategoryBuilder.java [155:179]
public void validateProducts()
{
for(Product product : products)
{
if(!product.getFieldNames().contains(Constants.PRODUCT_CATEGORY))
{
throw new IllegalStateException("Product must have field " + Constants.PRODUCT_CATEGORY);
}
if(!product.getFieldNames().contains(Constants.PRODUCT_QUANTITY))
{
throw new IllegalStateException("Product must have field " + Constants.PRODUCT_QUANTITY);
}
if(!product.getFieldNames().contains(Constants.PRODUCT_PRICE))
{
throw new IllegalStateException("Product must have field " + Constants.PRODUCT_PRICE);
}
if(!product.getFieldNames().contains(Constants.PRODUCT_UNIT_PRICE))
{
throw new IllegalStateException("Product must have field " + Constants.PRODUCT_UNIT_PRICE);
}
}
}