public class EsperUtil
extends java.lang.Object
Constructor and Description |
---|
EsperUtil() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
buildInsertStatement(java.lang.String windowName,
java.util.List<ReadZone> readZones,
boolean useRegex)
A helper method to create the "insert into" statement.
|
static java.lang.String |
buildInsertStatement(java.lang.String windowname,
ReadZone readZone)
A helper method to create the "insert into" statement.
|
static java.lang.Float |
esperTimetoTime(java.lang.String esperTime)
This method takes in an esper expression for time (such as '1.5 min') and
returns the number as a float.
|
static java.util.concurrent.TimeUnit |
esperTimetoTimeUnit(java.lang.String esperTime)
This method takes in an esper expression for time (such as '1.5 min') and
returns the TimeUnit object for the unit of time (such as
TimeUnit.Minute)
|
static java.lang.String |
returnReaderMatch(java.util.HashMap<java.lang.String,ReadZone> readzones,
boolean useRegex,
java.lang.String reader,
java.lang.Integer antenna) |
static java.lang.String |
timeUnitToEsperTime(float time,
java.util.concurrent.TimeUnit timeUnit)
This method converts between a time and timeunit to an esper time string.
|
static java.lang.String |
whereClause(java.util.List<ReadZone> readzones,
boolean useRegex)
A private method to create the where clause in the select statement
|
public static java.lang.String timeUnitToEsperTime(float time, java.util.concurrent.TimeUnit timeUnit)
time
- The time must be greater than 0timeUnit
- Valid TimeUnits are DAYS, HOURS, MINUTES, SECONDS, and
MILLISECONDS.public static java.lang.Float esperTimetoTime(java.lang.String esperTime)
esperTime
- public static java.util.concurrent.TimeUnit esperTimetoTimeUnit(java.lang.String esperTime)
esperTime
- public static java.lang.String buildInsertStatement(java.lang.String windowName, java.util.List<ReadZone> readZones, boolean useRegex)
public static java.lang.String buildInsertStatement(java.lang.String windowname, ReadZone readZone)
windowname
- readZone
- public static java.lang.String whereClause(java.util.List<ReadZone> readzones, boolean useRegex)
useRegex
- public static java.lang.String returnReaderMatch(java.util.HashMap<java.lang.String,ReadZone> readzones, boolean useRegex, java.lang.String reader, java.lang.Integer antenna)