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 04b06988
authored
Apr 18, 2010
by
Tuomas Riihimäki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added eventId constructor to EventPk
1 parent
02bbcf3d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
19 deletions
code/LanBortalBeans/ejbModule/fi/insomnia/bortal/beans/PlaceMapBean.java
code/LanBortalBeans/ejbModule/fi/insomnia/bortal/facade/EventChildGenericFacade.java
code/LanBortalDatabase/src/fi/insomnia/bortal/model/EventPk.java
code/LanBortalBeans/ejbModule/fi/insomnia/bortal/beans/PlaceMapBean.java
View file @
04b0698
...
...
@@ -46,21 +46,13 @@ public class PlaceMapBean implements PlaceMapBeanLocal {
EventMap
map
=
null
;
if
(
placeId
!=
null
)
{
EventPk
pk
=
new
EventPk
();
pk
.
setEventId
(
eventId
);
pk
.
setId
(
placeId
);
place
=
placeFacade
.
find
(
eventId
,
placeId
);
}
if
(
place
!=
null
)
{
map
=
place
.
getMap
();
}
else
{
EventPk
pk
=
new
EventPk
();
pk
.
setEventId
(
eventId
);
pk
.
setId
(
mapId
);
map
=
eventMapFacade
.
find
(
pk
);
map
=
eventMapFacade
.
find
(
eventId
,
mapId
);
}
BufferedImage
image
=
map
.
getMapWithPlaces
();
...
...
@@ -69,7 +61,7 @@ public class PlaceMapBean implements PlaceMapBeanLocal {
User
user
=
userFacade
.
find
(
userId
);
if
(
user
!=
null
)
{
for
(
PlaceGroup
uplacegroup
:
user
.
getPlaceGroup
List
())
{
for
(
PlaceGroup
uplacegroup
:
user
.
getPlaceGroup
s
())
{
for
(
Place
uplace
:
uplacegroup
.
getPlaces
())
uplace
.
drawOwnedPlace
(
image
);
}
...
...
code/LanBortalBeans/ejbModule/fi/insomnia/bortal/facade/EventChildGenericFacade.java
View file @
04b0698
...
...
@@ -6,21 +6,17 @@ import fi.insomnia.bortal.model.EventPk;
/**
* Session Bean implementation class GenericFacade
*/
public
abstract
class
EventChildGenericFacade
<
T
extends
EventChildInterface
>
extends
GenericFacade
<
EventPk
,
T
>
{
public
abstract
class
EventChildGenericFacade
<
T
extends
EventChildInterface
>
extends
GenericFacade
<
EventPk
,
T
>
{
public
EventChildGenericFacade
(
Class
<
T
>
entityClass
)
{
super
(
entityClass
);
}
public
T
find
(
Integer
eventId
,
Integer
id
)
{
EventPk
pk
=
new
EventPk
();
pk
.
setEventId
(
eventId
);
public
T
find
(
Integer
eventId
,
Integer
id
)
{
EventPk
pk
=
new
EventPk
(
eventId
);
pk
.
setId
(
id
);
return
find
(
pk
);
}
}
code/LanBortalDatabase/src/fi/insomnia/bortal/model/EventPk.java
View file @
04b0698
...
...
@@ -30,6 +30,11 @@ public class EventPk implements Serializable {
super
();
this
.
eventId
=
event
.
getId
();
}
public
EventPk
(
Integer
eventId
)
{
super
();
this
.
eventId
=
eventId
;
}
public
void
setId
(
Integer
id
)
{
this
.
id
=
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