Class CustomFieldDaoImpl

java.lang.Object
com.broadleafcommerce.customfield.dao.CustomFieldDaoImpl
All Implemented Interfaces:
CustomFieldDao

@Repository("blCustomFieldDao") public class CustomFieldDaoImpl extends Object implements CustomFieldDao
  • 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

      public CustomField retrieveById(Long id)
      Description copied from interface: CustomFieldDao
      Get the custom field via its primary key value
      Specified by:
      retrieveById in interface CustomFieldDao
      Parameters:
      id - the primary key value
      Returns:
      the custom field instance
    • save

      public CustomField save(CustomField customField)
      Description copied from interface: CustomFieldDao
      Persists the given customField and returns the persisted version
      Specified by:
      save in interface CustomFieldDao
      Returns:
      the persisted version
    • readAllowedValuesForCustomField

      public List<AllowedEnumValue> readAllowedValuesForCustomField(CustomField customField)
      Description copied from interface: CustomFieldDao
      Returns the allowedEnumValues for the given custom field
      Specified by:
      readAllowedValuesForCustomField in interface CustomFieldDao
      Returns:
    • retrieveAll

      public List<CustomField> retrieveAll()
      Description copied from interface: CustomFieldDao
      Returns all known CustomFields
      Specified by:
      retrieveAll in interface CustomFieldDao
      Returns:
      all known CustomFields
    • retrieveByTargetEntityName

      public List<CustomField> retrieveByTargetEntityName(String targetEntityName)
      Description copied from interface: CustomFieldDao
      Get 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:
      retrieveByTargetEntityName in interface CustomFieldDao
      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

      protected List<String> getEntityTypeLookups(String targetEntityName)
    • retrieveByName

      public List<CustomField> retrieveByName(String propertyName, String friendlyName, String targetEntityName)
      Description copied from interface: CustomFieldDao
      Get a list of custom fields via the attribute name.
      Specified by:
      retrieveByName in interface CustomFieldDao
      Parameters:
      propertyName - the property name for a custom field
      friendlyName - the user visible name for the field
      targetEntityName - the entity type that contains the attribute map for the custom fields.
      Returns:
      the custom field instances
    • retrieveByFriendlyName

      public List<CustomField> retrieveByFriendlyName(String friendlyName, String targetEntityName)
      Description copied from interface: CustomFieldDao
      Get a list of custom fields for the given friendly name and target entity
      Specified by:
      retrieveByFriendlyName in interface CustomFieldDao
      Parameters:
      friendlyName - the friendly name of the custom field to retrieve
      targetEntityName - the target entity for the custom field to retrieve
      Returns:
    • retrieveByPropertyName

      public List<CustomField> retrieveByPropertyName(String propertyName, String targetEntityName)
      Description copied from interface: CustomFieldDao
      Get a list of custom fields for the given property name and target entity
      Specified by:
      retrieveByPropertyName in interface CustomFieldDao
      Parameters:
      propertyName - the property name of the custom field to retreive
      targetEntityName - the target entity for the custom field to retrieve
      Returns:
    • readIsMultiValueByPropertyName

      public Boolean readIsMultiValueByPropertyName(String propertyName, String targetEntityName)
      Description copied from interface: CustomFieldDao
      Returns whether the associated CustomField is marked as allowMultiValueSelect
      Specified by:
      readIsMultiValueByPropertyName in interface CustomFieldDao
      Returns:
    • filterResults

      protected List<CustomField> filterResults(List<CustomField> results)