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 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
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
25 deletions
code/MoyaDatabase/src/fi/codecrew/moya/model/DBModel.java
code/MoyaDatabase/src/fi/codecrew/moya/model/DBModel.java
View file @
ba6d474
...
@@ -4,35 +4,57 @@ import java.util.Date;
...
@@ -4,35 +4,57 @@ import java.util.Date;
import
javax.persistence.Column
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Entity
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.GenerationType
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
javax.persistence.Table
;
import
javax.persistence.Temporal
;
import
javax.persistence.Temporal
;
import
javax.persistence.TemporalType
;
import
javax.persistence.TemporalType
;
import
fi.codecrew.moya.utilities.jpa.ModelInterface
;
@Entity
@Entity
@Table
(
name
=
"db_models"
)
@Table
(
name
=
"db_models"
)
public
class
DBModel
extends
GenericEntity
{
public
class
DBModel
implements
ModelInterface
{
private
static
final
long
serialVersionUID
=
5073284536090477220L
;
private
static
final
long
serialVersionUID
=
5073284536090477221L
;
@Column
(
name
=
"revision"
,
nullable
=
false
)
public
static
final
String
ID_COLUMN
=
"id"
;
private
Integer
revision
;
@Id
@Column
(
name
=
"applied_at"
)
@Column
(
name
=
ID_COLUMN
,
nullable
=
false
)
@Temporal
(
TemporalType
.
TIMESTAMP
)
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
private
Date
appliedAt
=
new
Date
();
private
Integer
id
;
public
Date
getAppliedAt
()
{
@Column
(
name
=
"revision"
,
nullable
=
false
)
return
appliedAt
;
private
Integer
revision
;
}
@Column
(
name
=
"applied_at"
)
public
void
setAppliedAt
(
Date
appliedAt
)
{
@Temporal
(
TemporalType
.
TIMESTAMP
)
this
.
appliedAt
=
appliedAt
;
private
Date
appliedAt
=
new
Date
();
}
@Override
public
Integer
getRevision
()
{
public
final
Integer
getId
()
{
return
revision
;
return
id
;
}
}
public
void
setRevision
(
Integer
revision
)
{
@Override
this
.
revision
=
revision
;
public
final
void
setId
(
Integer
id
)
{
}
this
.
id
=
id
;
}
public
Date
getAppliedAt
()
{
return
appliedAt
;
}
public
void
setAppliedAt
(
Date
appliedAt
)
{
this
.
appliedAt
=
appliedAt
;
}
public
Integer
getRevision
()
{
return
revision
;
}
public
void
setRevision
(
Integer
revision
)
{
this
.
revision
=
revision
;
}
}
}
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