Class CustomFieldDaoImpl
java.lang.Object
com.broadleafcommerce.customfield.dao.CustomFieldDaoImpl
- All Implemented Interfaces:
CustomFieldDao
@Repository("blCustomFieldDao")
public class CustomFieldDaoImpl
extends Object
implements CustomFieldDao
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected jakarta.persistence.EntityManagerprotected com.broadleafcommerce.enterprise.common.extension.customfield.CustomFieldQueryExtensionManager -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected List<CustomField>filterResults(List<CustomField> results) getEntityTypeLookups(String targetEntityName) readAllowedValuesForCustomField(CustomField customField) Returns the allowedEnumValues for the given custom fieldreadIsMultiValueByPropertyName(String propertyName, String targetEntityName) Returns whether the associated CustomField is marked as allowMultiValueSelectReturns all knownCustomFieldsretrieveByFriendlyName(String friendlyName, String targetEntityName) Get a list of custom fields for the given friendly name and target entityretrieveById(Long id) Get the custom field via its primary key valueretrieveByName(String propertyName, String friendlyName, String targetEntityName) Get a list of custom fields via the attribute name.retrieveByPropertyName(String propertyName, String targetEntityName) Get a list of custom fields for the given property name and target entityretrieveByTargetEntityName(String targetEntityName) Get a list of custom fields via the target entity name.save(CustomField customField) Persists the given customField and returns the persisted version
-
Field Details
-
em
protected jakarta.persistence.EntityManager em -
extensionManager
protected com.broadleafcommerce.enterprise.common.extension.customfield.CustomFieldQueryExtensionManager extensionManager
-
-
Constructor Details
-
CustomFieldDaoImpl
public CustomFieldDaoImpl()
-
-
Method Details
-
retrieveById
Description copied from interface:CustomFieldDaoGet the custom field via its primary key value- Specified by:
retrieveByIdin interfaceCustomFieldDao- Parameters:
id- the primary key value- Returns:
- the custom field instance
-
save
Description copied from interface:CustomFieldDaoPersists the given customField and returns the persisted version- Specified by:
savein interfaceCustomFieldDao- Returns:
- the persisted version
-
readAllowedValuesForCustomField
Description copied from interface:CustomFieldDaoReturns the allowedEnumValues for the given custom field- Specified by:
readAllowedValuesForCustomFieldin interfaceCustomFieldDao- Returns:
-
retrieveAll
Description copied from interface:CustomFieldDaoReturns all knownCustomFields- Specified by:
retrieveAllin interfaceCustomFieldDao- Returns:
- all known
CustomFields
-
retrieveByTargetEntityName
Description copied from interface:CustomFieldDaoGet a list of custom fields via the target entity name. The target entity is the fully qualified class name of the entity type that contains the attribute map for list of returned custom fields.- Specified by:
retrieveByTargetEntityNamein interfaceCustomFieldDao- Parameters:
targetEntityName- the entity type that contains the attribute map for the custom fields.- Returns:
- the custom field instances that are related to the target entity type.
-
getEntityTypeLookups
-
retrieveByName
public List<CustomField> retrieveByName(String propertyName, String friendlyName, String targetEntityName) Description copied from interface:CustomFieldDaoGet a list of custom fields via the attribute name.- Specified by:
retrieveByNamein interfaceCustomFieldDao- Parameters:
propertyName- the property name for a custom fieldfriendlyName- the user visible name for the fieldtargetEntityName- the entity type that contains the attribute map for the custom fields.- Returns:
- the custom field instances
-
retrieveByFriendlyName
Description copied from interface:CustomFieldDaoGet a list of custom fields for the given friendly name and target entity- Specified by:
retrieveByFriendlyNamein interfaceCustomFieldDao- Parameters:
friendlyName- the friendly name of the custom field to retrievetargetEntityName- the target entity for the custom field to retrieve- Returns:
-
retrieveByPropertyName
Description copied from interface:CustomFieldDaoGet a list of custom fields for the given property name and target entity- Specified by:
retrieveByPropertyNamein interfaceCustomFieldDao- Parameters:
propertyName- the property name of the custom field to retreivetargetEntityName- the target entity for the custom field to retrieve- Returns:
-
readIsMultiValueByPropertyName
Description copied from interface:CustomFieldDaoReturns whether the associated CustomField is marked as allowMultiValueSelect- Specified by:
readIsMultiValueByPropertyNamein interfaceCustomFieldDao- Returns:
-
filterResults
-