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 ebf477aa
authored
Mar 20, 2010
by
Tuukka Kivilahti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
see diff
1 parent
e22e4f0b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
71 additions
and
20 deletions
code/LanBortalDatabase/src/fi/insomnia/bortal/model/EventSettings.java
code/LanBortalDatabase/src/fi/insomnia/bortal/model/User.java
code/LanBortalDatabase/src/fi/insomnia/bortal/model/EventSettings.java
View file @
ebf477a
...
@@ -12,6 +12,8 @@ import javax.persistence.Entity;
...
@@ -12,6 +12,8 @@ import javax.persistence.Entity;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.GenerationType
;
import
javax.persistence.GenerationType
;
import
javax.persistence.Id
;
import
javax.persistence.Id
;
import
javax.persistence.JoinColumn
;
import
javax.persistence.ManyToOne
;
import
javax.persistence.NamedQueries
;
import
javax.persistence.NamedQueries
;
import
javax.persistence.NamedQuery
;
import
javax.persistence.NamedQuery
;
import
javax.persistence.OneToMany
;
import
javax.persistence.OneToMany
;
...
@@ -36,15 +38,20 @@ public class EventSettings implements ModelInterface {
...
@@ -36,15 +38,20 @@ public class EventSettings implements ModelInterface {
@Column
(
name
=
"event_settings_id"
,
nullable
=
false
)
@Column
(
name
=
"event_settings_id"
,
nullable
=
false
)
private
Integer
id
;
private
Integer
id
;
@Column
(
name
=
"
base_name
"
)
@Column
(
name
=
"
organisation
"
)
private
String
baseName
;
private
String
organisation
;
@Column
(
name
=
"
style_sheet
"
)
@Column
(
name
=
"
bundle_country
"
)
private
String
styleSheet
;
private
String
bundleCountry
;
@OneToMany
(
cascade
=
CascadeType
.
ALL
,
mappedBy
=
"settings"
)
@OneToMany
(
cascade
=
CascadeType
.
ALL
,
mappedBy
=
"settings"
)
private
List
<
Event
>
events
;
private
List
<
Event
>
events
;
@ManyToOne
@JoinColumn
(
name
=
"users_id"
,
referencedColumnName
=
"users_id"
,
nullable
=
false
)
private
User
admin
;
@Version
@Version
@Column
(
nullable
=
false
)
@Column
(
nullable
=
false
)
private
int
jpaVersionField
;
private
int
jpaVersionField
;
...
@@ -56,22 +63,6 @@ public class EventSettings implements ModelInterface {
...
@@ -56,22 +63,6 @@ public class EventSettings implements ModelInterface {
this
.
id
=
eventSettingsId
;
this
.
id
=
eventSettingsId
;
}
}
public
String
getBaseName
()
{
return
baseName
;
}
public
void
setBaseName
(
String
resourceBundle
)
{
this
.
baseName
=
resourceBundle
;
}
public
String
getStyleSheet
()
{
return
styleSheet
;
}
public
void
setStyleSheet
(
String
styleSheet
)
{
this
.
styleSheet
=
styleSheet
;
}
public
List
<
Event
>
getEvents
()
{
public
List
<
Event
>
getEvents
()
{
return
events
;
return
events
;
}
}
...
@@ -140,4 +131,46 @@ public class EventSettings implements ModelInterface {
...
@@ -140,4 +131,46 @@ public class EventSettings implements ModelInterface {
public
void
setJpaVersionField
(
int
jpaVersionField
)
{
public
void
setJpaVersionField
(
int
jpaVersionField
)
{
this
.
jpaVersionField
=
jpaVersionField
;
this
.
jpaVersionField
=
jpaVersionField
;
}
}
/**
* @return the organisation
*/
public
String
getOrganisation
()
{
return
organisation
;
}
/**
* @param organisation the organisation to set
*/
public
void
setOrganisation
(
String
organisation
)
{
this
.
organisation
=
organisation
;
}
/**
* @return the bundleCountry
*/
public
String
getBundleCountry
()
{
return
bundleCountry
;
}
/**
* @param bundleCountry the bundleCountry to set
*/
public
void
setBundleCountry
(
String
bundleCountry
)
{
this
.
bundleCountry
=
bundleCountry
;
}
/**
* @return the admin
*/
public
User
getAdmin
()
{
return
admin
;
}
/**
* @param admin the admin to set
*/
public
void
setAdmin
(
User
admin
)
{
this
.
admin
=
admin
;
}
}
}
code/LanBortalDatabase/src/fi/insomnia/bortal/model/User.java
View file @
ebf477a
...
@@ -171,6 +171,10 @@ public class User implements ModelInterface {
...
@@ -171,6 +171,10 @@ public class User implements ModelInterface {
@Column
(
nullable
=
false
)
@Column
(
nullable
=
false
)
private
int
jpaVersionField
;
private
int
jpaVersionField
;
@OneToMany
(
mappedBy
=
"admin"
)
private
List
<
EventSettings
>
eventSettings
;
public
User
()
{
public
User
()
{
}
}
...
@@ -516,4 +520,18 @@ public class User implements ModelInterface {
...
@@ -516,4 +520,18 @@ public class User implements ModelInterface {
public
void
setConfirmTime
(
Calendar
confirmTime
)
{
public
void
setConfirmTime
(
Calendar
confirmTime
)
{
this
.
confirmTime
=
confirmTime
;
this
.
confirmTime
=
confirmTime
;
}
}
/**
* @return the eventSettings
*/
public
List
<
EventSettings
>
getEventSettings
()
{
return
eventSettings
;
}
/**
* @param eventSettings the eventSettings to set
*/
public
void
setEventSettings
(
List
<
EventSettings
>
eventSettings
)
{
this
.
eventSettings
=
eventSettings
;
}
}
}
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