Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Riina Antikainen
/
Moya
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 763f08f4
authored
Mar 20, 2010
by
Tuukka Kivilahti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new connection
1 parent
6b44766d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
0 deletions
code/LanBortalDatabase/src/fi/insomnia/bortal/model/Bill.java
code/LanBortalDatabase/src/fi/insomnia/bortal/model/Event.java
code/LanBortalDatabase/src/fi/insomnia/bortal/model/Bill.java
View file @
763f08f
...
...
@@ -73,6 +73,12 @@ public class Bill implements ModelInterface {
@ManyToOne
(
optional
=
false
)
private
User
user
;
@ManyToOne
@JoinColumn
(
name
=
"events_id"
,
referencedColumnName
=
"events_id"
)
private
Event
event
;
@Override
public
Integer
getId
()
{
return
id
;
...
...
@@ -83,6 +89,8 @@ public class Bill implements ModelInterface {
this
.
id
=
id
;
}
@Version
@Column
(
nullable
=
false
)
private
int
jpaVersionField
;
...
...
@@ -186,4 +194,18 @@ public class Bill implements ModelInterface {
public
int
getJpaVersionField
()
{
return
jpaVersionField
;
}
/**
* @return the event
*/
public
Event
getEvent
()
{
return
event
;
}
/**
* @param event the event to set
*/
public
void
setEvent
(
Event
event
)
{
this
.
event
=
event
;
}
}
code/LanBortalDatabase/src/fi/insomnia/bortal/model/Event.java
View file @
763f08f
...
...
@@ -85,6 +85,9 @@ public class Event implements ModelInterface {
@Version
@Column
(
nullable
=
false
)
private
int
jpaVersionField
;
@OneToMany
(
mappedBy
=
"event"
)
private
List
<
Bill
>
bills
;
public
Event
()
{
}
...
...
@@ -246,4 +249,18 @@ public class Event implements ModelInterface {
public
void
setJpaVersionField
(
int
jpaVersionField
)
{
this
.
jpaVersionField
=
jpaVersionField
;
}
/**
* @return the bills
*/
public
List
<
Bill
>
getBills
()
{
return
bills
;
}
/**
* @param bills the bills to set
*/
public
void
setBills
(
List
<
Bill
>
bills
)
{
this
.
bills
=
bills
;
}
}
Write
Preview
Markdown
is supported
Attach a file
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 post a comment