Interface AttributeRepository

All Superinterfaces:
org.springframework.data.repository.CrudRepository<Attribute,Long>, org.springframework.data.jpa.repository.JpaSpecificationExecutor<Attribute>, org.springframework.data.querydsl.QuerydslPredicateExecutor<Attribute>, org.springframework.data.repository.Repository<Attribute,Long>

@CacheConfig(cacheNames="Search_Attribute_Cache") public interface AttributeRepository extends org.springframework.data.repository.CrudRepository<Attribute,Long>, org.springframework.data.jpa.repository.JpaSpecificationExecutor<Attribute>, org.springframework.data.querydsl.QuerydslPredicateExecutor<Attribute>

This interface is the AttributeRepository. Handles CRUD operations of Attribute entity

  • Method Details

    • findByConfigIdAndAttributeIdAndVersion

      Optional<Attribute> findByConfigIdAndAttributeIdAndVersion(long configId, String attributeId, String version)
      This function is used to find the Attribute based on config id and attribute id.
      Parameters:
      configId - Holds the config identifier.
      attributeId - Holds the attribute identifier.
      version - Holds the version identifier.
      Returns:
      It returns the attribute entity.
    • findByConfigIdAndAttributeIdAndVersionIgnoreCase

      Optional<Attribute> findByConfigIdAndAttributeIdAndVersionIgnoreCase(long configId, String attributeId, String version)
    • findByConfigIdAndAttributeIdWithCollectionIdAndVersion

      @Cacheable(key="\'COL-ID_\'+#p2+\'*FindAttributeByConfigId_\'+#p0+\'AndAttributeId_\'+#p1", unless="#result==null") default Optional<Attribute> findByConfigIdAndAttributeIdWithCollectionIdAndVersion(long configId, String attributeId, long collectionId, String version)
      It will find the attribute based on input.
      Parameters:
      configId - Holds the config identifier.
      attributeId - It denotes the attribute identifier.
      collectionId - holds the collection identifier.
      version - holds the version identifier.
      Returns:
      It returns the attribute entity.
    • deleteByConfigIdAndAttributeIdWithCollectionId

      @CacheEvict(key="\'COL-ID_\'+#p2+\'*FindAttributeByConfigId_\'+#p0+\'AndAttributeId_\'+#p1") @CacheEvict(key="\'COL-ID_\'+#p2+\'*FindByConfigIdAndCollectionId_\'+#p0") @CacheEvict(key="\'COL-ID_\'+#p2+\'*CommonProcess_GetAttributesByConfigId\'+#p0") default void deleteByConfigIdAndAttributeIdWithCollectionId(long configId, String attributeId, long collectionId)
      This function deletes the attribute.
      Parameters:
      configId - Holds the config identifier.
      attributeId - It contains the attribute identifier.
      collectionId - It have collection identifier.
    • deleteByConfigIdAndAttributeId

      void deleteByConfigIdAndAttributeId(long configId, String attributeId)
      This function deletes the attribute.
      Parameters:
      configId - Holds the config identifier.
      attributeId - Holds the attribute identifier.
    • findByConfigIdAndVersion

      Iterable<Attribute> findByConfigIdAndVersion(long configId, String version)
      This function finds the attributes.
      Parameters:
      configId - Holds the config identifier.
      version - Holds the version identifier.
      Returns:
      It returns the list of attribute entity.
    • findByConfigIdAndVersionIgnoreCase

      Iterable<Attribute> findByConfigIdAndVersionIgnoreCase(long configId, String version)
      Parameters:
      configId -
      version -
      Returns:
    • findByConfigIdAndCollectionId

      @Cacheable(key="\'COL-ID_\'+#p1+\'*FindByConfigIdAndCollectionId_\'+#p0", unless="#result==null") default Iterable<Attribute> findByConfigIdAndCollectionId(long configId, long collectionId, String version)
      This function finds the attributes.
      Parameters:
      configId - Holds the config identifier.
      collectionId - Holds the collection identifier.
      version - holds the version identifier.
      Returns:
      It returns the list of attribute entity.
    • save

      @CacheEvict(key="\'COL-ID_\'+#p1+\'*FindByConfigIdAndCollectionId_\'+#attribute.configId") @CacheEvict(key="\'COL-ID_\'+#p1+\'*CommonProcess_GetAttributesByConfigId\'+#attribute.configId") default Attribute save(Attribute attribute, long collectionId)
      This function is used to update the existing attribute.
      Parameters:
      attribute - Holds the attribute data for updating.
      collectionId - Holds the collection identifier.
      Returns:
      It returns the attribute which is updated.
    • update

      @CacheEvict(key="\'COL-ID_\'+#p1+\'*FindAttributeByConfigId_\'+#attribute.configId+\'AndAttributeId_\'+#attribute.attributeId",condition="#attribute!=null") @CacheEvict(key="\'COL-ID_\'+#p1+\'*FindByConfigIdAndCollectionId_\'+#attribute.configId",condition="#attribute!=null") @CacheEvict(key="\'COL-ID_\'+#p1+\'*CommonProcess_GetAttributesByConfigId\'+#attribute.configId",condition="#attribute!=null") default Attribute update(Attribute attribute, long collectionId)
      This function is used to update the existing attribute.
      Parameters:
      attribute - Holds the attribute data for updating.
      collectionId - Holds the collection identifier.
      Returns:
      It returns the attribute which is updated.