Class CollectionUtil

java.lang.Object
com.skava.accounts.util.CollectionUtil
All Implemented Interfaces:
Serializable

public class CollectionUtil extends Object implements Serializable
The utility class AccountsUtil consists of helper and validator methods for collection entity.
Author:
Infosys Equinox
See Also:
  • Constructor Details

    • CollectionUtil

      public CollectionUtil()
  • Method Details

    • createAccountTypeForThisCollection

      public static void createAccountTypeForThisCollection(CollectionsEntity collectionEntity, AccountTypesRepository accountTypeRepository)
      This method is used to created Default accountypes for each newly created Collection
      Parameters:
      collectionEntity - the collectionEntity
      accountTypeRepository - the accountTypeRepository
    • createPaymentTermForThisCollection

      public static void createPaymentTermForThisCollection(CollectionsEntity collectionEntity, PaymentTermRepository paymentTermRepository)
      This method is used to created Default paymentTerm for each newly created Collection
      Parameters:
      collectionEntity - the collectionEntity
      paymentTermRepository - the paymentTermRepository
    • getCollectionProperties

      public static Collections getCollectionProperties(Collections collection, List<Properties> requestProperties, Iterable<CollectionAttributesEntity> attributesEntities, Set<String> ignoredPropertiesList, String locale, org.springframework.context.MessageSource messageSource)
      Gets the collection properties.
      Parameters:
      collection - the collection
      requestProperties - the request properties
      attributesEntities - the attributes entities
      ignoredPropertiesList - the ignored properties list
      locale - API Response and error messages will be responded in the locale mentioned in this parameter.
      messageSource - the message source
      Returns:
      the collection properties
    • getPropertiesNameFromRequest

      public static Set<String> getPropertiesNameFromRequest(List<Properties> requestProperties)
      Gets the properties name from request.
      Parameters:
      requestProperties - the request properties
      Returns:
      the properties name from request
    • updateCollectionProperties

      public static CollectionsEntity updateCollectionProperties(CollectionsEntity collectionEntity, CollectionsDO collectionDO, PropertiesRepository propertyRepository, CollectionsRepository collectionRepository)