Package com.skava.price.process
Class CollectionProcess
java.lang.Object
com.skava.price.process.CollectionProcess
The Class CollectionProcess
- Since:
- 8.0
- Author:
- Infosys Equinox
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreate
(CollectionDO collectionDO) This method is used to create Collection based on given CollectionRequest.findAll
(CollectionDO collectionDO) This method is used to find all Collections based on given CollectionRequest.findById
(CollectionDO collectionDO) This method is used to find Collection based on given CollectionRequest identifier.boolean
isCollectionAvailable
(long id) This method will check the given id is exist in the collection table.org.springframework.data.domain.Page<Collection>
This method will price in the entity and provide the results based on the filtersupdate
(CollectionDO collectionDO) This method is used to update all field in Collection based on given Collection.
-
Field Details
-
PAGE_CONSTANT
public static final int PAGE_CONSTANT- See Also:
-
-
Constructor Details
-
CollectionProcess
public CollectionProcess()
-
-
Method Details
-
create
This method is used to create Collection based on given CollectionRequest.- Parameters:
collectionDO
- It contains the attributes required for the creation of Collection.- Returns:
- It returns the
CollectionDO
. - Throws:
CollectionAlreadyExistsException
- It throws collection already exist exception, if the collection is already available in collection list.
-
findAll
This method is used to find all Collections based on given CollectionRequest.- Parameters:
collectionDO
- It contains the attributes required for the load of Collection.- Returns:
- It returns the
CollectionDO
.
-
search
public org.springframework.data.domain.Page<Collection> search(String filters, org.springframework.data.domain.Sort sort, int page, int size) This method will price in the entity and provide the results based on the filters- Parameters:
filters
- this will contains qdsl filtersort
- It Specifies sorting ordersize
- It Specifies page sizepage
- this will contain page and size values- Returns:
- It will contain the list of Note
-
findById
This method is used to find Collection based on given CollectionRequest identifier.- Parameters:
collectionDO
- It contains the attributes required for the load of Collection.- Returns:
- It returns the
CollectionDO
. - Throws:
CollectionNotFoundException
- It will throw collection not found exception if a collection is not available.
-
update
This method is used to update all field in Collection based on given Collection.- Parameters:
collectionDO
- It contains the attributes required for the update all field in Collection.- Returns:
- It returns the
CollectionDO
. - Throws:
CollectionNotFoundException
- It will throw collection not found exception if a collection is not available.
-
isCollectionAvailable
public boolean isCollectionAvailable(long id) This method will check the given id is exist in the collection table. If the id is not exist then it will throw CollectionNotFoundException- Parameters:
id
- collection id- Returns:
- boolean
-