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 ba6d4747
authored
May 17, 2014
by
Juho Juopperi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
do not require meta field in dbupdater tables
1 parent
9ae5aa24
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
4 deletions
code/MoyaDatabase/src/fi/codecrew/moya/model/DBModel.java
code/MoyaDatabase/src/fi/codecrew/moya/model/DBModel.java
View file @
ba6d474
...
...
@@ -4,22 +4,44 @@ import java.util.Date;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.GenerationType
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
javax.persistence.Temporal
;
import
javax.persistence.TemporalType
;
import
fi.codecrew.moya.utilities.jpa.ModelInterface
;
@Entity
@Table
(
name
=
"db_models"
)
public
class
DBModel
extends
GenericEntity
{
private
static
final
long
serialVersionUID
=
5073284536090477220L
;
public
class
DBModel
implements
ModelInterface
{
private
static
final
long
serialVersionUID
=
5073284536090477221L
;
public
static
final
String
ID_COLUMN
=
"id"
;
@Column
(
name
=
"revision"
,
nullable
=
false
)
@Id
@Column
(
name
=
ID_COLUMN
,
nullable
=
false
)
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
private
Integer
id
;
@Column
(
name
=
"revision"
,
nullable
=
false
)
private
Integer
revision
;
@Column
(
name
=
"applied_at"
)
@Column
(
name
=
"applied_at"
)
@Temporal
(
TemporalType
.
TIMESTAMP
)
private
Date
appliedAt
=
new
Date
();
@Override
public
final
Integer
getId
()
{
return
id
;
}
@Override
public
final
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
public
Date
getAppliedAt
()
{
return
appliedAt
;
}
...
...
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