Package com.rosivanyshyn.service.impl
Class ApartmentServiceImpl
java.lang.Object
com.rosivanyshyn.service.impl.ApartmentServiceImpl
- All Implemented Interfaces:
ApartmentService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateApartment(Apartment apartment) Create new apartmentdeleteApartment(Apartment apartment) Delete apartmentfindApartmentByField(String field, Object value) Find apartment by fieldfindFewApartment(int start, int total) Find few apartments by total count and from set start idfindFewApartmentsAndSort(String secondQueryPart, String... fields) Find few apartments using second query part conditions and by fields for themfindFewApartmentsWhichAreBooked(String secondQueryPart, String... fields) Find few apartments which are already booked using second query part conditions and by fields for themfindFewApartmentsWhichAreFree(String secondQueryPart, String... fields) Find few apartments which are free (not booked in the future) and availableintGet last statement rows countsearchApartment(String value, int start, int total) Find few apartments using direct search algorithm by total count and from set start idupdateApartment(Apartment apartment) Update apartment
-
Constructor Details
-
ApartmentServiceImpl
-
-
Method Details
-
createApartment
Description copied from interface:ApartmentServiceCreate new apartment- Specified by:
createApartmentin interfaceApartmentService- Parameters:
apartment- the apartment to be added- Returns:
- operation result
-
findApartmentByField
Description copied from interface:ApartmentServiceFind apartment by field- Specified by:
findApartmentByFieldin interfaceApartmentService- Parameters:
field- field namevalue- unique field value- Returns:
- found apartment
-
findFewApartment
Description copied from interface:ApartmentServiceFind few apartments by total count and from set start id- Specified by:
findFewApartmentin interfaceApartmentService- Parameters:
start- countdown start idtotal- total rows count- Returns:
- found apartments
-
searchApartment
Description copied from interface:ApartmentServiceFind few apartments using direct search algorithm by total count and from set start id- Specified by:
searchApartmentin interfaceApartmentService- Parameters:
value- user valuestart- countdown start idtotal- total rows count- Returns:
- found apartments
-
findFewApartmentsAndSort
Description copied from interface:ApartmentServiceFind few apartments using second query part conditions and by fields for them- Specified by:
findFewApartmentsAndSortin interfaceApartmentService- Parameters:
secondQueryPart- QueryBuilder result stringfields- fields to insert in second query part statement- Returns:
- found apartments
-
findFewApartmentsWhichAreBooked
public ArrayList<Apartment> findFewApartmentsWhichAreBooked(String secondQueryPart, String... fields) Description copied from interface:ApartmentServiceFind few apartments which are already booked using second query part conditions and by fields for them- Specified by:
findFewApartmentsWhichAreBookedin interfaceApartmentService- Parameters:
secondQueryPart- QueryBuilder result stringfields- fields to insert in second query part statement- Returns:
- found apartments
-
findFewApartmentsWhichAreFree
Description copied from interface:ApartmentServiceFind few apartments which are free (not booked in the future) and available- Specified by:
findFewApartmentsWhichAreFreein interfaceApartmentService- Parameters:
secondQueryPart- QueryBuilder result stringfields- fields to insert in second query part statement- Returns:
- found apartments
-
updateApartment
Description copied from interface:ApartmentServiceUpdate apartment- Specified by:
updateApartmentin interfaceApartmentService- Parameters:
apartment- apartment to update- Returns:
- operation result
-
deleteApartment
Description copied from interface:ApartmentServiceDelete apartment- Specified by:
deleteApartmentin interfaceApartmentService- Parameters:
apartment- apartment to delete- Returns:
- operation result
-
getRowsNumber
public int getRowsNumber()Description copied from interface:ApartmentServiceGet last statement rows count- Specified by:
getRowsNumberin interfaceApartmentService- Returns:
- last statement rows count
-