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 7fd52215
authored
Nov 17, 2012
by
Tuukka Kivilahti, TKffTK
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
count -> quantity, bigdesimals
1 parent
d5470a06
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
11 deletions
code/LanBortalDatabase/src/fi/insomnia/bortal/model/InventoryEvent.java
code/LanBortalDatabase/src/fi/insomnia/bortal/model/InventoryEvent.java
View file @
7fd5221
package
fi
.
insomnia
.
bortal
.
model
;
package
fi
.
insomnia
.
bortal
.
model
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.Date
;
import
javax.persistence.Column
;
import
javax.persistence.Column
;
...
@@ -13,7 +14,7 @@ import org.eclipse.persistence.annotations.OptimisticLocking;
...
@@ -13,7 +14,7 @@ import org.eclipse.persistence.annotations.OptimisticLocking;
import
org.eclipse.persistence.annotations.OptimisticLockingType
;
import
org.eclipse.persistence.annotations.OptimisticLockingType
;
@Entity
@Entity
@Table
(
name
=
"inventory_event"
)
@Table
(
name
=
"inventory_event
s
"
)
@OptimisticLocking
(
type
=
OptimisticLockingType
.
CHANGED_COLUMNS
)
@OptimisticLocking
(
type
=
OptimisticLockingType
.
CHANGED_COLUMNS
)
public
class
InventoryEvent
extends
GenericEntity
{
public
class
InventoryEvent
extends
GenericEntity
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
...
@@ -41,22 +42,14 @@ public class InventoryEvent extends GenericEntity {
...
@@ -41,22 +42,14 @@ public class InventoryEvent extends GenericEntity {
this
.
info
=
info
;
this
.
info
=
info
;
}
}
public
int
getCount
()
{
return
count
;
}
public
void
setCount
(
int
count
)
{
this
.
count
=
count
;
}
@JoinColumn
(
name
=
"product_id"
)
@JoinColumn
(
name
=
"product_id"
)
private
Product
product
;
private
Product
product
;
@Column
(
name
=
"info"
,
nullable
=
true
)
@Column
(
name
=
"info"
,
nullable
=
true
)
private
String
info
;
private
String
info
;
@Column
(
name
=
"
count"
,
nullable
=
false
)
@Column
(
name
=
"
quantity"
,
nullable
=
false
,
precision
=
24
,
scale
=
4
)
private
int
count
;
private
BigDecimal
quantity
;
...
@@ -76,5 +69,13 @@ public class InventoryEvent extends GenericEntity {
...
@@ -76,5 +69,13 @@ public class InventoryEvent extends GenericEntity {
this
.
created
=
created
;
this
.
created
=
created
;
}
}
public
BigDecimal
getQuantity
()
{
return
quantity
;
}
public
void
setQuantity
(
BigDecimal
quantity
)
{
this
.
quantity
=
quantity
;
}
}
}
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