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 9020ad43
authored
Jan 30, 2015
by
Tuukka Kivilahti
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master' into infomap
Conflicts: code/moya-web/pom.xml
2 parents
c5b9bc29
dd068d5b
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
22 deletions
code/moya-beans/ejbModule/fi/codecrew/moya/beans/PlaceBean.java
code/moya-beans/ejbModule/fi/codecrew/moya/facade/PlaceFacade.java
code/moya-restpojo/pom.xml
code/moya-web/pom.xml
code/moya-beans/ejbModule/fi/codecrew/moya/beans/PlaceBean.java
View file @
9020ad4
...
@@ -584,11 +584,26 @@ public class PlaceBean implements PlaceBeanLocal {
...
@@ -584,11 +584,26 @@ public class PlaceBean implements PlaceBeanLocal {
@Override
@Override
@RolesAllowed
(
MapPermission
.
S_VIEW
)
@RolesAllowed
(
MapPermission
.
S_VIEW
)
public
Place
find
(
int
placeId
)
{
public
Place
find
(
int
placeId
)
{
return
placeFacade
.
find
(
placeId
);
Place
ret
=
placeFacade
.
find
(
placeId
);
// Check that place belongs to this event before returning it.
if
(
ret
.
getProduct
()
!=
null
)
{
if
(
eventBean
.
getCurrentEvent
().
equals
(
ret
.
getProduct
().
getEvent
()))
{
return
ret
;
}
return
null
;
}
if
(
ret
.
getMap
()
!=
null
)
{
if
(
eventBean
.
getCurrentEvent
().
equals
(
ret
.
getMap
().
getEvent
()))
{
return
ret
;
}
}
return
null
;
}
}
@Override
@Override
@RolesAllowed
(
MapPermission
.
S_
BUY_PLACE
S
)
@RolesAllowed
(
MapPermission
.
S_
MANAGE_OTHER
S
)
public
Place
unbuyPlace
(
Place
place
)
{
public
Place
unbuyPlace
(
Place
place
)
{
place
=
placeFacade
.
reload
(
place
);
place
=
placeFacade
.
reload
(
place
);
if
(
place
.
getGroup
()
!=
null
)
{
if
(
place
.
getGroup
()
!=
null
)
{
...
@@ -806,7 +821,7 @@ public class PlaceBean implements PlaceBeanLocal {
...
@@ -806,7 +821,7 @@ public class PlaceBean implements PlaceBeanLocal {
row
=
placeSlotFacade
.
reload
(
row
);
row
=
placeSlotFacade
.
reload
(
row
);
if
(
row
.
getPlace
()
==
null
&&
row
.
getUsed
()
==
null
)
{
if
(
row
.
getPlace
()
==
null
&&
row
.
getUsed
()
==
null
)
{
row
.
setUsed
(
new
Date
());
row
.
setUsed
(
new
Date
());
}
else
{
}
else
{
return
false
;
return
false
;
}
}
return
true
;
return
true
;
...
@@ -817,7 +832,7 @@ public class PlaceBean implements PlaceBeanLocal {
...
@@ -817,7 +832,7 @@ public class PlaceBean implements PlaceBeanLocal {
row
=
placeSlotFacade
.
reload
(
row
);
row
=
placeSlotFacade
.
reload
(
row
);
if
(
row
.
getPlace
()
==
null
&&
row
.
getUsed
()
!=
null
)
{
if
(
row
.
getPlace
()
==
null
&&
row
.
getUsed
()
!=
null
)
{
row
.
setUsed
(
null
);
row
.
setUsed
(
null
);
}
else
{
}
else
{
return
false
;
return
false
;
}
}
return
true
;
return
true
;
...
...
code/moya-beans/ejbModule/fi/codecrew/moya/facade/PlaceFacade.java
View file @
9020ad4
...
@@ -58,22 +58,6 @@ public class PlaceFacade extends IntegerPkGenericFacade<Place> {
...
@@ -58,22 +58,6 @@ public class PlaceFacade extends IntegerPkGenericFacade<Place> {
super
(
Place
.
class
);
super
(
Place
.
class
);
}
}
@Override
public
Place
find
(
Integer
id
)
{
CriteriaBuilder
cb
=
getEm
().
getCriteriaBuilder
();
CriteriaQuery
<
Place
>
cq
=
cb
.
createQuery
(
Place
.
class
);
Root
<
Place
>
root
=
cq
.
from
(
Place
.
class
);
LanEvent
event
=
eventBean
.
getCurrentEvent
();
cq
.
where
(
cb
.
equal
(
root
.
get
(
Place_
.
id
),
id
),
cb
.
or
(
cb
.
equal
(
root
.
get
(
Place_
.
map
).
get
(
EventMap_
.
event
),
event
),
cb
.
equal
(
root
.
get
(
Place_
.
product
).
get
(
Product_
.
event
),
event
))
);
return
super
.
getSingleNullableResult
(
getEm
().
createQuery
(
cq
));
}
public
void
timeoutPlaces
()
{
public
void
timeoutPlaces
()
{
CriteriaBuilder
cb
=
getEm
().
getCriteriaBuilder
();
CriteriaBuilder
cb
=
getEm
().
getCriteriaBuilder
();
CriteriaQuery
<
Place
>
cq
=
cb
.
createQuery
(
Place
.
class
);
CriteriaQuery
<
Place
>
cq
=
cb
.
createQuery
(
Place
.
class
);
...
...
code/moya-restpojo/pom.xml
View file @
9020ad4
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<modelVersion>
4.0.0
</modelVersion>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
moya-restpojo
</artifactId>
<artifactId>
moya-restpojo
</artifactId>
<groupId>
fi.codecrew.moya
</groupId>
<groupId>
fi.codecrew.moya
</groupId>
<version>
1.0.7
-rc1
</version>
<version>
1.0.7
</version>
<build>
<build>
<plugins>
<plugins>
<plugin>
<plugin>
...
...
code/moya-web/pom.xml
View file @
9020ad4
...
@@ -45,7 +45,7 @@
...
@@ -45,7 +45,7 @@
<dependency>
<dependency>
<groupId>
fi.codecrew.moya
</groupId>
<groupId>
fi.codecrew.moya
</groupId>
<artifactId>
moya-restpojo
</artifactId>
<artifactId>
moya-restpojo
</artifactId>
<version>
1.0.7
-rc1
</version>
<version>
1.0.7
</version>
</dependency>
</dependency>
</dependencies>
</dependencies>
...
...
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