Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Antti Väyrynen
/
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 f4ae81f6
authored
May 10, 2014
by
Antti Tönkyrä
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
database objects for network association
1 parent
2fb04eec
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
122 additions
and
0 deletions
code/MoyaDatabase/src/fi/codecrew/moya/model/NetworkAssociation.java
code/MoyaUtilities/src/main/java/fi/codecrew/moya/enums/NetworkAssociationStatus.java
code/MoyaDatabase/src/fi/codecrew/moya/model/NetworkAssociation.java
0 → 100644
View file @
f4ae81f
package
fi
.
codecrew
.
moya
.
model
;
import
java.util.Calendar
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.EnumType
;
import
javax.persistence.Enumerated
;
import
javax.persistence.JoinColumn
;
import
javax.persistence.Table
;
import
javax.persistence.Temporal
;
import
javax.persistence.TemporalType
;
import
org.eclipse.persistence.annotations.OptimisticLocking
;
import
org.eclipse.persistence.annotations.OptimisticLockingType
;
import
fi.codecrew.moya.enums.NetworkAssociationStatus
;
@Entity
@Table
(
name
=
"network_associations"
)
@OptimisticLocking
(
type
=
OptimisticLockingType
.
CHANGED_COLUMNS
)
public
class
NetworkAssociation
extends
GenericEntity
{
private
static
final
long
serialVersionUID
=
-
7621152614442737756L
;
@JoinColumn
(
name
=
"event"
)
private
LanEvent
event
;
@JoinColumn
(
name
=
"event_user"
)
private
EventUser
eventUser
;
@Column
(
name
=
"ip"
)
private
String
ip
;
@Column
(
name
=
"mac"
)
private
String
mac
;
@JoinColumn
(
name
=
"place"
)
private
Place
place
;
@Column
(
name
=
"create_time"
,
nullable
=
false
)
@Temporal
(
TemporalType
.
TIMESTAMP
)
private
Calendar
createTime
=
Calendar
.
getInstance
();
@Column
(
name
=
"modify_time"
,
nullable
=
false
)
@Temporal
(
TemporalType
.
TIMESTAMP
)
private
Calendar
modifyTime
=
Calendar
.
getInstance
();
@Column
(
name
=
"status"
,
nullable
=
false
)
@Enumerated
(
EnumType
.
STRING
)
private
NetworkAssociationStatus
status
;
public
LanEvent
getEvent
()
{
return
event
;
}
public
void
setEvent
(
LanEvent
event
)
{
this
.
event
=
event
;
}
public
EventUser
getEventUser
()
{
return
eventUser
;
}
public
void
setEventUser
(
EventUser
eventUser
)
{
this
.
eventUser
=
eventUser
;
}
public
String
getIp
()
{
return
ip
;
}
public
void
setIp
(
String
ip
)
{
this
.
ip
=
ip
;
}
public
String
getMac
()
{
return
mac
;
}
public
void
setMac
(
String
mac
)
{
this
.
mac
=
mac
;
}
public
Place
getPlace
()
{
return
place
;
}
public
void
setPlace
(
Place
place
)
{
this
.
place
=
place
;
}
public
Calendar
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Calendar
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Calendar
getModifyTime
()
{
return
modifyTime
;
}
public
void
setModifyTime
(
Calendar
modifyTime
)
{
this
.
modifyTime
=
modifyTime
;
}
public
NetworkAssociationStatus
getStatus
()
{
return
status
;
}
public
void
setStatus
(
NetworkAssociationStatus
status
)
{
this
.
status
=
status
;
}
}
code/MoyaUtilities/src/main/java/fi/codecrew/moya/enums/NetworkAssociationStatus.java
0 → 100644
View file @
f4ae81f
package
fi
.
codecrew
.
moya
.
enums
;
public
enum
NetworkAssociationStatus
{
PENDING
,
ACTIVE
,
EXPIRED
}
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