Class ProjectionTypeFactory
- java.lang.Object
-
- com.broadleafcommerce.common.extension.ProjectionTypeFactory
-
public final class ProjectionTypeFactory extends Object
Factory for providing instantations of concrete implementations of theProjectioninterface based on a reference persistence domain class.- Author:
- Jeff Fischer
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> Projection<T>get(Class<T> from)RetrieveProjectioninstance referencing the persistence domain class type.static <T> Projection<T>get(Class<T> from, String id)RetrieveProjectioninstance referencing the persistence domain class type.
-
-
-
Method Detail
-
get
public static <T> Projection<T> get(Class<T> from)
RetrieveProjectioninstance referencing the persistence domain class type. SeeProjectionFactoryfor more information on dynamic projections.- Type Parameters:
T- The persistence domain class type- Parameters:
from- The persistence domain class the projection instances references- Returns:
- The instantiated instance implementing Projection.
-
get
public static <T> Projection<T> get(Class<T> from, String id)
RetrieveProjectioninstance referencing the persistence domain class type. SeeProjectionFactoryfor more information on dynamic projections.- Type Parameters:
T- The persistence domain class type- Parameters:
from- The persistence domain class the projection instances referencesid- The id value to set on the projection instance (seeProjection.getId())- Returns:
- The instantiated instance implementing Projection.
-
-