Package com.influxdb.v3.client
Class PointValues
java.lang.Object
com.influxdb.v3.client.PointValues
PointValues defines the values that will be written to the database.
 See Go Implementation.
- Author:
- Jakub Bednar (bednar@github) (11/10/2018 11:40)
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionasPoint()Creates new Point with this as values.Creates new Point with this as values with given measurement.copy()Creates a copy of this object.getBooleanField(String name) Gets the boolean field value associated with the specified name.Get field of given name.<T> TGet field of given name as type.String[]Gets an array of field names.Class<?>getFieldType(String name) Gets the type of field with given name, if it exists.getFloatField(String name) Gets the float field value associated with the specified name.getIntegerField(String name) Gets the integer field value associated with the specified name.Get measurement name.getStringField(String name) Gets the string field value associated with the specified name.Gets value of tag with given name.String[]Gets an array of tag names.Get timestamp in nanoseconds.booleanHas point any fields?static PointValuesmeasurement(String measurementName) Create a new PointValues withe specified a measurement name.removeField(String name) Removes a field with the specified name if it exists; otherwise, it does nothing.Removes a tag with the specified name if it exists; otherwise, it does nothing.setBooleanField(String name, boolean value) Adds or replaces a boolean field.AddBooleanfield.AddDoublefield.AddLongfield.AddNumberfield.AddObjectfield.AddStringfield.Adds or replaces fields for this point.setFloatField(String name, double value) Adds or replaces a float field.setIntegerField(String name, long value) Adds or replaces a integer field.setMeasurement(String measurement) Updates the measurement for the point.setStringField(String name, String value) Adds or replaces a string field.Adds or replaces a tag value for this point.Adds or replaces tags for this point.setTimestamp(Long time, WritePrecision precision) Updates the timestamp for the point.setTimestamp(Number time, WritePrecision precision) Updates the timestamp for the point.setTimestamp(Instant time) Updates the timestamp for the point.
- 
Constructor Details- 
PointValuespublic PointValues()Create a new PointValues.
 
- 
- 
Method Details- 
measurementCreate a new PointValues withe specified a measurement name.- Parameters:
- measurementName- the measurement name
- Returns:
- new instance of PointValues
 
- 
getMeasurementGet measurement name. It will return null when querying with SQL Query.- Returns:
- Measurement name
 
- 
setMeasurementUpdates the measurement for the point.- Parameters:
- measurement- the measurement
- Returns:
- this
 
- 
getTimestampGet timestamp in nanoseconds. If the timestamp is not set, returns null.- Returns:
- timestamp or null
 
- 
setTimestampUpdates the timestamp for the point.- Parameters:
- time- the timestamp
- Returns:
- this
 
- 
setTimestampUpdates the timestamp for the point.- Parameters:
- time- the timestamp
- precision- the timestamp precision
- Returns:
- this
 
- 
setTimestampUpdates the timestamp for the point.- Parameters:
- time- the timestamp
- precision- the timestamp precision
- Returns:
- this
 
- 
getTagGets value of tag with given name. Returns null if tag not found.- Parameters:
- name- the tag name
- Returns:
- tag value or null
 
- 
setTagAdds or replaces a tag value for this point.- Parameters:
- key- the tag name
- value- the tag value
- Returns:
- this
 
- 
setTagsAdds or replaces tags for this point.- Parameters:
- tagsToAdd- the Map of tags to add
- Returns:
- this
 
- 
removeTagRemoves a tag with the specified name if it exists; otherwise, it does nothing.- Parameters:
- name- the tag name
- Returns:
- this
 
- 
getTagNamesGets an array of tag names.- Returns:
- An array of tag names
 
- 
getFloatFieldGets the float field value associated with the specified name. If the field is not present, returns null.- Parameters:
- name- the field name
- Returns:
- The float field value or null
- Throws:
- ClassCastException
 
- 
setFloatFieldAdds or replaces a float field.- Parameters:
- name- the field name
- value- the field value
- Returns:
- this
 
- 
getIntegerFieldGets the integer field value associated with the specified name. If the field is not present, returns null.- Parameters:
- name- the field name
- Returns:
- The integer field value or null
- Throws:
- ClassCastException
 
- 
setIntegerFieldAdds or replaces a integer field.- Parameters:
- name- the field name
- value- the field value
- Returns:
- this
 
- 
getStringFieldGets the string field value associated with the specified name. If the field is not present, returns null.- Parameters:
- name- the field name
- Returns:
- The string field value or null
- Throws:
- ClassCastException
 
- 
setStringFieldAdds or replaces a string field.- Parameters:
- name- the field name
- value- the field value
- Returns:
- this
 
- 
getBooleanFieldGets the boolean field value associated with the specified name. If the field is not present, returns null.- Parameters:
- name- the field name
- Returns:
- The boolean field value or null
- Throws:
- ClassCastException
 
- 
setBooleanFieldAdds or replaces a boolean field.- Parameters:
- name- the field name
- value- the field value
- Returns:
- this
 
- 
getFieldGet field of given name. Can be null if field doesn't exist.- Parameters:
- name- the field name
- Returns:
- Field as object
 
- 
getFieldGet field of given name as type. Can be null if field doesn't exist.- Type Parameters:
- T- the field type
- Parameters:
- name- the field name
- type- the field type Class
- Returns:
- Field as given type
- Throws:
- ClassCastException
 
- 
getFieldTypeGets the type of field with given name, if it exists. If the field is not present, returns null.- Parameters:
- name- the field name
- Returns:
- The field type or null.
 
- 
setFieldAddDoublefield.- Parameters:
- field- the field name
- value- the field value
- Returns:
- this
 
- 
setFieldAddLongfield.- Parameters:
- field- the field name
- value- the field value
- Returns:
- this
 
- 
setFieldAddNumberfield.- Parameters:
- field- the field name
- value- the field value
- Returns:
- this
 
- 
setFieldAddStringfield.- Parameters:
- field- the field name
- value- the field value
- Returns:
- this
 
- 
setFieldAddBooleanfield.- Parameters:
- field- the field name
- value- the field value
- Returns:
- this
 
- 
setFieldAddObjectfield.- Parameters:
- field- the field name
- value- the field value
- Returns:
- this
 
- 
setFieldsAdds or replaces fields for this point.- Parameters:
- fieldsToAdd- the Map of fields to add
- Returns:
- this
 
- 
removeFieldRemoves a field with the specified name if it exists; otherwise, it does nothing.- Parameters:
- name- the field name
- Returns:
- this
 
- 
getFieldNamesGets an array of field names.- Returns:
- An array of field names
 
- 
hasFieldspublic boolean hasFields()Has point any fields?- Returns:
- true, if the point contains any fields, false otherwise.
 
- 
copyCreates a copy of this object.- Returns:
- A new instance with same values.
 
- 
asPointCreates new Point with this as values with given measurement.- Parameters:
- measurement- the point measurement
- Returns:
- Point from this values with given measurement.
 
- 
asPointCreates new Point with this as values.- Returns:
- Point from this values with given measurement.
- Throws:
- Exception- if measurement is missing
 
 
-