Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
javab_20230617
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Patryk Czarnik
javab_20230617
Commits
a230fb53
Commit
a230fb53
authored
Aug 19, 2023
by
Patryk Czarnik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Metody odczytujące klienta oraz zamówienie
parent
150e6e12
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
Sklep.java
PC30-SoapSerwer/src/main/java/sklep/soap/Sklep.java
+20
-0
No files found.
PC30-SoapSerwer/src/main/java/sklep/soap/Sklep.java
View file @
a230fb53
...
...
@@ -7,10 +7,14 @@ import java.util.List;
import
jakarta.jws.WebParam
;
import
jakarta.jws.WebResult
;
import
jakarta.jws.WebService
;
import
sklep.db.CustomerDAO
;
import
sklep.db.DBConnection
;
import
sklep.db.DBException
;
import
sklep.db.OrderDAO
;
import
sklep.db.ProductDAO
;
import
sklep.db.RecordNotFound
;
import
sklep.model.Customer
;
import
sklep.model.Order
;
import
sklep.model.Product
;
@WebService
...
...
@@ -66,4 +70,20 @@ public class Sklep {
return
productDAO
.
findById
(
productId
);
}
}
@WebResult
(
name
=
"customer"
)
public
Customer
jedenKlient
(
@WebParam
(
name
=
"email"
)
String
email
)
throws
DBException
,
RecordNotFound
{
try
(
DBConnection
db
=
DBConnection
.
open
())
{
CustomerDAO
customerDAO
=
db
.
customerDAO
();
return
customerDAO
.
findByEmail
(
email
);
}
}
@WebResult
(
name
=
"order"
)
public
Order
jednoZamowienia
(
@WebParam
(
name
=
"id"
)
int
orderId
)
throws
DBException
,
RecordNotFound
{
try
(
DBConnection
db
=
DBConnection
.
open
())
{
OrderDAO
orderDAO
=
db
.
orderDAO
();
return
orderDAO
.
findById
(
orderId
);
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment