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 f4d8f93b
authored
Aug 31, 2013
by
Antti Jaakkola
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'devel' of codecrew.fi:bortal into devel
2 parents
e95be4fc
c5592bac
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
290 additions
and
36 deletions
code/MoyaBeans/ejbModule/fi/codecrew/moya/beans/TournamentBean.java
code/MoyaBeans/ejbModule/fi/codecrew/moya/facade/TournamentGameFacade.java
code/MoyaBeans/ejbModule/fi/codecrew/moya/facade/TournamentRuleFacade.java
code/MoyaBeansClient/ejbModule/fi/codecrew/moya/beans/TournamentBeanLocal.java
code/MoyaDatabase/src/fi/codecrew/moya/model/TournamentGame.java
code/MoyaWeb/WebContent/tournaments/admin/createwizard.xhtml
code/MoyaWeb/src/fi/codecrew/moya/web/cdiview/tournaments/TournamentCreateView.java
code/MoyaWeb/src/fi/codecrew/moya/web/converter/TournamentGameConverter.java
code/MoyaWeb/src/fi/codecrew/moya/web/converter/TournamentRuleConverter.java
code/MoyaBeans/ejbModule/fi/codecrew/moya/beans/TournamentBean.java
View file @
f4d8f93
package
fi
.
codecrew
.
moya
.
beans
;
package
fi
.
codecrew
.
moya
.
beans
;
import
java.util.List
;
import
javax.ejb.EJB
;
import
javax.ejb.LocalBean
;
import
javax.ejb.LocalBean
;
import
javax.ejb.Stateless
;
import
javax.ejb.Stateless
;
import
fi.codecrew.moya.facade.TournamentGameFacade
;
import
fi.codecrew.moya.facade.TournamentRuleFacade
;
import
fi.codecrew.moya.model.Tournament
;
import
fi.codecrew.moya.model.TournamentGame
;
import
fi.codecrew.moya.model.TournamentRule
;
/**
/**
* Session Bean implementation class TournamentBean
* Session Bean implementation class TournamentBean
*/
*/
...
@@ -10,6 +19,9 @@ import javax.ejb.Stateless;
...
@@ -10,6 +19,9 @@ import javax.ejb.Stateless;
@LocalBean
@LocalBean
public
class
TournamentBean
implements
TournamentBeanLocal
{
public
class
TournamentBean
implements
TournamentBeanLocal
{
@EJB
private
TournamentRuleFacade
tournamentRuleFacade
;
@EJB
private
TournamentGameFacade
tournamentGameFacade
;
/**
/**
* Default constructor.
* Default constructor.
*/
*/
...
@@ -17,4 +29,33 @@ public class TournamentBean implements TournamentBeanLocal {
...
@@ -17,4 +29,33 @@ public class TournamentBean implements TournamentBeanLocal {
// TODO Auto-generated constructor stub
// TODO Auto-generated constructor stub
}
}
@Override
public
List
<
TournamentRule
>
getRulesByGame
(
TournamentGame
tg
)
{
return
tournamentRuleFacade
.
getRulesByGame
(
tg
);
}
@Override
public
List
<
TournamentGame
>
getGames
()
{
return
tournamentGameFacade
.
getGames
();
}
@Override
public
void
createGame
(
TournamentGame
tg
)
{
tournamentGameFacade
.
create
(
tg
);
}
@Override
public
void
createRule
(
TournamentRule
tr
)
{
tournamentRuleFacade
.
create
(
tr
);
}
@Override
public
TournamentGame
findGame
(
Integer
id
)
{
return
tournamentGameFacade
.
find
(
id
);
}
@Override
public
TournamentRule
findRule
(
Integer
id
)
{
return
tournamentRuleFacade
.
find
(
id
);
}
}
}
code/MoyaBeans/ejbModule/fi/codecrew/moya/facade/TournamentGameFacade.java
View file @
f4d8f93
package
fi
.
codecrew
.
moya
.
facade
;
package
fi
.
codecrew
.
moya
.
facade
;
import
java.util.List
;
import
javax.ejb.EJB
;
import
javax.ejb.LocalBean
;
import
javax.ejb.LocalBean
;
import
javax.ejb.Stateless
;
import
javax.ejb.Stateless
;
import
javax.persistence.criteria.CriteriaBuilder
;
import
javax.persistence.criteria.CriteriaQuery
;
import
javax.persistence.criteria.Root
;
import
fi.codecrew.moya.beans.EventBean
;
import
fi.codecrew.moya.model.TournamentGame
;
import
fi.codecrew.moya.model.TournamentGame
;
import
fi.codecrew.moya.model.TournamentGame_
;
import
fi.codecrew.moya.model.TournamentRule
;
import
fi.codecrew.moya.model.TournamentRule_
;
@Stateless
@Stateless
@LocalBean
@LocalBean
public
class
TournamentGameFacade
extends
IntegerPkGenericFacade
<
TournamentGame
>
{
public
class
TournamentGameFacade
extends
IntegerPkGenericFacade
<
TournamentGame
>
{
@EJB
private
EventBean
eventBean
;
public
TournamentGameFacade
()
{
public
TournamentGameFacade
()
{
super
(
TournamentGame
.
class
);
super
(
TournamentGame
.
class
);
}
}
public
List
<
TournamentGame
>
getGames
()
{
CriteriaBuilder
cb
=
getEm
().
getCriteriaBuilder
();
CriteriaQuery
<
TournamentGame
>
cq
=
cb
.
createQuery
(
TournamentGame
.
class
);
Root
<
TournamentGame
>
root
=
cq
.
from
(
TournamentGame
.
class
);
cq
.
where
(
cb
.
equal
(
root
.
get
(
TournamentGame_
.
lanEvent
),
eventBean
.
getCurrentEvent
()));
return
getEm
().
createQuery
(
cq
).
getResultList
();
}
}
}
code/MoyaBeans/ejbModule/fi/codecrew/moya/facade/TournamentRuleFacade.java
View file @
f4d8f93
package
fi
.
codecrew
.
moya
.
facade
;
package
fi
.
codecrew
.
moya
.
facade
;
import
java.util.List
;
import
javax.ejb.EJB
;
import
javax.ejb.LocalBean
;
import
javax.ejb.LocalBean
;
import
javax.ejb.Stateless
;
import
javax.ejb.Stateless
;
import
javax.persistence.criteria.CriteriaBuilder
;
import
javax.persistence.criteria.CriteriaQuery
;
import
javax.persistence.criteria.Root
;
import
fi.codecrew.moya.beans.EventBean
;
import
fi.codecrew.moya.model.Role
;
import
fi.codecrew.moya.model.Role_
;
import
fi.codecrew.moya.model.TournamentGame
;
import
fi.codecrew.moya.model.TournamentRule
;
import
fi.codecrew.moya.model.TournamentRule
;
import
fi.codecrew.moya.model.TournamentRule_
;
@Stateless
@Stateless
@LocalBean
@LocalBean
public
class
TournamentRuleFacade
extends
IntegerPkGenericFacade
<
TournamentRule
>
{
public
class
TournamentRuleFacade
extends
IntegerPkGenericFacade
<
TournamentRule
>
{
public
TournamentRuleFacade
()
{
public
TournamentRuleFacade
()
{
super
(
TournamentRule
.
class
);
super
(
TournamentRule
.
class
);
}
}
public
List
<
TournamentRule
>
getRulesByGame
(
TournamentGame
tg
)
{
CriteriaBuilder
cb
=
getEm
().
getCriteriaBuilder
();
CriteriaQuery
<
TournamentRule
>
cq
=
cb
.
createQuery
(
TournamentRule
.
class
);
Root
<
TournamentRule
>
root
=
cq
.
from
(
TournamentRule
.
class
);
cq
.
where
(
cb
.
equal
(
root
.
get
(
TournamentRule_
.
tournamentGame
),
tg
));
return
getEm
().
createQuery
(
cq
).
getResultList
();
}
}
}
code/MoyaBeansClient/ejbModule/fi/codecrew/moya/beans/TournamentBeanLocal.java
View file @
f4d8f93
package
fi
.
codecrew
.
moya
.
beans
;
package
fi
.
codecrew
.
moya
.
beans
;
import
java.util.List
;
import
javax.ejb.Local
;
import
javax.ejb.Local
;
import
fi.codecrew.moya.model.TournamentGame
;
import
fi.codecrew.moya.model.TournamentRule
;
@Local
@Local
public
interface
TournamentBeanLocal
{
public
interface
TournamentBeanLocal
{
List
<
TournamentGame
>
getGames
();
List
<
TournamentRule
>
getRulesByGame
(
TournamentGame
tg
);
void
createGame
(
TournamentGame
tg
);
void
createRule
(
TournamentRule
tr
);
TournamentGame
findGame
(
Integer
id
);
TournamentRule
findRule
(
Integer
id
);
}
}
code/MoyaDatabase/src/fi/codecrew/moya/model/TournamentGame.java
View file @
f4d8f93
...
@@ -59,4 +59,20 @@ public class TournamentGame extends GenericEntity implements Serializable {
...
@@ -59,4 +59,20 @@ public class TournamentGame extends GenericEntity implements Serializable {
public
void
setAvailableRules
(
List
<
TournamentRule
>
availableRules
)
{
public
void
setAvailableRules
(
List
<
TournamentRule
>
availableRules
)
{
this
.
availableRules
=
availableRules
;
this
.
availableRules
=
availableRules
;
}
}
public
String
getDescription
()
{
return
description
;
}
public
void
setDescription
(
String
description
)
{
this
.
description
=
description
;
}
public
LanEvent
getLanEvent
()
{
return
lanEvent
;
}
public
void
setLanEvent
(
LanEvent
lanEvent
)
{
this
.
lanEvent
=
lanEvent
;
}
}
}
code/MoyaWeb/WebContent/tournaments/admin/createwizard.xhtml
View file @
f4d8f93
...
@@ -9,82 +9,78 @@
...
@@ -9,82 +9,78 @@
</f:metadata>
</f:metadata>
<ui:define
name=
"content"
>
<ui:define
name=
"content"
>
<h1>
#{i18n['
actionlog.
tournaments.admin.create_tournament']}
</h1>
<h1>
#{i18n['tournaments.admin.create_tournament']}
</h1>
<h:form>
<h:form>
<p:wizard
widgetVar=
"wiz"
flowListener=
"#{tournamentCreateView.onFlowProcess}"
>
<p:wizard
widgetVar=
"wiz"
flowListener=
"#{tournamentCreateView.onFlowProcess}"
>
<p:tab
id=
"selectGame"
title=
"#{i18n['
actionlog.
tournaments.admin.select_a_game']}"
>
<p:tab
id=
"selectGame"
title=
"#{i18n['tournaments.admin.select_a_game']}"
>
<p:panel>
<p:panel>
<h:messages
errorClass=
"error"
/>
<h:messages
errorClass=
"error"
/>
<h
2>
#{i18n['actionlog.tournaments.admin.select_a_game']}
</h2
>
<h
:panelGroup
rendered=
"#{tournamentCreateView.tournamentGames.isEmpty() eq false}"
>
<p:selectOneMenu
>
<h2>
#{i18n['tournaments.admin.select_a_game']}
</h2
>
<
f:selectItem
itemLabel=
""
/
>
<
h:selectOneMenu
value=
"#{tournamentCreateView.game}"
converter=
"#{tournamentGameConverter}"
>
<f:selectItem
itemLabel=
"spurdo spärde
"
/>
<f:selectItems
var=
"game"
itemLabel=
"#{game.name}"
value=
"#{tournamentCreateView.tournamentGames}"
itemValue=
"#{game.id}
"
/>
<
f:selectItem
itemLabel=
"cockmaster"
/
>
<
/h:selectOneMenu
>
</
p:selectOneMenu
>
</
h:panelGroup
>
<h2>
#{i18n['
actionlog.
tournaments.admin.create_a_game']}
</h2>
<h2>
#{i18n['tournaments.admin.create_a_game']}
</h2>
<h:panelGrid
columns=
"2"
>
<h:panelGrid
columns=
"2"
>
<h:outputText
value=
"#{i18n['
actionlog.
tournaments.admin.game_name']}"
/>
<h:outputText
value=
"#{i18n['tournaments.admin.game_name']}"
/>
<h:outputText
value=
"#{i18n['
actionlog.
tournaments.admin.game_description']}"
/>
<h:outputText
value=
"#{i18n['tournaments.admin.game_description']}"
/>
<p:inputText
/>
<p:inputText
value=
"#{tournamentCreateView.tournamentGameName}"
/>
<p:inputText
/>
<p:inputText
value=
"#{tournamentCreateView.tournamentGameDescription}"
/>
<h:outputText
value=
"#{i18n['actionlog.tournaments.admin.upload_game_image']}"
/>
<h:outputText
value=
""
/>
<p:fileUpload
mode=
"simple"
/>
</h:panelGrid>
</h:panelGrid>
</p:panel>
</p:panel>
</p:tab>
</p:tab>
<p:tab
id=
"selectRuleset"
title=
"#{i18n['
actionlog.
tournaments.admin.rules']}"
>
<p:tab
id=
"selectRuleset"
title=
"#{i18n['tournaments.admin.rules']}"
>
<p:panel>
<p:panel>
<h:messages
errorClass=
"error"
/>
<h:messages
errorClass=
"error"
/>
<h2>
#{i18n['actionlog.tournaments.admin.select_a_ruleset']}
</h2>
<p:selectOneMenu>
<h:panelGroup
rendered=
"#{tournamentCreateView.tournamentRules.isEmpty() eq false}"
>
<f:selectItem
itemLabel=
""
/>
<h2>
#{i18n['tournaments.admin.select_a_ruleset']}
</h2>
<f:selectItem
itemLabel=
"Pro-rules"
/>
<h:selectOneMenu
value=
"#{tournamentCreateView.rules}"
converter=
"#{tournamentRuleConverter}"
>
<f:selectItem
itemLabel=
"N00b-rules"
/>
<f:selectItems
var=
"rule"
itemLabel=
"#{rule.name}"
value=
"#{tournamentCreateView.tournamentRules}"
itemValue=
"#{rule.id}"
/>
</p:selectOneMenu>
</h:selectOneMenu>
</h:panelGroup>
<br
/>
<br
/>
<h2>
#{i18n['
actionlog.
tournaments.admin.create_new_ruleset']}
</h2>
<h2>
#{i18n['tournaments.admin.create_new_ruleset']}
</h2>
<h:outputText
value=
"#{i18n['
actionlog.
tournaments.ruleset_name']}"
/>
<h:outputText
value=
"#{i18n['tournaments.ruleset_name']}"
/>
<br
/>
<br
/>
<p:inputText
/>
<p:inputText
value=
"#{tournamentCreateView.rulesetName}"
/>
<br
/>
<br
/>
<h:outputText
value=
"#{i18n['
actionlog.
tournaments.ruleset_description']}"
/>
<h:outputText
value=
"#{i18n['tournaments.ruleset_description']}"
/>
<br
/>
<br
/>
<p:inputTextarea
/>
<p:inputTextarea
value=
"#{tournamentCreateView.rulesetDescription}"
/>
</p:panel>
</p:panel>
</p:tab>
</p:tab>
<p:tab
id=
"selectRegTimes"
title=
"#{i18n['
actionlog.
tournaments.admin.set_time_constraints']}"
>
<p:tab
id=
"selectRegTimes"
title=
"#{i18n['tournaments.admin.set_time_constraints']}"
>
<p:panel>
<p:panel>
<h:messages
errorClass=
"error"
/>
<h:messages
errorClass=
"error"
/>
<h2>
#{i18n['
actionlog.
tournaments.admin.registration_time_constraints']}
</h2>
<h2>
#{i18n['tournaments.admin.registration_time_constraints']}
</h2>
<h:panelGrid
columns=
"2"
>
<h:panelGrid
columns=
"2"
>
<h:outputText
value=
"#{i18n['
actionlog.
tournaments.registration_opens']}"
/>
<h:outputText
value=
"#{i18n['tournaments.registration_opens']}"
/>
<h:outputText
value=
"#{i18n['
actionlog.
tournaments.registration_closes']}"
/>
<h:outputText
value=
"#{i18n['tournaments.registration_closes']}"
/>
<p:calendar
stepHour=
"1"
stepMinute=
"10"
pattern=
"dd.MM.yyyy hh:mm"
/>
<p:calendar
stepHour=
"1"
stepMinute=
"10"
pattern=
"dd.MM.yyyy hh:mm"
/>
<p:calendar
stepHour=
"1"
stepMinute=
"10"
pattern=
"dd.MM.yyyy hh:mm"
/>
<p:calendar
stepHour=
"1"
stepMinute=
"10"
pattern=
"dd.MM.yyyy hh:mm"
/>
</h:panelGrid>
</h:panelGrid>
<h2>
#{i18n['
actionlog.
tournaments.admin.begin_time_constraints']}
</h2>
<h2>
#{i18n['tournaments.admin.begin_time_constraints']}
</h2>
<h:panelGrid>
<h:panelGrid>
<h:outputText
value=
"Start time"
/>
<h:outputText
value=
"Start time"
/>
<p:calendar
stepHour=
"1"
stepMinute=
"10"
pattern=
"dd.MM.yyyy hh:mm"
/>
<p:calendar
stepHour=
"1"
stepMinute=
"10"
pattern=
"dd.MM.yyyy hh:mm"
/>
</h:panelGrid>
</h:panelGrid>
</p:panel>
</p:panel>
<div
style=
"float: right;"
>
<div
style=
"float: right;"
>
<p:commandButton
icon=
"apply"
value=
"#{i18n['
actionlog.
tournaments.admin.create_tournament']}"
/>
<p:commandButton
icon=
"apply"
value=
"#{i18n['tournaments.admin.create_tournament']}"
/>
</div>
</div>
</p:tab>
</p:tab>
</p:wizard>
</p:wizard>
...
...
code/MoyaWeb/src/fi/codecrew/moya/web/cdiview/tournaments/TournamentCreateView.java
View file @
f4d8f93
package
fi
.
codecrew
.
moya
.
web
.
cdiview
.
tournaments
;
package
fi
.
codecrew
.
moya
.
web
.
cdiview
.
tournaments
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.List
;
import
fi.codecrew.moya.beans.EventBeanLocal
;
import
fi.codecrew.moya.beans.TournamentBeanLocal
;
import
fi.codecrew.moya.beans.TournamentBeanLocal
;
import
fi.codecrew.moya.model.Role
;
import
fi.codecrew.moya.model.Role
;
import
fi.codecrew.moya.model.Tournament
;
import
fi.codecrew.moya.model.Tournament
;
...
@@ -21,16 +23,28 @@ import org.primefaces.event.FlowEvent;
...
@@ -21,16 +23,28 @@ import org.primefaces.event.FlowEvent;
public
class
TournamentCreateView
extends
GenericCDIView
{
public
class
TournamentCreateView
extends
GenericCDIView
{
private
static
final
long
serialVersionUID
=
2547358764980373797L
;
private
static
final
long
serialVersionUID
=
2547358764980373797L
;
private
List
<
TournamentGame
>
tournamentGames
;
private
List
<
TournamentRule
>
tournamentRules
;
private
TournamentRule
rules
=
null
;
private
TournamentRule
rules
=
null
;
private
TournamentGame
game
=
null
;
private
TournamentGame
game
=
null
;
private
Tournament
tournament
=
null
;
private
Tournament
tournament
=
null
;
private
String
tournamentGameName
;
private
String
tournamentGameDescription
;
private
String
rulesetName
;
private
String
rulesetDescription
;
@EJB
TournamentBeanLocal
tournamentBean
;
@EJB
TournamentBeanLocal
tournamentBean
;
@EJB
EventBeanLocal
eventBean
;
public
void
initView
()
{
public
void
initView
()
{
if
(
tournament
==
null
)
{
if
(
tournament
==
null
)
{
this
.
beginConversation
();
this
.
beginConversation
();
tournament
=
new
Tournament
();
tournament
=
new
Tournament
();
tournamentGames
=
tournamentBean
.
getGames
();
}
}
}
}
...
@@ -38,9 +52,92 @@ public class TournamentCreateView extends GenericCDIView {
...
@@ -38,9 +52,92 @@ public class TournamentCreateView extends GenericCDIView {
}
}
public
List
<
TournamentGame
>
getTournamentGames
()
{
return
tournamentGames
;
}
public
List
<
TournamentRule
>
getTournamentRules
()
{
return
tournamentRules
;
}
public
void
uploadListener
(
org
.
primefaces
.
event
.
FileUploadEvent
event
)
{
System
.
out
.
println
(
"ZZ"
);
}
public
String
onFlowProcess
(
FlowEvent
event
)
{
public
String
onFlowProcess
(
FlowEvent
event
)
{
switch
(
event
.
getOldStep
())
{
case
"selectGame"
:
if
(
tournamentGameName
.
length
()
>
0
)
{
// oh lurd, we want to create a new gamy now
TournamentGame
tg
=
new
TournamentGame
();
tg
.
setName
(
tournamentGameName
);
tg
.
setDescription
(
tournamentGameDescription
);
tg
.
setLanEvent
(
eventBean
.
getCurrentEvent
());
tournamentBean
.
createGame
(
tg
);
}
tournamentRules
=
tournamentBean
.
getRulesByGame
(
this
.
getGame
());
break
;
case
"selectRuleset"
:
if
(
rulesetName
!=
null
&&
rulesetName
.
length
()
>
0
)
{
TournamentRule
tr
=
new
TournamentRule
();
tr
.
setName
(
rulesetName
);
tr
.
setDescription
(
rulesetDescription
);
tournamentBean
.
createRule
(
tr
);
}
break
;
}
System
.
out
.
println
(
event
.
getOldStep
());
System
.
out
.
println
(
event
.
getOldStep
());
return
event
.
getNewStep
();
return
event
.
getNewStep
();
}
}
public
TournamentGame
getGame
()
{
return
game
;
}
public
void
setGame
(
TournamentGame
game
)
{
this
.
game
=
game
;
}
public
TournamentRule
getRules
()
{
return
rules
;
}
public
void
setRules
(
TournamentRule
rules
)
{
this
.
rules
=
rules
;
}
public
String
getTournamentGameName
()
{
return
tournamentGameName
;
}
public
void
setTournamentGameName
(
String
tournamentGameName
)
{
this
.
tournamentGameName
=
tournamentGameName
;
}
public
String
getTournamentGameDescription
()
{
return
tournamentGameDescription
;
}
public
void
setTournamentGameDescription
(
String
tournamentGameDescription
)
{
this
.
tournamentGameDescription
=
tournamentGameDescription
;
}
public
String
getRulesetName
()
{
return
rulesetName
;
}
public
void
setRulesetName
(
String
rulesetName
)
{
this
.
rulesetName
=
rulesetName
;
}
public
String
getRulesetDescription
()
{
return
rulesetDescription
;
}
public
void
setRulesetDescription
(
String
rulesetDescription
)
{
this
.
rulesetDescription
=
rulesetDescription
;
}
}
}
code/MoyaWeb/src/fi/codecrew/moya/web/converter/TournamentGameConverter.java
0 → 100644
View file @
f4d8f93
package
fi
.
codecrew
.
moya
.
web
.
converter
;
import
javax.ejb.EJB
;
import
javax.enterprise.context.RequestScoped
;
import
javax.inject.Named
;
import
fi.codecrew.moya.beans.TournamentBeanLocal
;
import
fi.codecrew.moya.beans.UserBeanLocal
;
import
fi.codecrew.moya.model.EventUser
;
import
fi.codecrew.moya.model.TournamentGame
;
import
fi.codecrew.moya.utilities.jsf.GenericIntegerEntityConverter
;
@Named
@RequestScoped
public
class
TournamentGameConverter
extends
GenericIntegerEntityConverter
<
TournamentGame
>
{
@EJB
private
TournamentBeanLocal
tournamentBean
;
@Override
protected
TournamentGame
find
(
Integer
id
)
{
return
tournamentBean
.
findGame
(
id
);
}
}
code/MoyaWeb/src/fi/codecrew/moya/web/converter/TournamentRuleConverter.java
0 → 100644
View file @
f4d8f93
package
fi
.
codecrew
.
moya
.
web
.
converter
;
import
javax.ejb.EJB
;
import
javax.enterprise.context.RequestScoped
;
import
javax.inject.Named
;
import
fi.codecrew.moya.beans.TournamentBeanLocal
;
import
fi.codecrew.moya.beans.UserBeanLocal
;
import
fi.codecrew.moya.model.EventUser
;
import
fi.codecrew.moya.model.TournamentGame
;
import
fi.codecrew.moya.model.TournamentRule
;
import
fi.codecrew.moya.utilities.jsf.GenericIntegerEntityConverter
;
@Named
@RequestScoped
public
class
TournamentRuleConverter
extends
GenericIntegerEntityConverter
<
TournamentRule
>
{
@EJB
private
TournamentBeanLocal
tournamentBean
;
@Override
protected
TournamentRule
find
(
Integer
id
)
{
return
tournamentBean
.
findRule
(
id
);
}
}
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