Class DefaultApplicationOwnedCatalogNativeSqlStrategy
- java.lang.Object
-
- com.broadleafcommerce.data.tracking.jpa.tenant.repository.strategies.DefaultApplicationOwnedCatalogNativeSqlStrategy
-
- All Implemented Interfaces:
NativeSqlStrategy
,org.springframework.core.Ordered
public class DefaultApplicationOwnedCatalogNativeSqlStrategy extends Object implements NativeSqlStrategy
Standard strategy for fetching an inheritance line from a starting catalog to a leaf catalog owned by a application. Covers Postgres, Mysql, and MariaDB.- Author:
- Jeff Fischer
-
-
Constructor Summary
Constructors Constructor Description DefaultApplicationOwnedCatalogNativeSqlStrategy(com.broadleafcommerce.data.tracking.jpa.IdType idType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getName()
The name of the strategyString
getSql(Map<String,Object> args)
The fully formed SQL queryboolean
isValid(javax.persistence.EntityManager em)
Is this strategy valid for the given entity manager.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.broadleafcommerce.data.tracking.jpa.persistence.NativeSqlStrategy
getOrder
-
-
-
-
Method Detail
-
isValid
public boolean isValid(javax.persistence.EntityManager em)
Description copied from interface:NativeSqlStrategy
Is this strategy valid for the given entity manager.- Specified by:
isValid
in interfaceNativeSqlStrategy
- Parameters:
em
- The entity manager instance to check- Returns:
- Whether or not this strategy is valid
-
getName
public String getName()
Description copied from interface:NativeSqlStrategy
The name of the strategy- Specified by:
getName
in interfaceNativeSqlStrategy
- Returns:
- The name of the strategy
-
getSql
public String getSql(Map<String,Object> args)
Description copied from interface:NativeSqlStrategy
The fully formed SQL query- Specified by:
getSql
in interfaceNativeSqlStrategy
- Parameters:
args
- Arguments passed to the strategy that could be useful during sql generation- Returns:
- The fully formed SQL query
-
-