Class CriteriaTransferObject

java.lang.Object
org.broadleafcommerce.openadmin.dto.CriteriaTransferObject

public class CriteriaTransferObject extends Object
Generic persistent entity criteria transfer object. Provides a storage mechanism for query related information regarding an entity.
Author:
Jeff Fischer
  • Constructor Details

    • CriteriaTransferObject

      public CriteriaTransferObject()
  • Method Details

    • getFirstResult

      public Integer getFirstResult()
      The index of records in the database for which a fetch will start.
      Returns:
      the index to start, or null
    • setFirstResult

      public void setFirstResult(Integer firstResult)
      The index of records in the datastore for which a fetch will start.
      Parameters:
      firstResult - the index to start, or null
    • getMaxResults

      public Integer getMaxResults()
      The max number of records from the datastore to return.
      Returns:
      the max records, or null
    • setMaxResults

      public void setMaxResults(Integer maxResults)
      The max number of records from the datastore to return.
      Parameters:
      maxResults - the max records, or null
    • getLastId

      public Long getLastId()
    • setLastId

      public void setLastId(Long lastId)
    • getFirstId

      public Long getFirstId()
    • setFirstId

      public void setFirstId(Long firstId)
    • getUpperCount

      public Integer getUpperCount()
    • setUpperCount

      public void setUpperCount(Integer upperCount)
    • getLowerCount

      public Integer getLowerCount()
    • setLowerCount

      public void setLowerCount(Integer lowerCount)
    • getPresentationFetch

      public Boolean getPresentationFetch()
    • setPresentationFetch

      public void setPresentationFetch(Boolean presentationFetch)
    • add

      public void add(FilterAndSortCriteria criteria)
      Add a FilterAndSortCriteria instance. Contains information about which records are retrieved and in what direction they're sorted.
      Parameters:
      criteria - FilterAndSortCriteria
    • addAll

      public void addAll(Collection<FilterAndSortCriteria> criterias)
      Add all FilterAndSortCriteria instances. Contains information about which records are retrieved and in what direction they're sorted.
      Parameters:
      criterias - the list of FilterAndSortCriteria instances to add
    • getCriteriaMap

      public Map<String,FilterAndSortCriteria> getCriteriaMap()
      Retrieve the added FilterAndSortCriteria instances organized into a map
      Returns:
      the FilterAndSortCriteria instances as a map
    • setCriteriaMap

      public void setCriteriaMap(Map<String,FilterAndSortCriteria> criteriaMap)
    • get

      public FilterAndSortCriteria get(String name)
    • defaultSortDirectionForFieldIfUnset

      public void defaultSortDirectionForFieldIfUnset(String name, SortDirection defaultDirection)
    • getAdditionalFilterMappings

      public List<FilterMapping> getAdditionalFilterMappings()
      This list holds additional filter mappings that might have been constructed in a custom persistence handler. This is only used when very custom filtering needs to occur.
    • setAdditionalFilterMappings

      public void setAdditionalFilterMappings(List<FilterMapping> additionalFilterMappings)
    • getNonCountAdditionalFilterMappings

      public List<FilterMapping> getNonCountAdditionalFilterMappings()
      This list holds additional filter mappings that might have been constructed in a custom persistence handler. This is only used when very custom filtering needs to occur.

      These filter mappings will NOT be applied to the query that gathers the total number of results. This especially applies to queries that include join fetches where the total number of results should not include the join fetched items. An example of this is defaultSku and defaultCategory being join fetched when querying for a set of products. In this case, these filter mappings are applied to also return the defaultSku and defaultCategory of each product, but the total number of results should only include the number of products.

    • setNonCountAdditionalFilterMappings

      public void setNonCountAdditionalFilterMappings(List<FilterMapping> nonCountAdditionalFilterMappings)
    • isFolderLookup

      public boolean isFolderLookup()
      Tells if this is a foldered fetch
      Returns:
      true if this is a folder lookup, false otherwise
    • setFolderLookup

      public void setFolderLookup(Boolean folderLookup)
    • getFolderId

      public Long getFolderId()
      Gets the folder ID to filter a fetch on so that only entities in a folder will be shown. If this is null while folderLookup is true, this means find entities not assigned to a folder.
      Returns:
      the folder ID
    • setFolderId

      public void setFolderId(Long folderId)