Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
2
20230403
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
20230403
Commits
1a019831
Commit
1a019831
authored
Apr 25, 2023
by
Patryk Czarnik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
LocalDate
parent
aee5c0e3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
6 deletions
+5
-6
Employee.java
PC29-HibenateNowy/src/main/java/hr/model/Employee.java
+4
-5
OdczytajWszystkich2.java
...eNowy/src/main/java/hr/przyklady/OdczytajWszystkich2.java
+1
-1
No files found.
PC29-HibenateNowy/src/main/java/hr/model/Employee.java
View file @
1a019831
...
...
@@ -3,8 +3,7 @@ package hr.model;
import
java.io.Serializable
;
import
jakarta.persistence.*
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.time.LocalDate
;
/**
* The persistent class for the employees database table.
...
...
@@ -32,7 +31,7 @@ public class Employee implements Serializable {
@Temporal
(
TemporalType
.
DATE
)
@Column
(
name
=
"hire_date"
)
private
Date
hireDate
;
private
Local
Date
hireDate
;
@Column
(
name
=
"last_name"
)
private
String
lastName
;
...
...
@@ -92,11 +91,11 @@ public class Employee implements Serializable {
this
.
firstName
=
firstName
;
}
public
Date
getHireDate
()
{
public
Local
Date
getHireDate
()
{
return
this
.
hireDate
;
}
public
void
setHireDate
(
Date
hireDate
)
{
public
void
setHireDate
(
Local
Date
hireDate
)
{
this
.
hireDate
=
hireDate
;
}
...
...
PC29-HibenateNowy/src/main/java/hr/przyklady/OdczytajWszystkich2.java
View file @
1a019831
...
...
@@ -18,7 +18,7 @@ public class OdczytajWszystkich2 {
List
<
Employee
>
lista
=
query
.
getResultList
();
for
(
Employee
emp
:
lista
)
{
System
.
out
.
println
(
emp
.
getFirstName
()
+
" "
+
emp
.
getLastName
()
+
" "
+
emp
.
getSalary
());
System
.
out
.
println
(
emp
.
getFirstName
()
+
" "
+
emp
.
getLastName
()
+
" "
+
emp
.
getSalary
()
+
" zatr. "
+
emp
.
getHireDate
()
);
}
em
.
close
();
...
...
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