Class CommerceShippingMethodUtil

java.lang.Object
com.liferay.commerce.service.persistence.CommerceShippingMethodUtil

public class CommerceShippingMethodUtil extends Object
The persistence utility for the commerce shipping method service. This utility wraps com.liferay.commerce.service.persistence.impl.CommerceShippingMethodPersistenceImpl and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.

Caching information and settings can be found in portal.properties

See Also:
Generated:
  • Constructor Details

    • CommerceShippingMethodUtil

      public CommerceShippingMethodUtil()
  • Method Details

    • clearCache

      public static void clearCache()
      See Also:
      • BasePersistence.clearCache()
    • clearCache

      public static void clearCache(CommerceShippingMethod commerceShippingMethod)
      See Also:
      • BasePersistence.clearCache(com.liferay.portal.kernel.model.BaseModel)
    • countWithDynamicQuery

      public static long countWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
      See Also:
      • BasePersistence.countWithDynamicQuery(DynamicQuery)
    • fetchByPrimaryKeys

      public static Map<Serializable,CommerceShippingMethod> fetchByPrimaryKeys(Set<Serializable> primaryKeys)
      See Also:
      • BasePersistence.fetchByPrimaryKeys(Set)
    • findWithDynamicQuery

      public static List<CommerceShippingMethod> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
      See Also:
      • BasePersistence.findWithDynamicQuery(DynamicQuery)
    • findWithDynamicQuery

      public static List<CommerceShippingMethod> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end)
      See Also:
      • BasePersistence.findWithDynamicQuery(DynamicQuery, int, int)
    • findWithDynamicQuery

      public static List<CommerceShippingMethod> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CommerceShippingMethod> orderByComparator)
      See Also:
      • BasePersistence.findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
    • update

      public static CommerceShippingMethod update(CommerceShippingMethod commerceShippingMethod)
      See Also:
      • BasePersistence.update(com.liferay.portal.kernel.model.BaseModel)
    • update

      public static CommerceShippingMethod update(CommerceShippingMethod commerceShippingMethod, com.liferay.portal.kernel.service.ServiceContext serviceContext)
      See Also:
      • BasePersistence.update(com.liferay.portal.kernel.model.BaseModel, ServiceContext)
    • findByGroupId

      public static List<CommerceShippingMethod> findByGroupId(long groupId)
      Returns all the commerce shipping methods where groupId = ?.
      Parameters:
      groupId - the group ID
      Returns:
      the matching commerce shipping methods
    • findByGroupId

      public static List<CommerceShippingMethod> findByGroupId(long groupId, int start, int end)
      Returns a range of all the commerce shipping methods where groupId = ?.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from CommerceShippingMethodModelImpl.

      Parameters:
      groupId - the group ID
      start - the lower bound of the range of commerce shipping methods
      end - the upper bound of the range of commerce shipping methods (not inclusive)
      Returns:
      the range of matching commerce shipping methods
    • findByGroupId

      public static List<CommerceShippingMethod> findByGroupId(long groupId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CommerceShippingMethod> orderByComparator)
      Returns an ordered range of all the commerce shipping methods where groupId = ?.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from CommerceShippingMethodModelImpl.

      Parameters:
      groupId - the group ID
      start - the lower bound of the range of commerce shipping methods
      end - the upper bound of the range of commerce shipping methods (not inclusive)
      orderByComparator - the comparator to order the results by (optionally null)
      Returns:
      the ordered range of matching commerce shipping methods
    • findByGroupId

      public static List<CommerceShippingMethod> findByGroupId(long groupId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CommerceShippingMethod> orderByComparator, boolean useFinderCache)
      Returns an ordered range of all the commerce shipping methods where groupId = ?.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from CommerceShippingMethodModelImpl.

      Parameters:
      groupId - the group ID
      start - the lower bound of the range of commerce shipping methods
      end - the upper bound of the range of commerce shipping methods (not inclusive)
      orderByComparator - the comparator to order the results by (optionally null)
      useFinderCache - whether to use the finder cache
      Returns:
      the ordered range of matching commerce shipping methods
    • findByGroupId_First

      public static CommerceShippingMethod findByGroupId_First(long groupId, com.liferay.portal.kernel.util.OrderByComparator<CommerceShippingMethod> orderByComparator) throws NoSuchShippingMethodException
      Returns the first commerce shipping method in the ordered set where groupId = ?.
      Parameters:
      groupId - the group ID
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the first matching commerce shipping method
      Throws:
      NoSuchShippingMethodException - if a matching commerce shipping method could not be found
      NoSuchShippingMethodException
    • fetchByGroupId_First

      public static CommerceShippingMethod fetchByGroupId_First(long groupId, com.liferay.portal.kernel.util.OrderByComparator<CommerceShippingMethod> orderByComparator)
      Returns the first commerce shipping method in the ordered set where groupId = ?.
      Parameters:
      groupId - the group ID
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the first matching commerce shipping method, or null if a matching commerce shipping method could not be found
    • findByGroupId_Last

      public static CommerceShippingMethod findByGroupId_Last(long groupId, com.liferay.portal.kernel.util.OrderByComparator<CommerceShippingMethod> orderByComparator) throws NoSuchShippingMethodException
      Returns the last commerce shipping method in the ordered set where groupId = ?.
      Parameters:
      groupId - the group ID
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the last matching commerce shipping method
      Throws:
      NoSuchShippingMethodException - if a matching commerce shipping method could not be found
      NoSuchShippingMethodException
    • fetchByGroupId_Last

      public static CommerceShippingMethod fetchByGroupId_Last(long groupId, com.liferay.portal.kernel.util.OrderByComparator<CommerceShippingMethod> orderByComparator)
      Returns the last commerce shipping method in the ordered set where groupId = ?.
      Parameters:
      groupId - the group ID
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the last matching commerce shipping method, or null if a matching commerce shipping method could not be found
    • findByGroupId_PrevAndNext

      public static CommerceShippingMethod[] findByGroupId_PrevAndNext(long commerceShippingMethodId, long groupId, com.liferay.portal.kernel.util.OrderByComparator<CommerceShippingMethod> orderByComparator) throws NoSuchShippingMethodException
      Returns the commerce shipping methods before and after the current commerce shipping method in the ordered set where groupId = ?.
      Parameters:
      commerceShippingMethodId - the primary key of the current commerce shipping method
      groupId - the group ID
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the previous, current, and next commerce shipping method
      Throws:
      NoSuchShippingMethodException - if a commerce shipping method with the primary key could not be found
      NoSuchShippingMethodException
    • removeByGroupId

      public static void removeByGroupId(long groupId)
      Removes all the commerce shipping methods where groupId = ? from the database.
      Parameters:
      groupId - the group ID
    • countByGroupId

      public static int countByGroupId(long groupId)
      Returns the number of commerce shipping methods where groupId = ?.
      Parameters:
      groupId - the group ID
      Returns:
      the number of matching commerce shipping methods
    • findByG_A

      public static List<CommerceShippingMethod> findByG_A(long groupId, boolean active)
      Returns all the commerce shipping methods where groupId = ? and active = ?.
      Parameters:
      groupId - the group ID
      active - the active
      Returns:
      the matching commerce shipping methods
    • findByG_A

      public static List<CommerceShippingMethod> findByG_A(long groupId, boolean active, int start, int end)
      Returns a range of all the commerce shipping methods where groupId = ? and active = ?.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from CommerceShippingMethodModelImpl.

      Parameters:
      groupId - the group ID
      active - the active
      start - the lower bound of the range of commerce shipping methods
      end - the upper bound of the range of commerce shipping methods (not inclusive)
      Returns:
      the range of matching commerce shipping methods
    • findByG_A

      public static List<CommerceShippingMethod> findByG_A(long groupId, boolean active, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CommerceShippingMethod> orderByComparator)
      Returns an ordered range of all the commerce shipping methods where groupId = ? and active = ?.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from CommerceShippingMethodModelImpl.

      Parameters:
      groupId - the group ID
      active - the active
      start - the lower bound of the range of commerce shipping methods
      end - the upper bound of the range of commerce shipping methods (not inclusive)
      orderByComparator - the comparator to order the results by (optionally null)
      Returns:
      the ordered range of matching commerce shipping methods
    • findByG_A

      public static List<CommerceShippingMethod> findByG_A(long groupId, boolean active, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CommerceShippingMethod> orderByComparator, boolean useFinderCache)
      Returns an ordered range of all the commerce shipping methods where groupId = ? and active = ?.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from CommerceShippingMethodModelImpl.

      Parameters:
      groupId - the group ID
      active - the active
      start - the lower bound of the range of commerce shipping methods
      end - the upper bound of the range of commerce shipping methods (not inclusive)
      orderByComparator - the comparator to order the results by (optionally null)
      useFinderCache - whether to use the finder cache
      Returns:
      the ordered range of matching commerce shipping methods
    • findByG_A_First

      public static CommerceShippingMethod findByG_A_First(long groupId, boolean active, com.liferay.portal.kernel.util.OrderByComparator<CommerceShippingMethod> orderByComparator) throws NoSuchShippingMethodException
      Returns the first commerce shipping method in the ordered set where groupId = ? and active = ?.
      Parameters:
      groupId - the group ID
      active - the active
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the first matching commerce shipping method
      Throws:
      NoSuchShippingMethodException - if a matching commerce shipping method could not be found
      NoSuchShippingMethodException
    • fetchByG_A_First

      public static CommerceShippingMethod fetchByG_A_First(long groupId, boolean active, com.liferay.portal.kernel.util.OrderByComparator<CommerceShippingMethod> orderByComparator)
      Returns the first commerce shipping method in the ordered set where groupId = ? and active = ?.
      Parameters:
      groupId - the group ID
      active - the active
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the first matching commerce shipping method, or null if a matching commerce shipping method could not be found
    • findByG_A_Last

      public static CommerceShippingMethod findByG_A_Last(long groupId, boolean active, com.liferay.portal.kernel.util.OrderByComparator<CommerceShippingMethod> orderByComparator) throws NoSuchShippingMethodException
      Returns the last commerce shipping method in the ordered set where groupId = ? and active = ?.
      Parameters:
      groupId - the group ID
      active - the active
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the last matching commerce shipping method
      Throws:
      NoSuchShippingMethodException - if a matching commerce shipping method could not be found
      NoSuchShippingMethodException
    • fetchByG_A_Last

      public static CommerceShippingMethod fetchByG_A_Last(long groupId, boolean active, com.liferay.portal.kernel.util.OrderByComparator<CommerceShippingMethod> orderByComparator)
      Returns the last commerce shipping method in the ordered set where groupId = ? and active = ?.
      Parameters:
      groupId - the group ID
      active - the active
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the last matching commerce shipping method, or null if a matching commerce shipping method could not be found
    • findByG_A_PrevAndNext

      public static CommerceShippingMethod[] findByG_A_PrevAndNext(long commerceShippingMethodId, long groupId, boolean active, com.liferay.portal.kernel.util.OrderByComparator<CommerceShippingMethod> orderByComparator) throws NoSuchShippingMethodException
      Returns the commerce shipping methods before and after the current commerce shipping method in the ordered set where groupId = ? and active = ?.
      Parameters:
      commerceShippingMethodId - the primary key of the current commerce shipping method
      groupId - the group ID
      active - the active
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the previous, current, and next commerce shipping method
      Throws:
      NoSuchShippingMethodException - if a commerce shipping method with the primary key could not be found
      NoSuchShippingMethodException
    • removeByG_A

      public static void removeByG_A(long groupId, boolean active)
      Removes all the commerce shipping methods where groupId = ? and active = ? from the database.
      Parameters:
      groupId - the group ID
      active - the active
    • countByG_A

      public static int countByG_A(long groupId, boolean active)
      Returns the number of commerce shipping methods where groupId = ? and active = ?.
      Parameters:
      groupId - the group ID
      active - the active
      Returns:
      the number of matching commerce shipping methods
    • findByG_E

      public static CommerceShippingMethod findByG_E(long groupId, String engineKey) throws NoSuchShippingMethodException
      Returns the commerce shipping method where groupId = ? and engineKey = ? or throws a NoSuchShippingMethodException if it could not be found.
      Parameters:
      groupId - the group ID
      engineKey - the engine key
      Returns:
      the matching commerce shipping method
      Throws:
      NoSuchShippingMethodException - if a matching commerce shipping method could not be found
      NoSuchShippingMethodException
    • fetchByG_E

      public static CommerceShippingMethod fetchByG_E(long groupId, String engineKey)
      Returns the commerce shipping method where groupId = ? and engineKey = ? or returns null if it could not be found. Uses the finder cache.
      Parameters:
      groupId - the group ID
      engineKey - the engine key
      Returns:
      the matching commerce shipping method, or null if a matching commerce shipping method could not be found
    • fetchByG_E

      public static CommerceShippingMethod fetchByG_E(long groupId, String engineKey, boolean useFinderCache)
      Returns the commerce shipping method where groupId = ? and engineKey = ? or returns null if it could not be found, optionally using the finder cache.
      Parameters:
      groupId - the group ID
      engineKey - the engine key
      useFinderCache - whether to use the finder cache
      Returns:
      the matching commerce shipping method, or null if a matching commerce shipping method could not be found
    • removeByG_E

      public static CommerceShippingMethod removeByG_E(long groupId, String engineKey) throws NoSuchShippingMethodException
      Removes the commerce shipping method where groupId = ? and engineKey = ? from the database.
      Parameters:
      groupId - the group ID
      engineKey - the engine key
      Returns:
      the commerce shipping method that was removed
      Throws:
      NoSuchShippingMethodException
    • countByG_E

      public static int countByG_E(long groupId, String engineKey)
      Returns the number of commerce shipping methods where groupId = ? and engineKey = ?.
      Parameters:
      groupId - the group ID
      engineKey - the engine key
      Returns:
      the number of matching commerce shipping methods
    • cacheResult

      public static void cacheResult(CommerceShippingMethod commerceShippingMethod)
      Caches the commerce shipping method in the entity cache if it is enabled.
      Parameters:
      commerceShippingMethod - the commerce shipping method
    • cacheResult

      public static void cacheResult(List<CommerceShippingMethod> commerceShippingMethods)
      Caches the commerce shipping methods in the entity cache if it is enabled.
      Parameters:
      commerceShippingMethods - the commerce shipping methods
    • create

      public static CommerceShippingMethod create(long commerceShippingMethodId)
      Creates a new commerce shipping method with the primary key. Does not add the commerce shipping method to the database.
      Parameters:
      commerceShippingMethodId - the primary key for the new commerce shipping method
      Returns:
      the new commerce shipping method
    • remove

      public static CommerceShippingMethod remove(long commerceShippingMethodId) throws NoSuchShippingMethodException
      Removes the commerce shipping method with the primary key from the database. Also notifies the appropriate model listeners.
      Parameters:
      commerceShippingMethodId - the primary key of the commerce shipping method
      Returns:
      the commerce shipping method that was removed
      Throws:
      NoSuchShippingMethodException - if a commerce shipping method with the primary key could not be found
      NoSuchShippingMethodException
    • updateImpl

      public static CommerceShippingMethod updateImpl(CommerceShippingMethod commerceShippingMethod)
    • findByPrimaryKey

      public static CommerceShippingMethod findByPrimaryKey(long commerceShippingMethodId) throws NoSuchShippingMethodException
      Returns the commerce shipping method with the primary key or throws a NoSuchShippingMethodException if it could not be found.
      Parameters:
      commerceShippingMethodId - the primary key of the commerce shipping method
      Returns:
      the commerce shipping method
      Throws:
      NoSuchShippingMethodException - if a commerce shipping method with the primary key could not be found
      NoSuchShippingMethodException
    • fetchByPrimaryKey

      public static CommerceShippingMethod fetchByPrimaryKey(long commerceShippingMethodId)
      Returns the commerce shipping method with the primary key or returns null if it could not be found.
      Parameters:
      commerceShippingMethodId - the primary key of the commerce shipping method
      Returns:
      the commerce shipping method, or null if a commerce shipping method with the primary key could not be found
    • findAll

      public static List<CommerceShippingMethod> findAll()
      Returns all the commerce shipping methods.
      Returns:
      the commerce shipping methods
    • findAll

      public static List<CommerceShippingMethod> findAll(int start, int end)
      Returns a range of all the commerce shipping methods.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from CommerceShippingMethodModelImpl.

      Parameters:
      start - the lower bound of the range of commerce shipping methods
      end - the upper bound of the range of commerce shipping methods (not inclusive)
      Returns:
      the range of commerce shipping methods
    • findAll

      public static List<CommerceShippingMethod> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CommerceShippingMethod> orderByComparator)
      Returns an ordered range of all the commerce shipping methods.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from CommerceShippingMethodModelImpl.

      Parameters:
      start - the lower bound of the range of commerce shipping methods
      end - the upper bound of the range of commerce shipping methods (not inclusive)
      orderByComparator - the comparator to order the results by (optionally null)
      Returns:
      the ordered range of commerce shipping methods
    • findAll

      public static List<CommerceShippingMethod> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CommerceShippingMethod> orderByComparator, boolean useFinderCache)
      Returns an ordered range of all the commerce shipping methods.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from CommerceShippingMethodModelImpl.

      Parameters:
      start - the lower bound of the range of commerce shipping methods
      end - the upper bound of the range of commerce shipping methods (not inclusive)
      orderByComparator - the comparator to order the results by (optionally null)
      useFinderCache - whether to use the finder cache
      Returns:
      the ordered range of commerce shipping methods
    • removeAll

      public static void removeAll()
      Removes all the commerce shipping methods from the database.
    • countAll

      public static int countAll()
      Returns the number of commerce shipping methods.
      Returns:
      the number of commerce shipping methods
    • getPersistence

      public static CommerceShippingMethodPersistence getPersistence()
    • setPersistence

      public static void setPersistence(CommerceShippingMethodPersistence persistence)