Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Max Mecklin
/
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 8fab60f7
authored
Jul 18, 2010
by
Tuomas Riihimäki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ohops.. Productissa price pitäisi olla varmaan BigDecimal
1 parent
1aeabaac
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
code/LanBortalDatabase/src/META-INF/persistence.xml
code/LanBortalDatabase/src/fi/insomnia/bortal/model/Product.java
code/LanBortalDatabase/src/META-INF/persistence.xml
View file @
8fab60f
...
...
@@ -6,7 +6,6 @@
<property
name=
"eclipselink.ddl-generation"
value=
"drop-and-create-tables"
/>
<property
name=
"eclipselink.ddl-generation.output-mode"
value=
"both"
/>
<property
name=
"eclipselink.cache.type.default"
value=
"NONE"
/>
<property
name=
"eclipselink.logging.level"
value=
"ALL"
/>
</properties>
</persistence-unit>
...
...
code/LanBortalDatabase/src/fi/insomnia/bortal/model/Product.java
View file @
8fab60f
...
...
@@ -4,6 +4,7 @@
*/
package
fi
.
insomnia
.
bortal
.
model
;
import
java.math.BigDecimal
;
import
java.math.BigInteger
;
import
java.util.List
;
...
...
@@ -44,8 +45,8 @@ public class Product implements EventChildInterface {
@Column
(
name
=
"product_name"
)
private
String
name
;
@Column
(
name
=
"price"
,
nullable
=
false
)
private
Big
Integer
price
;
@Column
(
name
=
"price"
,
nullable
=
false
,
precision
=
24
,
scale
=
4
)
private
Big
Decimal
price
;
@Column
(
name
=
"sort"
,
nullable
=
false
)
private
int
sort
;
...
...
@@ -84,7 +85,7 @@ public class Product implements EventChildInterface {
this
.
id
=
new
EventPk
(
event
);
}
public
Product
(
Event
event
,
Big
Integer
price
,
int
sort
)
{
public
Product
(
Event
event
,
Big
Decimal
price
,
int
sort
)
{
this
(
event
);
this
.
price
=
price
;
this
.
sort
=
sort
;
...
...
@@ -98,11 +99,11 @@ public class Product implements EventChildInterface {
this
.
name
=
productName
;
}
public
Big
Integer
getPrice
()
{
public
Big
Decimal
getPrice
()
{
return
price
;
}
public
void
setPrice
(
Big
Integer
price
)
{
public
void
setPrice
(
Big
Decimal
price
)
{
this
.
price
=
price
;
}
...
...
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