Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Simonstrator
PeerfactSim.KOM
Commits
7ac772c9
Commit
7ac772c9
authored
Jul 03, 2015
by
Björn Richerzhagen
Browse files
Merge branch 'master' into 'releases/v2-3'
Master Added index annotations, thanks to
@rueckert
See merge request !12
parents
f1cf5ffb
de42d187
Changes
7
Hide whitespace changes
Inline
Side-by-side
src/de/tud/kom/p2psim/impl/util/db/metric/Experiment.java
View file @
7ac772c9
...
...
@@ -8,6 +8,7 @@ import javax.persistence.GeneratedValue;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
org.hibernate.annotations.Index
;
import
org.hibernate.annotations.Type
;
/** Database representation of an experiment, that is, a simulator run.
...
...
@@ -31,6 +32,7 @@ public class Experiment {
*/
@Id
@GeneratedValue
@Index
(
name
=
"id"
)
private
int
id
;
/**
...
...
src/de/tud/kom/p2psim/impl/util/db/metric/HostMetric.java
View file @
7ac772c9
...
...
@@ -7,6 +7,8 @@ import javax.persistence.JoinColumn;
import
javax.persistence.ManyToOne
;
import
javax.persistence.Table
;
import
org.hibernate.annotations.Index
;
@Entity
@Table
(
name
=
"hostmetrics"
)
/** Database mapping between metrics and hosts.
...
...
@@ -21,12 +23,14 @@ public class HostMetric {
@SuppressWarnings
(
"unused"
)
@Id
@GeneratedValue
@Index
(
name
=
"id"
)
private
int
id
;
private
long
hostId
;
@ManyToOne
@JoinColumn
(
name
=
"metricId"
)
@Index
(
name
=
"metricId"
)
private
Metric
metric
;
protected
HostMetric
()
{
...
...
src/de/tud/kom/p2psim/impl/util/db/metric/Measurement.java
View file @
7ac772c9
...
...
@@ -9,6 +9,8 @@ import javax.persistence.JoinColumn;
import
javax.persistence.ManyToOne
;
import
javax.persistence.Table
;
import
org.hibernate.annotations.Index
;
/** Statistical representation of a series of measurements in the database.
*
* This class is a POJO that maps to a table in a database. Instances
...
...
@@ -26,6 +28,7 @@ public class Measurement implements HostMetricBound {
@SuppressWarnings
(
"unused"
)
@Id
@GeneratedValue
@Index
(
name
=
"id"
)
private
int
id
;
/**
...
...
src/de/tud/kom/p2psim/impl/util/db/metric/MeasurementPair.java
View file @
7ac772c9
...
...
@@ -8,6 +8,7 @@ import javax.persistence.JoinColumn;
import
javax.persistence.ManyToOne
;
import
javax.persistence.Table
;
import
org.hibernate.annotations.Index
;
import
org.hibernate.annotations.OnDelete
;
import
org.hibernate.annotations.OnDeleteAction
;
...
...
@@ -30,6 +31,7 @@ public class MeasurementPair {
@SuppressWarnings
(
"unused"
)
@Id
@GeneratedValue
()
@Index
(
name
=
"id"
)
private
int
id
;
/**
...
...
src/de/tud/kom/p2psim/impl/util/db/metric/MeasurementPairList.java
View file @
7ac772c9
...
...
@@ -8,6 +8,7 @@ import javax.persistence.JoinColumn;
import
javax.persistence.ManyToOne
;
import
javax.persistence.Table
;
import
org.hibernate.annotations.Index
;
import
org.hibernate.annotations.OnDelete
;
import
org.hibernate.annotations.OnDeleteAction
;
...
...
@@ -24,6 +25,7 @@ public class MeasurementPairList {
*/
@Id
@GeneratedValue
()
@Index
(
name
=
"id"
)
private
int
id
;
/**
...
...
src/de/tud/kom/p2psim/impl/util/db/metric/MeasurementSingle.java
View file @
7ac772c9
...
...
@@ -8,6 +8,8 @@ import javax.persistence.JoinColumn;
import
javax.persistence.ManyToOne
;
import
javax.persistence.Table
;
import
org.hibernate.annotations.Index
;
/** Statistical representation of a series of measurements in the database.
*
* This class is a POJO that maps to a table in a database. Instances
...
...
@@ -51,6 +53,7 @@ public class MeasurementSingle {
@SuppressWarnings
(
"unused"
)
@ManyToOne
@JoinColumn
(
name
=
"hostMetricId"
)
@Index
(
name
=
"hostMetricId"
)
private
HostMetric
hostMetric
;
/**
...
...
src/de/tud/kom/p2psim/impl/util/db/metric/Metric.java
View file @
7ac772c9
...
...
@@ -8,6 +8,8 @@ import javax.persistence.JoinColumn;
import
javax.persistence.ManyToOne
;
import
javax.persistence.Table
;
import
org.hibernate.annotations.Index
;
/** Database representation of a metric.
*
* It is nearly an exact equivalent of {@link MetricDescription} but
...
...
@@ -29,6 +31,7 @@ public class Metric {
@SuppressWarnings
(
"unused"
)
@Id
@GeneratedValue
@Index
(
name
=
"id"
)
private
int
id
;
/**
...
...
@@ -65,6 +68,7 @@ public class Metric {
*/
@ManyToOne
@JoinColumn
(
name
=
"experimentId"
)
@Index
(
name
=
"experimentId"
)
private
Experiment
experiment
;
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
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 comment