@Component(value="blExternalIdUtil") public class ExternalIdUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
protected javax.persistence.EntityManager |
em |
static String |
EXTERNAL_ID_HEADER |
| Constructor and Description |
|---|
ExternalIdUtil() |
| Modifier and Type | Method and Description |
|---|---|
javax.persistence.TypedQuery |
buildExternalIdLookupQuery(Class<?> clazz,
ExternalIdLookup externalIdLookup) |
String |
getExternalIdFieldName(Class<?> importingClass)
Returns the entity field name of the external ID for the given className
|
String |
getExternalIdFieldName(String className)
Convenience method for
getExternalIdFieldName(Class). |
String |
getExternalIdHeaderName(Class<?> importingClass)
Returns the CSV column name that contains the external ID for the given className
|
String |
getExternalIdHeaderName(String className)
Convenience method for
getExternalIdHeaderName(Class). |
public static final String EXTERNAL_ID_HEADER
protected javax.persistence.EntityManager em
public String getExternalIdHeaderName(String className)
getExternalIdHeaderName(Class). This will throw a RuntimeException if the
given className could not be instantiated.public String getExternalIdHeaderName(Class<?> importingClass)
importingClass - the class to checkEXTERNAL_ID_HEADER but this can differ per class. For instance, the externalId from
Product is on defaultSku.externalIdpublic String getExternalIdFieldName(String className)
getExternalIdFieldName(Class). This will throw a RuntimeException if the
given className could not be instantiated.public String getExternalIdFieldName(Class<?> importingClass)
importingClass - the class to checkpublic javax.persistence.TypedQuery buildExternalIdLookupQuery(Class<?> clazz, ExternalIdLookup externalIdLookup)
Copyright © 2020. All rights reserved.