src/main/java/com/findupon/commons/entity/product/ProductList.java
/**
	 * This does nothing more than convert the multiple database results to a single product, logging an error to sentry if
	 * more than one result was returned, as such a case would mean products are not getting inserted properly or our selecting
	 * conditions are too broad. Either way, updates would have to be made.
	 *
	 * Did I need to make our own list just for this convenience function as a static utility would be functional equivalent?
	 * No, but its cool.
	 */
This does nothing more than convert the multiple database results to a single product, logging an error to sentry if
more than one result was returned, as such a case would mean products are not getting inserted properly or our selecting
conditions are too broad. Either way, updates would have to be made.

Did I need to make our own list just for this convenience function as a static utility would be functional equivalent.
No, but its cool.
This does nothing more than convert the multiple database results to a single product logging an error to sentry if more than one result was returned as such a case would mean products are not getting inserted properly or our selecting conditions are too broad . Either way updates would have to be made . Did I need to make our own list just for this convenience function as a static utility would be functional equivalent . No but its cool .
public Optional<P> warningReducer() {
		if(!this.isEmpty()) {
			P product = this.get(0);
			if(this.size() > 1) {
				logger.error("[ProductDataService] - More than one product found during existing lookup! Type: [{}] IDs: [{}]",
						product.getClass().getSimpleName(),
						this.stream().map(P::getId).map(String::valueOf).collect(Collectors.joining(", ")));
			}
			return Optional.of(product);
		}
		return Optional.empty();
	}
public Optional < P > warningReducer ( ) { if ( ! this . isEmpty ( ) ) { P product = this . get ( 0 ) ; if ( this . size ( ) > 1 ) { logger . error ( "[ProductDataService] - More than one product found during existing lookup! Type: [{}] IDs: [{}]" , product . getClass ( ) . getSimpleName ( ) , this . stream ( ) . map ( P :: getId ) . map ( String :: valueOf ) . collect ( Collectors . joining ( ", " ) ) ) ; } return Optional . of ( product ) ; } return Optional . empty ( ) ; }
This does nothing more than convert the multiple database results to a single product, logging an error to sentry if
 more than one result was returned, as such a case would mean products are not getting inserted properly or our selecting
 conditions are too broad.
This does nothing more than convert the multiple database results to a single product logging an error to sentry if more than one result was returned as such a case would mean products are not getting inserted properly or our selecting conditions are too broad .