Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
alx_20230801
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
alx_20230801
Commits
759ab54c
Commit
759ab54c
authored
Aug 03, 2023
by
Patryk Czarnik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dodatkowe metody, w tym save
parent
00dcc738
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
2 deletions
+21
-2
Ogloszenie.java
...eniaSerwer/src/main/java/ogloszenia/model/Ogloszenie.java
+2
-2
Ogloszenia.java
...zeniaSerwer/src/main/java/ogloszenia/soap/Ogloszenia.java
+19
-0
No files found.
OgloszeniaSerwer/src/main/java/ogloszenia/model/Ogloszenie.java
View file @
759ab54c
...
@@ -11,8 +11,8 @@ import java.time.LocalDateTime;
...
@@ -11,8 +11,8 @@ import java.time.LocalDateTime;
public
class
Ogloszenie
{
public
class
Ogloszenie
{
@XmlAttribute
(
name
=
"id"
)
@XmlAttribute
(
name
=
"id"
)
private
Integer
idOgloszenia
;
private
Integer
idOgloszenia
;
//
@XmlAttribute(name="id-sprzedawcy")
@XmlAttribute
(
name
=
"id-sprzedawcy"
)
@XmlTransient
//
@XmlTransient
private
Integer
idSprzedawcy
;
private
Integer
idSprzedawcy
;
@XmlElement
(
name
=
"wystawione"
)
@XmlElement
(
name
=
"wystawione"
)
@XmlJavaTypeAdapter
(
AdapterDaty
.
class
)
@XmlJavaTypeAdapter
(
AdapterDaty
.
class
)
...
...
OgloszeniaSerwer/src/main/java/ogloszenia/soap/Ogloszenia.java
View file @
759ab54c
...
@@ -9,6 +9,7 @@ import ogloszenia.exn.BladBazyDanych;
...
@@ -9,6 +9,7 @@ import ogloszenia.exn.BladBazyDanych;
import
ogloszenia.exn.NieznanyRekord
;
import
ogloszenia.exn.NieznanyRekord
;
import
ogloszenia.model.OgloszenieSamochodowe
;
import
ogloszenia.model.OgloszenieSamochodowe
;
import
java.math.BigDecimal
;
import
java.util.List
;
import
java.util.List
;
@WebService
@WebService
...
@@ -29,4 +30,22 @@ public class Ogloszenia {
...
@@ -29,4 +30,22 @@ public class Ogloszenia {
return
dao
.
findByIdFull
(
idOgloszenia
);
return
dao
.
findByIdFull
(
idOgloszenia
);
}
}
}
}
@WebResult
(
name
=
"ogloszenie"
)
public
List
<
OgloszenieSamochodowe
>
readByPrice
(
@WebParam
(
name
=
"min"
)
BigDecimal
min
,
@WebParam
(
name
=
"max"
)
BigDecimal
max
)
throws
BladBazyDanych
{
try
(
DostepDoBazySqlite
db
=
DostepDoBazySqlite
.
newSQLite
())
{
OgloszenieDAO
dao
=
db
.
newOgloszenieDAO
();
return
dao
.
ogloszeniaWedlugCeny
(
min
,
max
);
}
}
public
void
save
(
@WebParam
(
name
=
"ogloszenie"
)
OgloszenieSamochodowe
ogloszenie
)
throws
BladBazyDanych
{
try
(
DostepDoBazySqlite
db
=
DostepDoBazySqlite
.
newSQLite
())
{
OgloszenieDAO
dao
=
db
.
newOgloszenieDAO
();
dao
.
save
(
ogloszenie
);
}
}
}
}
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