Skip to content

Commit 44f5c69

Browse files
committed
Add all missing javadocs, a user can only be instatiated with a name, set version to 1.0
1 parent 798d5cf commit 44f5c69

File tree

9 files changed

+297
-30
lines changed

9 files changed

+297
-30
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<groupId>org.influxdb</groupId>
66
<artifactId>influxdb-java</artifactId>
77
<packaging>jar</packaging>
8-
<version>0.9-SNAPSHOT</version>
8+
<version>1.0</version>
99
<name>influxdb java bindings</name>
1010
<description>Java API to access the InfluxDB REST API</description>
1111
<url>http://www.influxdb.org</url>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,43 @@
11
package org.influxdb.dto;
22

3+
/**
4+
* Representation of a InfluxDB continous_query.
5+
*
6+
* @author stefan.majer [at] gmail.com
7+
*
8+
*/
39
public class ContinuousQuery {
410
private int id;
511
private String query;
612

13+
/**
14+
* @return the id
15+
*/
716
public int getId() {
817
return this.id;
918
}
1019

20+
/**
21+
* @param id
22+
* the id to set
23+
*/
1124
public void setId(final int id) {
1225
this.id = id;
1326
}
1427

28+
/**
29+
* @return the query
30+
*/
1531
public String getQuery() {
1632
return this.query;
1733
}
1834

35+
/**
36+
* @param query
37+
* the query to set
38+
*/
1939
public void setQuery(final String query) {
2040
this.query = query;
2141
}
42+
2243
}
Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,53 @@
11
package org.influxdb.dto;
22

3-
public class Database {
3+
/**
4+
* Representation of a influxdb database.
5+
*
6+
* @author stefan.majer [at] gmail.com
7+
*
8+
*/
9+
public class Database {
410
private final String name;
511
private final int replicationFactor;
612

13+
/**
14+
* @param name
15+
* the name of the database.
16+
* @param replicationFactor
17+
* the replicationfactor for the metrics data stored in this database. Must be >= 1.
18+
*/
719
public Database(final String name, final int replicationFactor) {
820
super();
921
this.name = name;
1022
this.replicationFactor = replicationFactor;
1123
}
1224

25+
/**
26+
* @return the name
27+
*/
1328
public String getName() {
1429
return this.name;
1530
}
1631

32+
/**
33+
* @return the replicationFactor
34+
*/
1735
public int getReplicationFactor() {
1836
return this.replicationFactor;
1937
}
2038

39+
/**
40+
* {@inheritDoc}
41+
*/
42+
@Override
43+
public String toString() {
44+
StringBuilder builder = new StringBuilder();
45+
builder.append("Database [name=");
46+
builder.append(this.name);
47+
builder.append(", replicationFactor=");
48+
builder.append(this.replicationFactor);
49+
builder.append("]");
50+
return builder.toString();
51+
}
52+
2153
}

src/main/java/org/influxdb/dto/Pong.java

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,26 @@
11
package org.influxdb.dto;
22

3+
/**
4+
* Representation of the response for a influxdb ping.
5+
*
6+
* @author stefan.majer [at] gmail.com
7+
*
8+
*/
39
public class Pong {
410
private String status;
511
private long responseTime;
612

13+
/**
14+
* @return the status
15+
*/
716
public String getStatus() {
817
return this.status;
918
}
1019

20+
/**
21+
* @param status
22+
* the status to set
23+
*/
1124
public void setStatus(final String status) {
1225
this.status = status;
1326
}
@@ -26,4 +39,19 @@ public long getResponseTime() {
2639
public void setResponseTime(final long responseTime) {
2740
this.responseTime = responseTime;
2841
}
42+
43+
/**
44+
* {@inheritDoc}
45+
*/
46+
@Override
47+
public String toString() {
48+
StringBuilder builder = new StringBuilder();
49+
builder.append("Pong [status=");
50+
builder.append(this.status);
51+
builder.append(", responseTime=");
52+
builder.append(this.responseTime);
53+
builder.append("]");
54+
return builder.toString();
55+
}
56+
2957
}

src/main/java/org/influxdb/dto/ScheduledDelete.java

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
package org.influxdb.dto;
22

3+
/**
4+
* Representation of a InfluxDB scheduled_delete.
5+
*
6+
* @author stefan.majer [at] gmail.com
7+
*
8+
*/
39
public class ScheduledDelete {
410
private int id;
511
private String regex;
@@ -65,4 +71,23 @@ public String getRunAt() {
6571
public void setRunAt(final String runAt) {
6672
this.runAt = runAt;
6773
}
74+
75+
/**
76+
* {@inheritDoc}
77+
*/
78+
@Override
79+
public String toString() {
80+
StringBuilder builder = new StringBuilder();
81+
builder.append("ScheduledDelete [id=");
82+
builder.append(this.id);
83+
builder.append(", regex=");
84+
builder.append(this.regex);
85+
builder.append(", olderThan=");
86+
builder.append(this.olderThan);
87+
builder.append(", runAt=");
88+
builder.append(this.runAt);
89+
builder.append("]");
90+
return builder.toString();
91+
}
92+
6893
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,77 @@
11
package org.influxdb.dto;
22

3+
import java.util.Arrays;
4+
5+
/**
6+
* Representation of a InfluxDB database serie.
7+
*
8+
* @author stefan.majer [at] gmail.com
9+
*
10+
*/
311
public class Serie {
412
private final String name;
513
private String[] columns;
614
private Object[][] points;
715

16+
/**
17+
* @param name
18+
* the name of the serie.
19+
*/
820
public Serie(final String name) {
921
this.name = name;
1022
}
1123

24+
/**
25+
* @return the name
26+
*/
1227
public String getName() {
1328
return this.name;
1429
}
1530

31+
/**
32+
* @return the columns
33+
*/
1634
public String[] getColumns() {
1735
return this.columns;
1836
}
1937

38+
/**
39+
* @param columns
40+
* the columns to set
41+
*/
2042
public void setColumns(final String[] columns) {
2143
this.columns = columns;
2244
}
2345

46+
/**
47+
* @return the points
48+
*/
2449
public Object[][] getPoints() {
2550
return this.points;
2651
}
2752

53+
/**
54+
* @param points
55+
* the points to set
56+
*/
2857
public void setPoints(final Object[][] points) {
2958
this.points = points;
3059
}
3160

61+
/**
62+
* {@inheritDoc}
63+
*/
64+
@Override
65+
public String toString() {
66+
StringBuilder builder = new StringBuilder();
67+
builder.append("Serie [name=");
68+
builder.append(this.name);
69+
builder.append(", columns=");
70+
builder.append(Arrays.toString(this.columns));
71+
builder.append(", points=");
72+
builder.append(Arrays.toString(this.points));
73+
builder.append("]");
74+
return builder.toString();
75+
}
76+
3277
}

0 commit comments

Comments
 (0)