@Component(value="cuba_AttributeOptionsLoader") public class AttributeOptionsLoaderImpl extends java.lang.Object implements AttributeOptionsLoader
Modifier and Type | Class and Description |
---|---|
static interface |
AttributeOptionsLoaderImpl.OptionsLoaderStrategy |
protected static class |
AttributeOptionsLoaderImpl.SqlQuery |
Modifier and Type | Field and Description |
---|---|
protected static java.util.regex.Pattern |
COMMON_PARAM_PATTERN |
protected DataManager |
dataManager |
protected static java.lang.String |
ENTITY_FIELD_QUERY_PARAM |
protected static java.lang.String |
ENTITY_QUERY_PARAM |
protected java.util.Map<java.lang.String,AttributeOptionsLoaderImpl.OptionsLoaderStrategy> |
loaderStrategies |
protected Metadata |
metadata |
protected Persistence |
persistence |
protected Scripting |
scripting |
NAME
Constructor and Description |
---|
AttributeOptionsLoaderImpl() |
Modifier and Type | Method and Description |
---|---|
protected LoadContext.Query |
buildJpqlQuery(java.lang.String script,
java.util.Map<java.lang.String,java.lang.Object> params) |
protected AttributeOptionsLoaderImpl.SqlQuery |
buildSqlQuery(java.lang.String script,
java.util.Map<java.lang.String,java.lang.Object> params) |
protected java.util.List |
executeGroovyScript(BaseGenericIdEntity entity,
CategoryAttribute attribute,
java.lang.String script) |
protected java.util.List |
executeJpql(BaseGenericIdEntity entity,
CategoryAttribute attribute,
java.lang.String script) |
protected java.util.List |
executeSql(BaseGenericIdEntity entity,
CategoryAttribute attribute,
java.lang.String script) |
protected java.lang.Object |
getQueryParameterValue(java.lang.String name,
java.util.Map<java.lang.String,java.lang.Object> params) |
void |
init() |
java.util.List |
loadOptions(BaseGenericIdEntity entity,
CategoryAttribute attribute) |
protected AttributeOptionsLoaderImpl.OptionsLoaderStrategy |
resolveLoaderStrategy(CategoryAttributeOptionsLoaderType loaderType) |
protected final java.util.Map<java.lang.String,AttributeOptionsLoaderImpl.OptionsLoaderStrategy> loaderStrategies
@Inject protected Scripting scripting
@Inject protected Persistence persistence
@Inject protected DataManager dataManager
@Inject protected Metadata metadata
protected static final java.lang.String ENTITY_QUERY_PARAM
protected static final java.lang.String ENTITY_FIELD_QUERY_PARAM
protected static final java.util.regex.Pattern COMMON_PARAM_PATTERN
@PostConstruct public void init()
public java.util.List loadOptions(BaseGenericIdEntity entity, CategoryAttribute attribute)
loadOptions
in interface AttributeOptionsLoader
protected AttributeOptionsLoaderImpl.OptionsLoaderStrategy resolveLoaderStrategy(CategoryAttributeOptionsLoaderType loaderType)
protected java.util.List executeSql(BaseGenericIdEntity entity, CategoryAttribute attribute, java.lang.String script)
protected AttributeOptionsLoaderImpl.SqlQuery buildSqlQuery(java.lang.String script, java.util.Map<java.lang.String,java.lang.Object> params)
protected java.lang.Object getQueryParameterValue(java.lang.String name, java.util.Map<java.lang.String,java.lang.Object> params)
protected java.util.List executeJpql(BaseGenericIdEntity entity, CategoryAttribute attribute, java.lang.String script)
protected LoadContext.Query buildJpqlQuery(java.lang.String script, java.util.Map<java.lang.String,java.lang.Object> params)
protected java.util.List executeGroovyScript(BaseGenericIdEntity entity, CategoryAttribute attribute, java.lang.String script)