Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Linnea Samila
/
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 e8d83881
authored
Mar 20, 2010
by
Tuukka Kivilahti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
and more
1 parent
ebf477aa
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
104 additions
and
0 deletions
code/LanBortalDatabase/src/fi/insomnia/bortal/model/Event.java
code/LanBortalDatabase/src/fi/insomnia/bortal/model/EventMap.java
code/LanBortalDatabase/src/fi/insomnia/bortal/model/Reader.java
code/LanBortalDatabase/src/fi/insomnia/bortal/model/Event.java
View file @
e8d8388
...
...
@@ -88,6 +88,9 @@ public class Event implements ModelInterface {
@OneToMany
(
mappedBy
=
"event"
)
private
List
<
Bill
>
bills
;
@OneToMany
(
mappedBy
=
"event"
)
private
List
<
Reader
>
readers
;
public
Event
()
{
}
...
...
@@ -263,4 +266,18 @@ public class Event implements ModelInterface {
public
void
setBills
(
List
<
Bill
>
bills
)
{
this
.
bills
=
bills
;
}
/**
* @return the readers
*/
public
List
<
Reader
>
getReaders
()
{
return
readers
;
}
/**
* @param readers the readers to set
*/
public
void
setReaders
(
List
<
Reader
>
readers
)
{
this
.
readers
=
readers
;
}
}
code/LanBortalDatabase/src/fi/insomnia/bortal/model/EventMap.java
View file @
e8d8388
...
...
@@ -55,6 +55,8 @@ public class EventMap implements ModelInterface {
@Version
@Column
(
nullable
=
false
)
private
int
jpaVersionField
;
@OneToMany
(
mappedBy
=
"eventMap"
)
private
List
<
Reader
>
readers
;
public
EventMap
()
{
}
...
...
@@ -155,4 +157,18 @@ public class EventMap implements ModelInterface {
public
void
setJpaVersionField
(
int
jpaVersionField
)
{
this
.
jpaVersionField
=
jpaVersionField
;
}
/**
* @return the readers
*/
public
List
<
Reader
>
getReaders
()
{
return
readers
;
}
/**
* @param readers the readers to set
*/
public
void
setReaders
(
List
<
Reader
>
readers
)
{
this
.
readers
=
readers
;
}
}
code/LanBortalDatabase/src/fi/insomnia/bortal/model/Reader.java
View file @
e8d8388
...
...
@@ -54,6 +54,21 @@ public class Reader implements ModelInterface {
@ManyToOne
private
Location
location
;
@ManyToOne
@JoinColumn
(
name
=
"events_id"
,
referencedColumnName
=
"events_id"
)
private
Event
event
;
@ManyToOne
@JoinColumn
(
name
=
"maps_id"
,
referencedColumnName
=
"maps_id"
)
private
EventMap
eventMap
;
@Column
(
name
=
"map_x"
)
private
Integer
mapX
;
@Column
(
name
=
"map_y"
)
private
Integer
mapY
;
@Version
@Column
(
nullable
=
false
)
private
int
jpaVersionField
;
...
...
@@ -157,4 +172,60 @@ public class Reader implements ModelInterface {
public
void
setJpaVersionField
(
int
jpaVersionField
)
{
this
.
jpaVersionField
=
jpaVersionField
;
}
/**
* @return the event
*/
public
Event
getEvent
()
{
return
event
;
}
/**
* @param event the event to set
*/
public
void
setEvent
(
Event
event
)
{
this
.
event
=
event
;
}
/**
* @return the mapX
*/
public
Integer
getMapX
()
{
return
mapX
;
}
/**
* @param mapX the mapX to set
*/
public
void
setMapX
(
Integer
mapX
)
{
this
.
mapX
=
mapX
;
}
/**
* @return the mapY
*/
public
Integer
getMapY
()
{
return
mapY
;
}
/**
* @param mapY the mapY to set
*/
public
void
setMapY
(
Integer
mapY
)
{
this
.
mapY
=
mapY
;
}
/**
* @return the eventMap
*/
public
EventMap
getEventMap
()
{
return
eventMap
;
}
/**
* @param eventMap the eventMap to set
*/
public
void
setEventMap
(
EventMap
eventMap
)
{
this
.
eventMap
=
eventMap
;
}
}
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