Class ProjectionTypeFactory
- java.lang.Object
-
- com.broadleafcommerce.common.extension.ProjectionTypeFactory
-
public final class ProjectionTypeFactory extends Object
Factory for providing instantations of concrete implementations of theProjection
interface 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)
RetrieveProjection
instance referencing the persistence domain class type.static <T> Projection<T>
get(Class<T> from, String id)
RetrieveProjection
instance referencing the persistence domain class type.
-
-
-
Method Detail
-
get
public static <T> Projection<T> get(Class<T> from)
RetrieveProjection
instance referencing the persistence domain class type. SeeProjectionFactory
for 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)
RetrieveProjection
instance referencing the persistence domain class type. SeeProjectionFactory
for 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.
-
-