JavaScript is disabled on your browser.
Enum Constant Summary
Enum Constants
Method Summary
All Methods Static Methods Instance Methods Concrete Methods
detect (com.google.gson.JsonElement value)
Tries to detect the
Type
of a
JsonElement
value.
Consumer <de.bytefish.pgbulkinsert.row.SimpleRow>
Fills a PgBulkInsert Row-Writer with data (timestamp, channel_id and value).
Gets the
Type
from its ID.
Gets the aggregate table name of the current type and the specified priority.
Gets the raw table name of the type and the specified priority.
com.google.gson.JsonElement
Parses a value from a
ResultSet
to
JsonElement
.
com.google.gson.JsonElement
subtract (com.google.gson.JsonElement minuend,
com.google.gson.JsonElement subtrahend)
Returns the enum constant of this class with the specified name.
Returns an array containing the constants of this enum class, in
the order they are declared.
Methods inherited from class java.lang.Enum
clone , compareTo , describeConstable , equals , finalize , getDeclaringClass , hashCode , name , ordinal , toString , valueOf
Enum Constant Details
INTEGER
public static final Type INTEGER
FLOAT
public static final Type FLOAT
STRING
public static final Type STRING
Field Details
sqlDataType
public final String sqlDataType
defaultAggregateFunction
public final String defaultAggregateFunction
aggregateFunctions
public final String [] aggregateFunctions
Method Details
values
public static Type [] values ()
Returns an array containing the constants of this enum class, in
the order they are declared.
Returns:
an array containing the constants of this enum class, in the order they are declared
valueOf
Returns the enum constant of this class with the specified name.
The string must match exactly an identifier used to declare an
enum constant in this class. (Extraneous whitespace characters are
not permitted.)
Parameters:
name
- the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException
- if this enum class has no constant with the specified name
NullPointerException
- if the argument is null
getRawTableName
Gets the raw table name of the type and the specified priority.
Parameters:
priority
- the priority of the table
Returns:
the table name
getAggregate5mTableName
Gets the aggregate table name of the current type and the specified priority.
Parameters:
priority
- the priority of the table
Returns:
the table name
fillRow
public Consumer <de.bytefish.pgbulkinsert.row.SimpleRow> fillRow (Point point)
Fills a PgBulkInsert Row-Writer with data (timestamp, channel_id and value).
Parameters:
point
- the Point
holding data
Returns:
a Consumer
as required by
SimpleRowWriter.startRow(Consumer)
Throws:
Exception
- on error
parseValueFromResultSet
public com.google.gson.JsonElement parseValueFromResultSet (ResultSet rs,
int columnIndex)
throws SQLException
Parses a value from a
ResultSet
to
JsonElement
.
Parameters:
rs
- the ResultSet
columnIndex
- the first column is 1, the second is 2, ...
Returns:
a JsonElement
Throws:
SQLException
- on error
subtract
Subtracts two values.
Parameters:
minuend
- the minuend of the subtraction
subtrahend
- the subtrahend of the subtraction
Returns:
the result, possibly null
Throws:
OpenemsError.OpenemsNamedException
- on error
fromId
public static Type fromId (int id)
Gets the
Type
from its ID.
Parameters:
id
- the ID
Returns:
the Type; null if unknown
detect
public static Type detect (com.google.gson.JsonElement value)
Tries to detect the
Type
of a
JsonElement
value.
Parameters:
value
- the value
Returns:
the type