Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
GGCE
GGCE Server
Commits
e8b1be31
Commit
e8b1be31
authored
Dec 24, 2020
by
Maxym Borodenko
Browse files
Move @Id to the superclass
parent
2a835625
Changes
151
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/gringlobal/model/Accession.java
View file @
e8b1be31
...
...
@@ -53,16 +53,11 @@ import com.fasterxml.jackson.annotation.ObjectIdGenerators;
@Audited
@Document
(
indexName
=
"accession"
)
@BoostedFields
({
"accessionNumber"
,
"accessionNumberPart2"
,
"taxonomySpecies.name"
})
@AttributeOverride
(
name
=
"id"
,
column
=
@Column
(
name
=
"accession_id"
))
@JsonIdentityInfo
(
scope
=
Accession
.
class
,
generator
=
ObjectIdGenerators
.
PropertyGenerator
.
class
,
property
=
"id"
)
public
class
Accession
extends
CooperatorOwnedModel
implements
Copyable
<
Accession
>,
ElasticLoader
,
ElasticTrigger
{
private
static
final
long
serialVersionUID
=
211254440212800409L
;
@Id
@JsonProperty
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
@Column
(
name
=
"accession_id"
)
private
Long
id
;
@ManyToOne
(
fetch
=
FetchType
.
LAZY
,
cascade
=
{})
@JoinColumn
(
name
=
"site_id"
,
nullable
=
false
)
@Field
(
type
=
FieldType
.
Object
)
...
...
@@ -205,7 +200,7 @@ public class Accession extends CooperatorOwnedModel implements Copyable<Accessio
}
public
Accession
(
final
Long
id
)
{
this
.
id
=
id
;
super
.
setId
(
id
)
;
}
public
String
getDoi
()
{
...
...
@@ -216,14 +211,6 @@ public class Accession extends CooperatorOwnedModel implements Copyable<Accessio
this
.
doi
=
doi
;
}
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
final
Long
id
)
{
this
.
id
=
id
;
}
public
Site
getSite
()
{
return
site
;
}
...
...
src/main/java/org/gringlobal/model/AccessionAction.java
View file @
e8b1be31
...
...
@@ -22,7 +22,6 @@ import org.gringlobal.custom.validation.javax.CodeValueField;
import
com.fasterxml.jackson.annotation.JsonIdentityInfo
;
import
com.fasterxml.jackson.annotation.JsonIdentityReference
;
import
com.fasterxml.jackson.annotation.JsonIgnoreProperties
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
com.fasterxml.jackson.annotation.ObjectIdGenerators
;
/**
...
...
@@ -31,16 +30,11 @@ import com.fasterxml.jackson.annotation.ObjectIdGenerators;
*/
@Entity
@Table
(
name
=
"accession_action"
)
@AttributeOverride
(
name
=
"id"
,
column
=
@Column
(
name
=
"accession_action_id"
))
@JsonIdentityInfo
(
scope
=
AccessionAction
.
class
,
generator
=
ObjectIdGenerators
.
PropertyGenerator
.
class
,
property
=
"id"
)
public
class
AccessionAction
extends
AbstractAction
{
private
static
final
long
serialVersionUID
=
-
2186120400909228200L
;
@Id
@JsonProperty
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
@Column
(
name
=
"accession_action_id"
)
private
Long
id
;
@ManyToOne
(
fetch
=
FetchType
.
LAZY
,
cascade
=
{})
@JoinColumn
(
name
=
"accession_id"
,
nullable
=
false
)
@JsonIdentityReference
...
...
@@ -65,15 +59,7 @@ public class AccessionAction extends AbstractAction {
}
public
AccessionAction
(
final
Long
id
)
{
this
.
id
=
id
;
}
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
final
Long
id
)
{
this
.
id
=
id
;
super
.
setId
(
id
);
}
@Override
...
...
src/main/java/org/gringlobal/model/AccessionInvAnnotation.java
View file @
e8b1be31
...
...
@@ -20,7 +20,6 @@ import java.util.Date;
import
javax.persistence.*
;
import
com.fasterxml.jackson.annotation.JsonIdentityInfo
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
com.fasterxml.jackson.annotation.ObjectIdGenerators
;
/**
...
...
@@ -29,6 +28,7 @@ import com.fasterxml.jackson.annotation.ObjectIdGenerators;
*/
@Entity
@Table
(
name
=
"accession_inv_annotation"
)
@AttributeOverride
(
name
=
"id"
,
column
=
@Column
(
name
=
"accession_inv_annotation_id"
))
@JsonIdentityInfo
(
scope
=
AccessionInvAnnotation
.
class
,
generator
=
ObjectIdGenerators
.
PropertyGenerator
.
class
,
property
=
"id"
)
public
class
AccessionInvAnnotation
extends
CooperatorOwnedModel
{
private
static
final
long
serialVersionUID
=
-
6014614042117798126L
;
...
...
@@ -49,12 +49,6 @@ public class AccessionInvAnnotation extends CooperatorOwnedModel {
@Column
(
name
=
"annotation_type_code"
,
nullable
=
false
,
length
=
20
)
private
String
annotationTypeCode
;
@Id
@JsonProperty
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
@Column
(
name
=
"accession_inv_annotation_id"
)
private
Long
id
;
@ManyToOne
(
fetch
=
FetchType
.
LAZY
,
cascade
=
{})
@JoinColumn
(
name
=
"inventory_id"
,
nullable
=
false
)
private
Inventory
inventory
;
...
...
@@ -80,7 +74,7 @@ public class AccessionInvAnnotation extends CooperatorOwnedModel {
}
public
AccessionInvAnnotation
(
final
Long
id
)
{
this
.
id
=
id
;
super
.
setId
(
id
)
;
}
public
Cooperator
getAnnotationCooperator
()
{
...
...
@@ -115,14 +109,6 @@ public class AccessionInvAnnotation extends CooperatorOwnedModel {
this
.
annotationTypeCode
=
annotationTypeCode
;
}
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
final
Long
id
)
{
this
.
id
=
id
;
}
public
Inventory
getInventory
()
{
return
inventory
;
}
...
...
src/main/java/org/gringlobal/model/AccessionInvAttach.java
View file @
e8b1be31
...
...
@@ -25,7 +25,6 @@ import org.genesys.blocks.model.Copyable;
import
org.gringlobal.component.elastic.ElasticTrigger
;
import
com.fasterxml.jackson.annotation.JsonIdentityInfo
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
com.fasterxml.jackson.annotation.ObjectIdGenerators
;
import
org.gringlobal.custom.validation.javax.CodeValueField
;
import
org.gringlobal.model.community.CommunityCodeValues
;
...
...
@@ -36,16 +35,11 @@ import org.gringlobal.model.community.CommunityCodeValues;
*/
@Entity
@Table
(
name
=
"accession_inv_attach"
)
@AttributeOverride
(
name
=
"id"
,
column
=
@Column
(
name
=
"accession_inv_attach_id"
))
@JsonIdentityInfo
(
scope
=
AccessionInvAttach
.
class
,
generator
=
ObjectIdGenerators
.
PropertyGenerator
.
class
,
property
=
"id"
)
public
class
AccessionInvAttach
extends
CooperatorAttachment
implements
Copyable
<
AccessionInvAttach
>,
ElasticTrigger
{
private
static
final
long
serialVersionUID
=
25655125262695988L
;
@Id
@JsonProperty
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
@Column
(
name
=
"accession_inv_attach_id"
)
private
Long
id
;
@ManyToOne
(
fetch
=
FetchType
.
LAZY
,
cascade
=
{})
@JoinColumn
(
name
=
"attach_cooperator_id"
)
private
Cooperator
attachCooperator
;
...
...
@@ -89,15 +83,7 @@ public class AccessionInvAttach extends CooperatorAttachment implements Copyable
}
public
AccessionInvAttach
(
final
Long
id
)
{
this
.
id
=
id
;
}
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
final
Long
id
)
{
this
.
id
=
id
;
super
.
setId
(
id
);
}
public
Cooperator
getAttachCooperator
()
{
...
...
src/main/java/org/gringlobal/model/AccessionInvGroup.java
View file @
e8b1be31
...
...
@@ -24,7 +24,6 @@ import org.gringlobal.custom.validation.javax.OneLine;
import
com.fasterxml.jackson.annotation.JsonIdentityInfo
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
com.fasterxml.jackson.annotation.ObjectIdGenerators
;
/**
...
...
@@ -33,16 +32,11 @@ import com.fasterxml.jackson.annotation.ObjectIdGenerators;
*/
@Entity
@Table
(
name
=
"accession_inv_group"
)
@AttributeOverride
(
name
=
"id"
,
column
=
@Column
(
name
=
"accession_inv_group_id"
))
@JsonIdentityInfo
(
scope
=
AccessionInvGroup
.
class
,
generator
=
ObjectIdGenerators
.
PropertyGenerator
.
class
,
property
=
"id"
)
public
class
AccessionInvGroup
extends
CooperatorOwnedModel
implements
Copyable
<
AccessionInvGroup
>
{
private
static
final
long
serialVersionUID
=
-
6335768202236939274L
;
@Id
@JsonProperty
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
@Column
(
name
=
"accession_inv_group_id"
)
private
Long
id
;
@Basic
@Column
(
name
=
"group_name"
,
nullable
=
false
,
length
=
100
)
@OneLine
...
...
@@ -70,7 +64,7 @@ public class AccessionInvGroup extends CooperatorOwnedModel implements Copyable<
}
public
AccessionInvGroup
(
final
Long
id
)
{
this
.
id
=
id
;
super
.
setId
(
id
)
;
}
public
String
getGroupName
()
{
...
...
@@ -81,14 +75,6 @@ public class AccessionInvGroup extends CooperatorOwnedModel implements Copyable<
this
.
groupName
=
groupName
;
}
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
final
Long
id
)
{
this
.
id
=
id
;
}
public
String
getIsWebVisible
()
{
return
isWebVisible
;
}
...
...
src/main/java/org/gringlobal/model/AccessionInvGroupAttach.java
View file @
e8b1be31
...
...
@@ -20,7 +20,6 @@ import java.util.Date;
import
javax.persistence.*
;
import
com.fasterxml.jackson.annotation.JsonIdentityInfo
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
com.fasterxml.jackson.annotation.ObjectIdGenerators
;
import
org.gringlobal.custom.validation.javax.CodeValueField
;
import
org.gringlobal.model.community.CommunityCodeValues
;
...
...
@@ -31,16 +30,11 @@ import org.gringlobal.model.community.CommunityCodeValues;
*/
@Entity
@Table
(
name
=
"accession_inv_group_attach"
)
@AttributeOverride
(
name
=
"id"
,
column
=
@Column
(
name
=
"accession_inv_group_attach_id"
))
@JsonIdentityInfo
(
scope
=
AccessionInvGroupAttach
.
class
,
generator
=
ObjectIdGenerators
.
PropertyGenerator
.
class
,
property
=
"id"
)
public
class
AccessionInvGroupAttach
extends
CooperatorAttachment
{
private
static
final
long
serialVersionUID
=
-
6996520966936099199L
;
@Id
@JsonProperty
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
@Column
(
name
=
"accession_inv_group_attach_id"
)
private
Long
id
;
@ManyToOne
(
fetch
=
FetchType
.
LAZY
,
cascade
=
{})
@JoinColumn
(
name
=
"accession_inv_group_id"
,
nullable
=
false
)
private
AccessionInvGroup
accessionInvGroup
;
...
...
@@ -74,15 +68,7 @@ public class AccessionInvGroupAttach extends CooperatorAttachment {
}
public
AccessionInvGroupAttach
(
final
Long
id
)
{
this
.
id
=
id
;
}
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
final
Long
id
)
{
this
.
id
=
id
;
super
.
setId
(
id
);
}
public
AccessionInvGroup
getAccessionInvGroup
()
{
...
...
src/main/java/org/gringlobal/model/AccessionInvGroupMap.java
View file @
e8b1be31
...
...
@@ -21,7 +21,6 @@ import org.gringlobal.component.elastic.ElasticTrigger;
import
com.fasterxml.jackson.annotation.JsonIdentityInfo
;
import
com.fasterxml.jackson.annotation.JsonIdentityReference
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
com.fasterxml.jackson.annotation.ObjectIdGenerators
;
/**
...
...
@@ -30,16 +29,11 @@ import com.fasterxml.jackson.annotation.ObjectIdGenerators;
*/
@Entity
@Table
(
name
=
"accession_inv_group_map"
)
@AttributeOverride
(
name
=
"id"
,
column
=
@Column
(
name
=
"accession_inv_group_map_id"
))
@JsonIdentityInfo
(
scope
=
AccessionInvGroupMap
.
class
,
generator
=
ObjectIdGenerators
.
PropertyGenerator
.
class
,
property
=
"id"
)
public
class
AccessionInvGroupMap
extends
CooperatorOwnedModel
implements
ElasticTrigger
{
private
static
final
long
serialVersionUID
=
7093098654960278824L
;
@Id
@JsonProperty
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
@Column
(
name
=
"accession_inv_group_map_id"
)
private
Long
id
;
@ManyToOne
(
fetch
=
FetchType
.
LAZY
,
cascade
=
{})
@JoinColumn
(
name
=
"accession_inv_group_id"
,
nullable
=
false
)
@JsonIdentityInfo
(
scope
=
AccessionInvGroup
.
class
,
generator
=
ObjectIdGenerators
.
PropertyGenerator
.
class
,
property
=
"id"
)
...
...
@@ -59,7 +53,7 @@ public class AccessionInvGroupMap extends CooperatorOwnedModel implements Elasti
}
public
AccessionInvGroupMap
(
final
Long
id
)
{
this
.
id
=
id
;
super
.
setId
(
id
)
;
}
public
AccessionInvGroup
getAccessionInvGroup
()
{
...
...
@@ -70,14 +64,6 @@ public class AccessionInvGroupMap extends CooperatorOwnedModel implements Elasti
this
.
accessionInvGroup
=
accessionInvGroup
;
}
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
final
Long
id
)
{
this
.
id
=
id
;
}
public
Inventory
getInventory
()
{
return
inventory
;
}
...
...
src/main/java/org/gringlobal/model/AccessionInvName.java
View file @
e8b1be31
...
...
@@ -23,7 +23,6 @@ import org.gringlobal.custom.elasticsearch.SearchField;
import
org.gringlobal.custom.validation.javax.CodeValueField
;
import
com.fasterxml.jackson.annotation.JsonIdentityInfo
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
com.fasterxml.jackson.annotation.ObjectIdGenerators
;
/**
...
...
@@ -32,16 +31,11 @@ import com.fasterxml.jackson.annotation.ObjectIdGenerators;
*/
@Entity
@Table
(
name
=
"accession_inv_name"
)
@AttributeOverride
(
name
=
"id"
,
column
=
@Column
(
name
=
"accession_inv_name_id"
))
@JsonIdentityInfo
(
scope
=
AccessionInvName
.
class
,
generator
=
ObjectIdGenerators
.
PropertyGenerator
.
class
,
property
=
"id"
)
public
class
AccessionInvName
extends
CooperatorOwnedModel
implements
ElasticTrigger
,
Copyable
<
AccessionInvName
>
{
private
static
final
long
serialVersionUID
=
-
9211009353320175300L
;
@Id
@JsonProperty
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
@Column
(
name
=
"accession_inv_name_id"
)
private
Long
id
;
@ManyToOne
(
fetch
=
FetchType
.
LAZY
,
cascade
=
{})
@JoinColumn
(
name
=
"inventory_id"
,
nullable
=
false
)
private
Inventory
inventory
;
...
...
@@ -81,15 +75,7 @@ public class AccessionInvName extends CooperatorOwnedModel implements ElasticTri
}
public
AccessionInvName
(
final
Long
id
)
{
this
.
id
=
id
;
}
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
final
Long
id
)
{
this
.
id
=
id
;
super
.
setId
(
id
);
}
public
String
getCategoryCode
()
{
...
...
src/main/java/org/gringlobal/model/AccessionInvVoucher.java
View file @
e8b1be31
...
...
@@ -20,7 +20,6 @@ import java.util.Date;
import
javax.persistence.*
;
import
com.fasterxml.jackson.annotation.JsonIdentityInfo
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
com.fasterxml.jackson.annotation.ObjectIdGenerators
;
/**
...
...
@@ -29,6 +28,7 @@ import com.fasterxml.jackson.annotation.ObjectIdGenerators;
*/
@Entity
@Table
(
name
=
"accession_inv_voucher"
)
@AttributeOverride
(
name
=
"id"
,
column
=
@Column
(
name
=
"accession_inv_voucher_id"
))
@JsonIdentityInfo
(
scope
=
AccessionInvVoucher
.
class
,
generator
=
ObjectIdGenerators
.
PropertyGenerator
.
class
,
property
=
"id"
)
public
class
AccessionInvVoucher
extends
CooperatorOwnedModel
{
private
static
final
long
serialVersionUID
=
1072300631428611317L
;
...
...
@@ -41,12 +41,6 @@ public class AccessionInvVoucher extends CooperatorOwnedModel {
@Column
(
name
=
"collector_voucher_number"
,
length
=
40
)
private
String
collectorVoucherNumber
;
@Id
@JsonProperty
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
@Column
(
name
=
"accession_inv_voucher_id"
)
private
Long
id
;
@ManyToOne
(
fetch
=
FetchType
.
LAZY
,
cascade
=
{})
@JoinColumn
(
name
=
"inventory_id"
,
nullable
=
false
)
private
Inventory
inventory
;
...
...
@@ -72,7 +66,7 @@ public class AccessionInvVoucher extends CooperatorOwnedModel {
}
public
AccessionInvVoucher
(
final
Long
id
)
{
this
.
id
=
id
;
super
.
setId
(
id
)
;
}
public
Cooperator
getCollectorCooperator
()
{
...
...
@@ -91,14 +85,6 @@ public class AccessionInvVoucher extends CooperatorOwnedModel {
this
.
collectorVoucherNumber
=
collectorVoucherNumber
;
}
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
final
Long
id
)
{
this
.
id
=
id
;
}
public
Inventory
getInventory
()
{
return
inventory
;
}
...
...
src/main/java/org/gringlobal/model/AccessionIpr.java
View file @
e8b1be31
...
...
@@ -22,7 +22,6 @@ import javax.persistence.*;
import
org.gringlobal.custom.validation.javax.CodeValueField
;
import
com.fasterxml.jackson.annotation.JsonIdentityInfo
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
com.fasterxml.jackson.annotation.ObjectIdGenerators
;
/**
...
...
@@ -31,6 +30,7 @@ import com.fasterxml.jackson.annotation.ObjectIdGenerators;
*/
@Entity
@Table
(
name
=
"accession_ipr"
)
@AttributeOverride
(
name
=
"id"
,
column
=
@Column
(
name
=
"accession_ipr_id"
))
@JsonIdentityInfo
(
scope
=
AccessionIpr
.
class
,
generator
=
ObjectIdGenerators
.
PropertyGenerator
.
class
,
property
=
"id"
)
public
class
AccessionIpr
extends
CooperatorOwnedModel
{
private
static
final
long
serialVersionUID
=
-
5129520582452663747L
;
...
...
@@ -55,12 +55,6 @@ public class AccessionIpr extends CooperatorOwnedModel {
@Column
(
name
=
"expired_date"
)
private
Date
expiredDate
;
@Id
@JsonProperty
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
@Column
(
name
=
"accession_ipr_id"
)
private
Long
id
;
@Basic
@Column
(
name
=
"ipr_crop_name"
,
length
=
100
)
private
String
iprCropName
;
...
...
@@ -91,7 +85,7 @@ public class AccessionIpr extends CooperatorOwnedModel {
}
public
AccessionIpr
(
final
Long
id
)
{
this
.
id
=
id
;
super
.
setId
(
id
)
;
}
public
Date
getAcceptedDate
()
{
...
...
@@ -134,14 +128,6 @@ public class AccessionIpr extends CooperatorOwnedModel {
this
.
expiredDate
=
expiredDate
;
}
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
final
Long
id
)
{
this
.
id
=
id
;
}
public
String
getIprCropName
()
{
return
iprCropName
;
}
...
...
src/main/java/org/gringlobal/model/AccessionPedigree.java
View file @
e8b1be31
...
...
@@ -20,7 +20,6 @@ import java.util.Date;
import
javax.persistence.*
;
import
com.fasterxml.jackson.annotation.JsonIdentityInfo
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
com.fasterxml.jackson.annotation.ObjectIdGenerators
;
/**
...
...
@@ -29,6 +28,7 @@ import com.fasterxml.jackson.annotation.ObjectIdGenerators;
*/
@Entity
@Table
(
name
=
"accession_pedigree"
)
@AttributeOverride
(
name
=
"id"
,
column
=
@Column
(
name
=
"accession_pedigree_id"
))
@JsonIdentityInfo
(
scope
=
AccessionPedigree
.
class
,
generator
=
ObjectIdGenerators
.
PropertyGenerator
.
class
,
property
=
"id"
)
public
class
AccessionPedigree
extends
CooperatorOwnedModel
{
private
static
final
long
serialVersionUID
=
4941383345050223740L
;
...
...
@@ -54,12 +54,6 @@ public class AccessionPedigree extends CooperatorOwnedModel {
@Column
(
name
=
"female_external_accession"
,
length
=
50
)
private
String
femaleExternalAccession
;
@Id
@JsonProperty
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
@Column
(
name
=
"accession_pedigree_id"
)
private
Long
id
;
@ManyToOne
(
fetch
=
FetchType
.
LAZY
,
cascade
=
{})
@JoinColumn
(
name
=
"male_accession_id"
)
private
Accession
maleAccession
;
...
...
@@ -80,7 +74,7 @@ public class AccessionPedigree extends CooperatorOwnedModel {
}
public
AccessionPedigree
(
final
Long
id
)
{
this
.
id
=
id
;
super
.
setId
(
id
)
;
}
public
Accession
getAccession
()
{
...
...
@@ -123,14 +117,6 @@ public class AccessionPedigree extends CooperatorOwnedModel {
this
.
femaleExternalAccession
=
femaleExternalAccession
;
}
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
final
Long
id
)
{
this
.
id
=
id
;
}
public
Accession
getMaleAccession
()
{
return
maleAccession
;
}
...
...
src/main/java/org/gringlobal/model/AccessionQuarantine.java
View file @
e8b1be31
...
...
@@ -20,7 +20,6 @@ import java.util.Date;
import
javax.persistence.*
;
import
com.fasterxml.jackson.annotation.JsonIdentityInfo
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
com.fasterxml.jackson.annotation.ObjectIdGenerators
;
/**
...
...
@@ -29,6 +28,7 @@ import com.fasterxml.jackson.annotation.ObjectIdGenerators;
*/
@Entity
@Table
(
name
=
"accession_quarantine"
)
@AttributeOverride
(
name
=
"id"
,
column
=
@Column
(
name
=
"accession_quarantine_id"
))
@JsonIdentityInfo
(
scope
=
AccessionQuarantine
.
class
,
generator
=
ObjectIdGenerators
.
PropertyGenerator
.
class
,
property
=
"id"
)
public
class
AccessionQuarantine
extends
CooperatorOwnedModel
{
private
static
final
long
serialVersionUID
=
-
2733286327623566924L
;
...
...
@@ -53,12 +53,6 @@ public class AccessionQuarantine extends CooperatorOwnedModel {
@Column
(
name
=
"expected_release_date"
)
private
Date
expectedReleaseDate
;
@Id
@JsonProperty
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
@Column
(
name
=
"accession_quarantine_id"
)
private
Long
id
;
@Basic
@Column
@Lob
...
...
@@ -80,7 +74,7 @@ public class AccessionQuarantine extends CooperatorOwnedModel {
}
public
AccessionQuarantine
(
final
Long
id
)
{
this
.
id
=
id
;
super
.
setId
(
id
)
;
}
public
Accession
getAccession
()
{
...
...
@@ -123,14 +117,6 @@ public class AccessionQuarantine extends CooperatorOwnedModel {
this
.
expectedReleaseDate
=
expectedReleaseDate
;
}
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
final
Long
id
)
{
this
.
id
=
id
;
}
public
String
getNote
()
{
return
note
;
}
...
...
src/main/java/org/gringlobal/model/AccessionSource.java
View file @
e8b1be31
...
...
@@ -26,7 +26,6 @@ import org.gringlobal.model.community.CommunityCodeValues;
import
com.fasterxml.jackson.annotation.JsonIdentityInfo
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
com.fasterxml.jackson.annotation.ObjectIdGenerators
;
/**
...
...
@@ -35,16 +34,11 @@ import com.fasterxml.jackson.annotation.ObjectIdGenerators;
*/
@Entity
@Table
(
name
=
"accession_source"
)
@AttributeOverride
(
name
=
"id"
,
column
=
@Column
(
name
=
"accession_source_id"
))
@JsonIdentityInfo
(
scope
=
AccessionSource
.
class
,
generator
=
ObjectIdGenerators
.
PropertyGenerator
.
class
,
property
=
"id"
)
public
class
AccessionSource
extends
CooperatorOwnedModel
implements
Copyable
<
AccessionSource
>
{
private
static
final
long
serialVersionUID
=
8820879032034410951L
;
@Id
@JsonProperty
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
@Column
(
name
=
"accession_source_id"
)
private
Long
id
;
@ManyToOne
(
fetch
=
FetchType
.
LAZY
,
cascade
=
{},
optional
=
false
)
@JoinColumn
(
name
=
"accession_id"
,
nullable
=
false
)
private
Accession
accession
;
...
...
@@ -163,15 +157,7 @@ public class AccessionSource extends CooperatorOwnedModel implements Copyable<Ac
}
public
AccessionSource
(
final
Long
id
)
{
this
.
id
=
id
;
}
public
Long
getId
()
{
return
id
;
}