Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Codecrew
/
Moya
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
30
Merge Requests
2
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit c10849e0
authored
Mar 07, 2010
by
Juho Juopperi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
model fixes
1 parent
34ad9a2c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
180 additions
and
179 deletions
code/LanBortal/EarContent/lib/LanBortalDatabase.jar
code/LanBortalDatabase/src/fi/insomnia/bortal/model/Bill.java
code/LanBortalDatabase/src/fi/insomnia/bortal/model/Compo.java
code/LanBortalDatabase/src/fi/insomnia/bortal/model/CompoEntryFile.java
code/LanBortalDatabase/src/fi/insomnia/bortal/model/RoleRight.java
code/LanBortal/EarContent/lib/LanBortalDatabase.jar
View file @
c10849e
No preview for this file type
code/LanBortalDatabase/src/fi/insomnia/bortal/model/Bill.java
View file @
c10849e
...
@@ -28,15 +28,17 @@ import javax.persistence.Version;
...
@@ -28,15 +28,17 @@ import javax.persistence.Version;
@Entity
@Entity
@Table
(
name
=
"bills"
)
@Table
(
name
=
"bills"
)
@NamedQueries
(
{
@NamedQueries
(
{
@NamedQuery
(
name
=
"Bill.findAll"
,
query
=
"SELECT b FROM Bill b"
),
@NamedQuery
(
name
=
"Bill.findAll"
,
query
=
"SELECT b FROM Bill b"
),
@NamedQuery
(
name
=
"Bill.findByBillsId"
,
query
=
"SELECT b FROM Bill b WHERE id = :id"
),
// @NamedQuery(name = "Bill.findById", query =
@NamedQuery
(
name
=
"Bill.findByDueDate"
,
query
=
"SELECT b FROM Bill b WHERE b.dueDate = :dueDate"
),
// "SELECT b FROM Bill b WHERE id = :id"),
@NamedQuery
(
name
=
"Bill.findByPaidDate"
,
query
=
"SELECT b FROM Bill b WHERE b.paidDate = :paidDate"
),
@NamedQuery
(
name
=
"Bill.findByDueDate"
,
query
=
"SELECT b FROM Bill b WHERE b.dueDate = :dueDate"
),
@NamedQuery
(
name
=
"Bill.findByReferenceNumber"
,
query
=
"SELECT b FROM Bill b WHERE b.referenceNumber = :referenceNumber"
),
@NamedQuery
(
name
=
"Bill.findByPaidDate"
,
query
=
"SELECT b FROM Bill b WHERE b.paidDate = :paidDate"
),
@NamedQuery
(
name
=
"Bill.findByNotes"
,
query
=
"SELECT b FROM Bill b WHERE b.notes = :notes"
)
})
@NamedQuery
(
name
=
"Bill.findByReferenceNumber"
,
query
=
"SELECT b FROM Bill b WHERE b.referenceNumber = :referenceNumber"
),
@NamedQuery
(
name
=
"Bill.findByNotes"
,
query
=
"SELECT b FROM Bill b WHERE b.notes = :notes"
)
})
public
class
Bill
implements
ModelInterface
{
public
class
Bill
implements
ModelInterface
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
@Id
@Id
@Column
(
name
=
"bills_id"
,
nullable
=
false
)
@Column
(
name
=
"bills_id"
,
nullable
=
false
)
private
Integer
id
;
private
Integer
id
;
...
@@ -68,12 +70,12 @@ public class Bill implements ModelInterface {
...
@@ -68,12 +70,12 @@ public class Bill implements ModelInterface {
@Override
@Override
public
Integer
getId
()
{
public
Integer
getId
()
{
return
id
;
return
id
;
}
}
@Override
@Override
public
void
setId
(
Integer
id
)
{
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
this
.
id
=
id
;
}
}
@Version
@Version
...
@@ -84,99 +86,99 @@ public class Bill implements ModelInterface {
...
@@ -84,99 +86,99 @@ public class Bill implements ModelInterface {
}
}
public
Bill
(
Integer
billsId
)
{
public
Bill
(
Integer
billsId
)
{
this
.
id
=
billsId
;
this
.
id
=
billsId
;
}
}
public
Date
getDueDate
()
{
public
Date
getDueDate
()
{
return
dueDate
;
return
dueDate
;
}
}
public
void
setDueDate
(
Date
dueDate
)
{
public
void
setDueDate
(
Date
dueDate
)
{
this
.
dueDate
=
dueDate
;
this
.
dueDate
=
dueDate
;
}
}
public
Date
getPaidDate
()
{
public
Date
getPaidDate
()
{
return
paidDate
;
return
paidDate
;
}
}
public
void
setPaidDate
(
Date
paidDate
)
{
public
void
setPaidDate
(
Date
paidDate
)
{
this
.
paidDate
=
paidDate
;
this
.
paidDate
=
paidDate
;
}
}
public
String
getReferenceNumber
()
{
public
String
getReferenceNumber
()
{
return
referenceNumber
;
return
referenceNumber
;
}
}
public
void
setReferenceNumber
(
String
referenceNumber
)
{
public
void
setReferenceNumber
(
String
referenceNumber
)
{
this
.
referenceNumber
=
referenceNumber
;
this
.
referenceNumber
=
referenceNumber
;
}
}
public
String
getNotes
()
{
public
String
getNotes
()
{
return
notes
;
return
notes
;
}
}
public
void
setNotes
(
String
notes
)
{
public
void
setNotes
(
String
notes
)
{
this
.
notes
=
notes
;
this
.
notes
=
notes
;
}
}
public
List
<
BillLine
>
getBillLines
()
{
public
List
<
BillLine
>
getBillLines
()
{
return
billLines
;
return
billLines
;
}
}
public
void
setBillLines
(
List
<
BillLine
>
billLineList
)
{
public
void
setBillLines
(
List
<
BillLine
>
billLineList
)
{
this
.
billLines
=
billLineList
;
this
.
billLines
=
billLineList
;
}
}
public
AccountEvent
getAccountEvent
()
{
public
AccountEvent
getAccountEvent
()
{
return
accountEvent
;
return
accountEvent
;
}
}
public
void
setAccountEvent
(
AccountEvent
accoutEventsId
)
{
public
void
setAccountEvent
(
AccountEvent
accoutEventsId
)
{
this
.
accountEvent
=
accoutEventsId
;
this
.
accountEvent
=
accoutEventsId
;
}
}
public
User
getUser
()
{
public
User
getUser
()
{
return
user
;
return
user
;
}
}
public
void
setUser
(
User
usersId
)
{
public
void
setUser
(
User
usersId
)
{
this
.
user
=
usersId
;
this
.
user
=
usersId
;
}
}
@Override
@Override
public
int
hashCode
()
{
public
int
hashCode
()
{
int
hash
=
0
;
int
hash
=
0
;
hash
+=
(
id
!=
null
?
id
.
hashCode
()
:
0
);
hash
+=
(
id
!=
null
?
id
.
hashCode
()
:
0
);
return
hash
;
return
hash
;
}
}
@Override
@Override
public
boolean
equals
(
Object
object
)
{
public
boolean
equals
(
Object
object
)
{
// TODO: Warning - this method won't work in the case the id fields are
// TODO: Warning - this method won't work in the case the id fields are
// not set
// not set
if
(!(
object
instanceof
Bill
))
{
if
(!(
object
instanceof
Bill
))
{
return
false
;
return
false
;
}
}
Bill
other
=
(
Bill
)
object
;
Bill
other
=
(
Bill
)
object
;
if
((
this
.
id
==
null
&&
other
.
id
!=
null
)
if
((
this
.
id
==
null
&&
other
.
id
!=
null
)
||
(
this
.
id
!=
null
&&
!
this
.
id
.
equals
(
other
.
id
)))
{
||
(
this
.
id
!=
null
&&
!
this
.
id
.
equals
(
other
.
id
)))
{
return
false
;
return
false
;
}
}
return
true
;
return
true
;
}
}
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
"fi.insomnia.bortal.model.Bill[id="
+
id
+
"]"
;
return
"fi.insomnia.bortal.model.Bill[id="
+
id
+
"]"
;
}
}
@Override
@Override
public
void
setJpaVersionField
(
int
jpaVersionField
)
{
public
void
setJpaVersionField
(
int
jpaVersionField
)
{
this
.
jpaVersionField
=
jpaVersionField
;
this
.
jpaVersionField
=
jpaVersionField
;
}
}
@Override
@Override
public
int
getJpaVersionField
()
{
public
int
getJpaVersionField
()
{
return
jpaVersionField
;
return
jpaVersionField
;
}
}
}
}
code/LanBortalDatabase/src/fi/insomnia/bortal/model/Compo.java
View file @
c10849e
...
@@ -28,16 +28,16 @@ import javax.persistence.Version;
...
@@ -28,16 +28,16 @@ import javax.persistence.Version;
@Entity
@Entity
@Table
(
name
=
"compos"
)
@Table
(
name
=
"compos"
)
@NamedQueries
(
{
@NamedQueries
(
{
@NamedQuery
(
name
=
"Compo.findAll"
,
query
=
"SELECT c FROM Compo c"
),
@NamedQuery
(
name
=
"Compo.findAll"
,
query
=
"SELECT c FROM Compo c"
),
@NamedQuery
(
name
=
"Compo.findById"
,
query
=
"SELECT c FROM Compo c WHERE c.id = :id"
),
@NamedQuery
(
name
=
"Compo.findById"
,
query
=
"SELECT c FROM Compo c WHERE c.id = :id"
),
@NamedQuery
(
name
=
"Compo.findByName"
,
query
=
"SELECT c FROM Compo c WHERE c.name = :name"
),
@NamedQuery
(
name
=
"Compo.findByName"
,
query
=
"SELECT c FROM Compo c WHERE c.name = :name"
),
@NamedQuery
(
name
=
"Compo.findByCompoStart"
,
query
=
"SELECT c FROM Compo c WHERE c.compoStart
= :startTime"
),
@NamedQuery
(
name
=
"Compo.findByStartTime"
,
query
=
"SELECT c FROM Compo c WHERE c.startTime
= :startTime"
),
@NamedQuery
(
name
=
"Compo.findByVoteStart"
,
query
=
"SELECT c FROM Compo c WHERE c.voteStart = :voteStart"
),
@NamedQuery
(
name
=
"Compo.findByVoteStart"
,
query
=
"SELECT c FROM Compo c WHERE c.voteStart = :voteStart"
),
@NamedQuery
(
name
=
"Compo.findByVoteEnd"
,
query
=
"SELECT c FROM Compo c WHERE c.voteEnd = :voteEnd"
),
@NamedQuery
(
name
=
"Compo.findByVoteEnd"
,
query
=
"SELECT c FROM Compo c WHERE c.voteEnd = :voteEnd"
),
@NamedQuery
(
name
=
"Compo.findBySubmitStart"
,
query
=
"SELECT c FROM Compo c WHERE c.submitStart = :submitStart"
),
@NamedQuery
(
name
=
"Compo.findBySubmitStart"
,
query
=
"SELECT c FROM Compo c WHERE c.submitStart = :submitStart"
),
@NamedQuery
(
name
=
"Compo.findBySubmitEnd"
,
query
=
"SELECT c FROM Compo c WHERE c.submitEnd = :submitEnd"
),
@NamedQuery
(
name
=
"Compo.findBySubmitEnd"
,
query
=
"SELECT c FROM Compo c WHERE c.submitEnd = :submitEnd"
),
@NamedQuery
(
name
=
"Compo.findByHoldVoting"
,
query
=
"SELECT c FROM Compo c WHERE c.holdVoting = :holdVoting"
),
@NamedQuery
(
name
=
"Compo.findByHoldVoting"
,
query
=
"SELECT c FROM Compo c WHERE c.holdVoting = :holdVoting"
),
@NamedQuery
(
name
=
"Compo.findByDescription"
,
query
=
"SELECT c FROM Compo c WHERE c.description = :description"
)
})
@NamedQuery
(
name
=
"Compo.findByDescription"
,
query
=
"SELECT c FROM Compo c WHERE c.description = :description"
)
})
public
class
Compo
implements
ModelInterface
{
public
class
Compo
implements
ModelInterface
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
@Id
@Id
...
@@ -86,142 +86,142 @@ public class Compo implements ModelInterface {
...
@@ -86,142 +86,142 @@ public class Compo implements ModelInterface {
@Override
@Override
public
Integer
getId
()
{
public
Integer
getId
()
{
return
id
;
return
id
;
}
}
@Override
@Override
public
void
setId
(
Integer
id
)
{
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
this
.
id
=
id
;
}
}
public
Compo
()
{
public
Compo
()
{
}
}
public
Compo
(
Integer
composId
)
{
public
Compo
(
Integer
composId
)
{
this
.
id
=
composId
;
this
.
id
=
composId
;
}
}
public
Compo
(
Integer
composId
,
String
compoName
,
boolean
holdVoting
)
{
public
Compo
(
Integer
composId
,
String
compoName
,
boolean
holdVoting
)
{
this
.
id
=
composId
;
this
.
id
=
composId
;
this
.
name
=
compoName
;
this
.
name
=
compoName
;
this
.
holdVoting
=
holdVoting
;
this
.
holdVoting
=
holdVoting
;
}
}
public
String
getName
()
{
public
String
getName
()
{
return
name
;
return
name
;
}
}
public
void
setName
(
String
compoName
)
{
public
void
setName
(
String
compoName
)
{
this
.
name
=
compoName
;
this
.
name
=
compoName
;
}
}
public
Date
getStartTime
()
{
public
Date
getStartTime
()
{
return
startTime
;
return
startTime
;
}
}
public
void
setStartTime
(
Date
compoStart
)
{
public
void
setStartTime
(
Date
compoStart
)
{
this
.
startTime
=
compoStart
;
this
.
startTime
=
compoStart
;
}
}
public
Date
getVoteStart
()
{
public
Date
getVoteStart
()
{
return
voteStart
;
return
voteStart
;
}
}
public
void
setVoteStart
(
Date
voteStart
)
{
public
void
setVoteStart
(
Date
voteStart
)
{
this
.
voteStart
=
voteStart
;
this
.
voteStart
=
voteStart
;
}
}
public
Date
getVoteEnd
()
{
public
Date
getVoteEnd
()
{
return
voteEnd
;
return
voteEnd
;
}
}
public
void
setVoteEnd
(
Date
voteEnd
)
{
public
void
setVoteEnd
(
Date
voteEnd
)
{
this
.
voteEnd
=
voteEnd
;
this
.
voteEnd
=
voteEnd
;
}
}
public
Date
getSubmitStart
()
{
public
Date
getSubmitStart
()
{
return
submitStart
;
return
submitStart
;
}
}
public
void
setSubmitStart
(
Date
submitStart
)
{
public
void
setSubmitStart
(
Date
submitStart
)
{
this
.
submitStart
=
submitStart
;
this
.
submitStart
=
submitStart
;
}
}
public
Date
getSubmitEnd
()
{
public
Date
getSubmitEnd
()
{
return
submitEnd
;
return
submitEnd
;
}
}
public
void
setSubmitEnd
(
Date
submitEnd
)
{
public
void
setSubmitEnd
(
Date
submitEnd
)
{
this
.
submitEnd
=
submitEnd
;
this
.
submitEnd
=
submitEnd
;
}
}
public
boolean
getHoldVoting
()
{
public
boolean
getHoldVoting
()
{
return
holdVoting
;
return
holdVoting
;
}
}
public
void
setHoldVoting
(
boolean
holdVoting
)
{
public
void
setHoldVoting
(
boolean
holdVoting
)
{
this
.
holdVoting
=
holdVoting
;
this
.
holdVoting
=
holdVoting
;
}
}
public
List
<
CompoEntry
>
getCompoEntries
()
{
public
List
<
CompoEntry
>
getCompoEntries
()
{
return
compoEntries
;
return
compoEntries
;
}
}
public
void
setCompoEntries
(
List
<
CompoEntry
>
compoEntryList
)
{
public
void
setCompoEntries
(
List
<
CompoEntry
>
compoEntryList
)
{
this
.
compoEntries
=
compoEntryList
;
this
.
compoEntries
=
compoEntryList
;
}
}
public
Event
getEvent
()
{
public
Event
getEvent
()
{
return
event
;
return
event
;
}
}
public
void
setEvent
(
Event
eventsId
)
{
public
void
setEvent
(
Event
eventsId
)
{
this
.
event
=
eventsId
;
this
.
event
=
eventsId
;
}
}
@Override
@Override
public
int
hashCode
()
{
public
int
hashCode
()
{
int
hash
=
0
;
int
hash
=
0
;
hash
+=
(
id
!=
null
?
id
.
hashCode
()
:
0
);
hash
+=
(
id
!=
null
?
id
.
hashCode
()
:
0
);
return
hash
;
return
hash
;
}
}
@Override
@Override
public
boolean
equals
(
Object
object
)
{
public
boolean
equals
(
Object
object
)
{
// TODO: Warning - this method won't work in the case the id fields are
// TODO: Warning - this method won't work in the case the id fields are
// not set
// not set
if
(!(
object
instanceof
Compo
))
{
if
(!(
object
instanceof
Compo
))
{
return
false
;
return
false
;
}
}
Compo
other
=
(
Compo
)
object
;
Compo
other
=
(
Compo
)
object
;
if
((
this
.
id
==
null
&&
other
.
id
!=
null
)
if
((
this
.
id
==
null
&&
other
.
id
!=
null
)
||
(
this
.
id
!=
null
&&
!
this
.
id
.
equals
(
other
.
id
)))
{
||
(
this
.
id
!=
null
&&
!
this
.
id
.
equals
(
other
.
id
)))
{
return
false
;
return
false
;
}
}
return
true
;
return
true
;
}
}
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
"fi.insomnia.bortal.model.Compo[id="
+
id
+
"]"
;
return
"fi.insomnia.bortal.model.Compo[id="
+
id
+
"]"
;
}
}
@Override
@Override
public
void
setJpaVersionField
(
int
jpaVersionField
)
{
public
void
setJpaVersionField
(
int
jpaVersionField
)
{
this
.
jpaVersionField
=
jpaVersionField
;
this
.
jpaVersionField
=
jpaVersionField
;
}
}
@Override
@Override
public
int
getJpaVersionField
()
{
public
int
getJpaVersionField
()
{
return
jpaVersionField
;
return
jpaVersionField
;
}
}
public
void
setDescription
(
String
description
)
{
public
void
setDescription
(
String
description
)
{
this
.
description
=
description
;
this
.
description
=
description
;
}
}
public
String
getDescription
()
{
public
String
getDescription
()
{
return
description
;
return
description
;
}
}
}
}
code/LanBortalDatabase/src/fi/insomnia/bortal/model/CompoEntryFile.java
View file @
c10849e
...
@@ -26,14 +26,13 @@ import javax.persistence.Version;
...
@@ -26,14 +26,13 @@ import javax.persistence.Version;
@Entity
@Entity
@Table
(
name
=
"entry_files"
)
@Table
(
name
=
"entry_files"
)
@NamedQueries
(
{
@NamedQueries
(
{
@NamedQuery
(
name
=
"CompoEntryFile.findAll"
,
query
=
"SELECT c FROM CompoEntryFile c"
),
@NamedQuery
(
name
=
"CompoEntryFile.findAll"
,
query
=
"SELECT c FROM CompoEntryFile c"
),
@NamedQuery
(
name
=
"CompoEntryFile.findById"
,
query
=
"SELECT c FROM CompoEntryFile c WHERE c.id = :id"
),
@NamedQuery
(
name
=
"CompoEntryFile.findById"
,
query
=
"SELECT c FROM CompoEntryFile c WHERE c.id = :id"
),
@NamedQuery
(
name
=
"CompoEntryFile.findByMimeType"
,
query
=
"SELECT c FROM CompoEntryFile c WHERE c.mimeType = :mimeType"
),
@NamedQuery
(
name
=
"CompoEntryFile.findByMimeType"
,
query
=
"SELECT c FROM CompoEntryFile c WHERE c.mimeType = :mimeType"
),
@NamedQuery
(
name
=
"CompoEntryFile.findByFileName"
,
query
=
"SELECT c FROM CompoEntryFile c WHERE c.fileName = :fileName"
),
@NamedQuery
(
name
=
"CompoEntryFile.findByFileName"
,
query
=
"SELECT c FROM CompoEntryFile c WHERE c.fileName = :fileName"
),
@NamedQuery
(
name
=
"CompoEntryFile.findByDescription"
,
query
=
"SELECT c FROM CompoEntryFile c WHERE c.description = :description"
),
@NamedQuery
(
name
=
"CompoEntryFile.findByDescription"
,
query
=
"SELECT c FROM CompoEntryFile c WHERE c.description = :description"
),
@NamedQuery
(
name
=
"CompoEntryFile.findByHash"
,
query
=
"SELECT c FROM CompoEntryFile c WHERE c.hash = :hash"
),
@NamedQuery
(
name
=
"CompoEntryFile.findByHash"
,
query
=
"SELECT c FROM CompoEntryFile c WHERE c.hash = :hash"
),
@NamedQuery
(
name
=
"CompoEntryFile.findByComment"
,
query
=
"SELECT c FROM CompoEntryFile c WHERE c.comment = :comment"
),
@NamedQuery
(
name
=
"CompoEntryFile.findByUploaded"
,
query
=
"SELECT c FROM CompoEntryFile c WHERE c.uploaded = :uploaded"
)
})
@NamedQuery
(
name
=
"CompoEntryFile.findByUploaded"
,
query
=
"SELECT c FROM CompoEntryFile c WHERE c.uploaded = :uploaded"
)
})
public
class
CompoEntryFile
implements
ModelInterface
{
public
class
CompoEntryFile
implements
ModelInterface
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
@Id
@Id
...
@@ -70,118 +69,118 @@ public class CompoEntryFile implements ModelInterface {
...
@@ -70,118 +69,118 @@ public class CompoEntryFile implements ModelInterface {
@Override
@Override
public
Integer
getId
()
{
public
Integer
getId
()
{
return
id
;
return
id
;
}
}
@Override
@Override
public
void
setId
(
Integer
id
)
{
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
this
.
id
=
id
;
}
}
public
CompoEntryFile
()
{
public
CompoEntryFile
()
{
}
}
public
CompoEntryFile
(
Integer
entryFilesId
)
{
public
CompoEntryFile
(
Integer
entryFilesId
)
{
this
.
id
=
entryFilesId
;
this
.
id
=
entryFilesId
;
}
}
public
CompoEntryFile
(
Integer
entryFilesId
,
Date
uploaded
)
{
public
CompoEntryFile
(
Integer
entryFilesId
,
Date
uploaded
)
{
this
.
id
=
entryFilesId
;
this
.
id
=
entryFilesId
;
this
.
uploaded
=
uploaded
;
this
.
uploaded
=
uploaded
;
}
}
public
String
getMimeType
()
{
public
String
getMimeType
()
{
return
mimeType
;
return
mimeType
;
}
}
public
void
setMimeType
(
String
mimeType
)
{
public
void
setMimeType
(
String
mimeType
)
{
this
.
mimeType
=
mimeType
;
this
.
mimeType
=
mimeType
;
}
}
public
String
getFileName
()
{
public
String
getFileName
()
{
return
fileName
;
return
fileName
;
}
}
public
void
setFileName
(
String
fileName
)
{
public
void
setFileName
(
String
fileName
)
{
this
.
fileName
=
fileName
;
this
.
fileName
=
fileName
;
}
}
public
String
getDescription
()
{
public
String
getDescription
()
{
return
description
;
return
description
;
}
}
public
void
setDescription
(
String
description
)
{
public
void
setDescription
(
String
description
)
{
this
.
description
=
description
;
this
.
description
=
description
;
}
}
public
String
getHash
()
{
public
String
getHash
()
{
return
hash
;
return
hash
;
}
}
public
void
setHash
(
String
hash
)
{
public
void
setHash
(
String
hash
)
{
this
.
hash
=
hash
;
this
.
hash
=
hash
;
}
}
public
byte
[]
getFileData
()
{
public
byte
[]
getFileData
()
{
return
fileData
;
return
fileData
;
}
}
public
void
setFileData
(
byte
[]
fileData
)
{
public
void
setFileData
(
byte
[]
fileData
)
{
this
.
fileData
=
fileData
;
this
.
fileData
=
fileData
;
}
}
public
Date
getUploaded
()
{
public
Date
getUploaded
()
{
return
uploaded
;
return
uploaded
;
}
}
public
void
setUploaded
(
Date
uploaded
)
{
public
void
setUploaded
(
Date
uploaded
)
{
this
.
uploaded
=
uploaded
;
this
.
uploaded
=
uploaded
;
}
}
public
CompoEntry
getEntriesId
()
{
public
CompoEntry
getEntriesId
()
{
return
entry
;
return
entry
;
}
}
public
void
setEntriesId
(
CompoEntry
entriesId
)
{
public
void
setEntriesId
(
CompoEntry
entriesId
)
{
this
.
entry
=
entriesId
;
this
.
entry
=
entriesId
;
}
}
@Override
@Override
public
int
hashCode
()
{
public
int
hashCode
()
{
int
hash
=
0
;
int
hash
=
0
;
hash
+=
(
id
!=
null
?
id
.
hashCode
()
:
0
);
hash
+=
(
id
!=
null
?
id
.
hashCode
()
:
0
);
return
hash
;
return
hash
;
}
}
@Override
@Override
public
boolean
equals
(
Object
object
)
{
public
boolean
equals
(
Object
object
)
{
// TODO: Warning - this method won't work in the case the id fields are
// TODO: Warning - this method won't work in the case the id fields are
// not set
// not set
if
(!(
object
instanceof
CompoEntryFile
))
{
if
(!(
object
instanceof
CompoEntryFile
))
{
return
false
;
return
false
;
}
}
CompoEntryFile
other
=
(
CompoEntryFile
)
object
;
CompoEntryFile
other
=
(
CompoEntryFile
)
object
;
if
((
this
.
id
==
null
&&
other
.
id
!=
null
)
if
((
this
.
id
==
null
&&
other
.
id
!=
null
)
||
(
this
.
id
!=
null
&&
!
this
.
id
.
equals
(
other
.
id
)))
{
||
(
this
.
id
!=
null
&&
!
this
.
id
.
equals
(
other
.
id
)))
{
return
false
;
return
false
;
}
}
return
true
;
return
true
;
}
}
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
"fi.insomnia.bortal.model.CompoEntryFile[entryFilesId="
+
id
return
"fi.insomnia.bortal.model.CompoEntryFile[entryFilesId="
+
id
+
"]"
;
+
"]"
;
}
}
@Override
@Override
public
void
setJpaVersionField
(
int
jpaVersionField
)
{
public
void
setJpaVersionField
(
int
jpaVersionField
)
{
this
.
jpaVersionField
=
jpaVersionField
;
this
.
jpaVersionField
=
jpaVersionField
;
}
}
@Override
@Override
public
int
getJpaVersionField
()
{
public
int
getJpaVersionField
()
{
return
jpaVersionField
;
return
jpaVersionField
;
}
}
}
}
code/LanBortalDatabase/src/fi/insomnia/bortal/model/RoleRight.java
View file @
c10849e
...
@@ -21,11 +21,11 @@ import javax.persistence.Version;
...
@@ -21,11 +21,11 @@ import javax.persistence.Version;
@Entity
@Entity
@Table
(
name
=
"role_rights"
)
@Table
(
name
=
"role_rights"
)
@NamedQueries
(
{
@NamedQueries
(
{
@NamedQuery
(
name
=
"RoleRight.findAll"
,
query
=
"SELECT r FROM RoleRight r"
),
@NamedQuery
(
name
=
"RoleRight.findAll"
,
query
=
"SELECT r FROM RoleRight r"
),
@NamedQuery
(
name
=
"RoleRight.findById"
,
query
=
"SELECT r FROM RoleRight r WHERE r.id = :id"
),
@NamedQuery
(
name
=
"RoleRight.findById"
,
query
=
"SELECT r FROM RoleRight r WHERE r.id = :id"
),
@NamedQuery
(
name
=
"RoleRight.findByRead"
,
query
=
"SELECT r FROM RoleRight r WHERE r.read = :read"
),
@NamedQuery
(
name
=
"RoleRight.findByRead"
,
query
=
"SELECT r FROM RoleRight r WHERE r.read = :read"
),
@NamedQuery
(
name
=
"RoleRight.findByWrite"
,
query
=
"SELECT r FROM RoleRight r WHERE r.write = :write"
),
@NamedQuery
(
name
=
"RoleRight.findByWrite"
,
query
=
"SELECT r FROM RoleRight r WHERE r.write = :write"
),
@NamedQuery
(
name
=
"RoleRight.findByExecute"
,
query
=
"SELECT r FROM RoleRight r WHERE r.execute = :execute"
)
})
@NamedQuery
(
name
=
"RoleRight.findByExecute"
,
query
=
"SELECT r FROM RoleRight r WHERE r.execute = :execute"
)
})
public
class
RoleRight
implements
ModelInterface
{
public
class
RoleRight
implements
ModelInterface
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
...
@@ -33,13 +33,13 @@ public class RoleRight implements ModelInterface {
...
@@ -33,13 +33,13 @@ public class RoleRight implements ModelInterface {
@Column
(
name
=
"role_rights_id"
,
nullable
=
false
)
@Column
(
name
=
"role_rights_id"
,
nullable
=
false
)
private
Integer
id
;
private
Integer
id
;
@Column
(
name
=
"read"
,
nullable
=
false
)
@Column
(
name
=
"read
_permission
"
,
nullable
=
false
)
private
boolean
read
;
private
boolean
read
;
@Column
(
name
=
"write"
,
nullable
=
false
)
@Column
(
name
=
"write
_permission
"
,
nullable
=
false
)
private
boolean
write
;
private
boolean
write
;
@Column
(
name
=
"
write
"
,
nullable
=
false
)
@Column
(
name
=
"
execute_permission
"
,
nullable
=
false
)
private
boolean
execute
;
private
boolean
execute
;
@JoinColumn
(
name
=
"access_rights_id"
,
referencedColumnName
=
"access_rights_id"
)
@JoinColumn
(
name
=
"access_rights_id"
,
referencedColumnName
=
"access_rights_id"
)
...
@@ -58,72 +58,72 @@ public class RoleRight implements ModelInterface {
...
@@ -58,72 +58,72 @@ public class RoleRight implements ModelInterface {
}
}
public
RoleRight
(
Integer
roleRights
)
{
public
RoleRight
(
Integer
roleRights
)
{
this
.
id
=
roleRights
;
this
.
id
=
roleRights
;
}
}
public
RoleRight
(
Integer
roleRights
,
boolean
read
,
boolean
write
)
{
public
RoleRight
(
Integer
roleRights
,
boolean
read
,
boolean
write
)
{
this
.
id
=
roleRights
;
this
.
id
=
roleRights
;
this
.
read
=
read
;
this
.
read
=
read
;
this
.
write
=
write
;
this
.
write
=
write
;
}
}
public
boolean
getRead
()
{
public
boolean
getRead
()
{
return
read
;
return
read
;
}
}
public
void
setRead
(
boolean
read
)
{
public
void
setRead
(
boolean
read
)
{
this
.
read
=
read
;
this
.
read
=
read
;
}
}
public
boolean
getWrite
()
{
public
boolean
getWrite
()
{
return
write
;
return
write
;
}
}
public
void
setWrite
(
boolean
write
)
{
public
void
setWrite
(
boolean
write
)
{
this
.
write
=
write
;
this
.
write
=
write
;
}
}
public
AccessRight
getAccessRight
()
{
public
AccessRight
getAccessRight
()
{
return
accessRight
;
return
accessRight
;
}
}
public
void
setAccessRight
(
AccessRight
accessRightsId
)
{
public
void
setAccessRight
(
AccessRight
accessRightsId
)
{
this
.
accessRight
=
accessRightsId
;
this
.
accessRight
=
accessRightsId
;
}
}
public
Role
getRole
()
{
public
Role
getRole
()
{
return
role
;
return
role
;
}
}
public
void
setRole
(
Role
rolesId
)
{
public
void
setRole
(
Role
rolesId
)
{
this
.
role
=
rolesId
;
this
.
role
=
rolesId
;
}
}
@Override
@Override
public
int
hashCode
()
{
public
int
hashCode
()
{
int
hash
=
0
;
int
hash
=
0
;
hash
+=
(
getId
()
!=
null
?
getId
().
hashCode
()
:
0
);
hash
+=
(
getId
()
!=
null
?
getId
().
hashCode
()
:
0
);
return
hash
;
return
hash
;
}
}
@Override
@Override
public
boolean
equals
(
Object
object
)
{
public
boolean
equals
(
Object
object
)
{
// TODO: Warning - this method won't work in the case the id fields are
// TODO: Warning - this method won't work in the case the id fields are
// not set
// not set
if
(!(
object
instanceof
RoleRight
))
{
if
(!(
object
instanceof
RoleRight
))
{
return
false
;
return
false
;
}
}
RoleRight
other
=
(
RoleRight
)
object
;
RoleRight
other
=
(
RoleRight
)
object
;
if
((
this
.
getId
()
==
null
&&
other
.
getId
()
!=
null
)
if
((
this
.
getId
()
==
null
&&
other
.
getId
()
!=
null
)
||
(
this
.
getId
()
!=
null
&&
!
this
.
id
.
equals
(
other
.
id
)))
{
||
(
this
.
getId
()
!=
null
&&
!
this
.
id
.
equals
(
other
.
id
)))
{
return
false
;
return
false
;
}
}
return
true
;
return
true
;
}
}
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
"fi.insomnia.bortal.model.RoleRight[roleRights="
+
getId
()
+
"]"
;
return
"fi.insomnia.bortal.model.RoleRight[roleRights="
+
getId
()
+
"]"
;
}
}
/**
/**
...
@@ -131,7 +131,7 @@ public class RoleRight implements ModelInterface {
...
@@ -131,7 +131,7 @@ public class RoleRight implements ModelInterface {
*/
*/
@Override
@Override
public
Integer
getId
()
{
public
Integer
getId
()
{
return
id
;
return
id
;
}
}
/**
/**
...
@@ -140,7 +140,7 @@ public class RoleRight implements ModelInterface {
...
@@ -140,7 +140,7 @@ public class RoleRight implements ModelInterface {
*/
*/
@Override
@Override
public
void
setId
(
Integer
id
)
{
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
this
.
id
=
id
;
}
}
/**
/**
...
@@ -148,7 +148,7 @@ public class RoleRight implements ModelInterface {
...
@@ -148,7 +148,7 @@ public class RoleRight implements ModelInterface {
*/
*/
@Override
@Override
public
int
getJpaVersionField
()
{
public
int
getJpaVersionField
()
{
return
jpaVersionField
;
return
jpaVersionField
;
}
}
/**
/**
...
@@ -157,14 +157,14 @@ public class RoleRight implements ModelInterface {
...
@@ -157,14 +157,14 @@ public class RoleRight implements ModelInterface {
*/
*/
@Override
@Override
public
void
setJpaVersionField
(
int
jpaVersionField
)
{
public
void
setJpaVersionField
(
int
jpaVersionField
)
{
this
.
jpaVersionField
=
jpaVersionField
;
this
.
jpaVersionField
=
jpaVersionField
;
}
}
public
void
setExecute
(
boolean
execute
)
{
public
void
setExecute
(
boolean
execute
)
{
this
.
execute
=
execute
;
this
.
execute
=
execute
;
}
}
public
boolean
isExecute
()
{
public
boolean
isExecute
()
{
return
execute
;
return
execute
;
}
}
}
}
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