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 a50c8682
authored
May 10, 2013
by
Antti Tönkyrä
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cardstate added to printedcard, see sql alter from wiki
1 parent
0dd8c8a6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
0 deletions
code/MoyaDatabase/src/fi/codecrew/moya/model/PrintedCard.java
code/MoyaUtilities/src/fi/codecrew/moya/enums/CardState.java
code/MoyaDatabase/src/fi/codecrew/moya/model/PrintedCard.java
View file @
a50c868
...
@@ -14,6 +14,8 @@ import javax.faces.model.ListDataModel;
...
@@ -14,6 +14,8 @@ import javax.faces.model.ListDataModel;
import
javax.persistence.CascadeType
;
import
javax.persistence.CascadeType
;
import
javax.persistence.Column
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Entity
;
import
javax.persistence.EnumType
;
import
javax.persistence.Enumerated
;
import
javax.persistence.JoinColumn
;
import
javax.persistence.JoinColumn
;
import
javax.persistence.ManyToOne
;
import
javax.persistence.ManyToOne
;
import
javax.persistence.OneToMany
;
import
javax.persistence.OneToMany
;
...
@@ -26,6 +28,8 @@ import javax.persistence.UniqueConstraint;
...
@@ -26,6 +28,8 @@ import javax.persistence.UniqueConstraint;
import
org.eclipse.persistence.annotations.OptimisticLocking
;
import
org.eclipse.persistence.annotations.OptimisticLocking
;
import
org.eclipse.persistence.annotations.OptimisticLockingType
;
import
org.eclipse.persistence.annotations.OptimisticLockingType
;
import
fi.codecrew.moya.enums.CardState
;
/**
/**
*
*
*/
*/
...
@@ -73,6 +77,10 @@ public class PrintedCard extends GenericEntity {
...
@@ -73,6 +77,10 @@ public class PrintedCard extends GenericEntity {
@JoinColumn
(
nullable
=
false
,
name
=
"card_template_id"
,
referencedColumnName
=
CardTemplate
.
ID_COLUMN
)
@JoinColumn
(
nullable
=
false
,
name
=
"card_template_id"
,
referencedColumnName
=
CardTemplate
.
ID_COLUMN
)
@ManyToOne
(
optional
=
false
)
@ManyToOne
(
optional
=
false
)
private
CardTemplate
template
;
private
CardTemplate
template
;
@Column
(
name
=
"card_state"
,
nullable
=
false
)
@Enumerated
(
EnumType
.
STRING
)
private
CardState
cardState
=
CardState
.
PENDING_VALIDATION
;
public
PrintedCard
(
EventUser
usr
,
CardTemplate
templ
,
Calendar
printTime
,
boolean
cardEnabled
)
{
public
PrintedCard
(
EventUser
usr
,
CardTemplate
templ
,
Calendar
printTime
,
boolean
cardEnabled
)
{
super
();
super
();
...
@@ -195,6 +203,14 @@ public class PrintedCard extends GenericEntity {
...
@@ -195,6 +203,14 @@ public class PrintedCard extends GenericEntity {
return
gamepoints
;
return
gamepoints
;
}
}
public
CardState
getCardState
()
{
return
cardState
;
}
public
void
setCardState
(
CardState
cardState
)
{
this
.
cardState
=
cardState
;
}
@Transient
@Transient
private
transient
ListDataModel
<
ReaderEvent
>
revents
;
private
transient
ListDataModel
<
ReaderEvent
>
revents
;
...
...
code/MoyaUtilities/src/fi/codecrew/moya/enums/CardState.java
0 → 100644
View file @
a50c868
package
fi
.
codecrew
.
moya
.
enums
;
public
enum
CardState
{
PENDING_VALIDATION
,
REJECTED
,
VALIDATED
,
PENDING_PRINT
,
PRINTING_IN_PROGRESS
,
PRINTED
}
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