Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Codecrew
/
Moya
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
30
Merge Requests
2
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit df989629
authored
May 13, 2013
by
Tuomas Riihimäki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add user approval entities
1 parent
81e98ebc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
149 additions
and
0 deletions
code/MoyaDatabase/src/fi/codecrew/moya/model/Approval.java
code/MoyaDatabase/src/fi/codecrew/moya/model/UserApproval.java
code/MoyaDatabase/src/fi/codecrew/moya/model/Approval.java
0 → 100644
View file @
df98962
package
fi
.
codecrew
.
moya
.
model
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.JoinColumn
;
import
javax.persistence.Lob
;
import
javax.persistence.Table
;
import
javax.persistence.UniqueConstraint
;
@Entity
@Table
(
name
=
"approvals"
,
uniqueConstraints
=
@UniqueConstraint
(
columnNames
=
{
Approval
.
EVENT_ID_COL
,
Approval
.
NAME_COL
}))
public
class
Approval
extends
GenericEntity
{
private
static
final
long
serialVersionUID
=
-
8794234662985671285L
;
protected
static
final
String
EVENT_ID_COL
=
"event_id"
;
protected
static
final
String
NAME_COL
=
"approval_name"
;
@Column
(
nullable
=
false
,
name
=
NAME_COL
)
private
String
name
;
@JoinColumn
(
nullable
=
false
,
name
=
EVENT_ID_COL
)
private
LanEvent
event
;
@Lob
private
String
description
;
@Lob
private
String
notes
;
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getDescription
()
{
return
description
;
}
public
void
setDescription
(
String
description
)
{
this
.
description
=
description
;
}
public
String
getNotes
()
{
return
notes
;
}
public
void
setNotes
(
String
notes
)
{
this
.
notes
=
notes
;
}
public
LanEvent
getEvent
()
{
return
event
;
}
public
void
setEvent
(
LanEvent
event
)
{
this
.
event
=
event
;
}
}
code/MoyaDatabase/src/fi/codecrew/moya/model/UserApproval.java
0 → 100644
View file @
df98962
package
fi
.
codecrew
.
moya
.
model
;
import
java.util.Date
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.JoinColumn
;
import
javax.persistence.ManyToOne
;
import
javax.persistence.Table
;
import
javax.persistence.Temporal
;
import
javax.persistence.TemporalType
;
@Entity
@Table
(
name
=
"user_approvals"
)
public
class
UserApproval
extends
GenericEntity
{
private
static
final
long
serialVersionUID
=
-
5275823003990286642L
;
@ManyToOne
()
@JoinColumn
(
nullable
=
false
,
updatable
=
false
)
private
Approval
approval
;
@ManyToOne
()
@JoinColumn
(
nullable
=
false
,
updatable
=
false
)
private
EventUser
user
;
@Column
(
nullable
=
false
,
updatable
=
false
)
private
boolean
approvalValue
=
false
;
@Column
(
nullable
=
false
,
updatable
=
false
)
@Temporal
(
TemporalType
.
TIMESTAMP
)
private
Date
approvalTime
=
new
Date
();
@Column
(
nullable
=
false
,
updatable
=
false
)
private
String
approvalText
=
""
;
private
String
notes
;
public
Approval
getApproval
()
{
return
approval
;
}
public
void
setApproval
(
Approval
approval
)
{
this
.
approval
=
approval
;
}
public
boolean
isApprovalValue
()
{
return
approvalValue
;
}
public
void
setApprovalValue
(
boolean
approvalValue
)
{
this
.
approvalValue
=
approvalValue
;
}
public
Date
getApprovalTime
()
{
return
approvalTime
;
}
public
void
setApprovalTime
(
Date
approvalTime
)
{
this
.
approvalTime
=
approvalTime
;
}
public
EventUser
getUser
()
{
return
user
;
}
public
void
setUser
(
EventUser
user
)
{
this
.
user
=
user
;
}
public
String
getApprovalText
()
{
return
approvalText
;
}
public
void
setApprovalText
(
String
approvalText
)
{
this
.
approvalText
=
approvalText
;
}
public
String
getNotes
()
{
return
notes
;
}
public
void
setNotes
(
String
notes
)
{
this
.
notes
=
notes
;
}
}
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