public class Var extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Var.Type |
Modifier and Type | Field and Description |
---|---|
static String |
DERIVED_ROWTYPE |
static String |
DERIVED_TYPE |
static Var |
Empty |
String |
name |
static Var |
Null |
Var.Type |
type |
Object |
value |
Constructor and Description |
---|
Var() |
Var(ArrayList<String> value) |
Var(BigDecimal value) |
Var(Boolean b) |
Var(Date value) |
Var(Double value) |
Var(Interval value) |
Var(Long value) |
Var(String value) |
Var(String name,
Long value) |
Var(String name,
Row row) |
Var(String name,
String type,
String len,
String scale,
Var def) |
Var(String name,
Var.Type type,
Object value) |
Var(Timestamp value,
int scale) |
Var(Var.Type type) |
Var(Var.Type type,
Object value) |
Var(Var.Type type,
String name) |
Var(Var var) |
Modifier and Type | Method and Description |
---|---|
Var |
cast(String val)
Cast a new string value to the variable
|
Var |
cast(Var val)
Cast a new value to the variable
|
int |
compareTo(Var v)
Compare values
|
BigDecimal |
decimalValue()
Return a decimal value
|
Var |
decrement(Long i)
Decrement an integer value
|
static Var.Type |
defineType(int type)
Define the data type from JDBC type code
|
static Var.Type |
defineType(String type)
Define the data type from string representation
|
double |
doubleValue()
Return a double value
|
boolean |
equals(BigDecimal d,
Long i)
Check if variables of different data types are equal
|
boolean |
equals(Object obj)
Compare values
|
String |
getName()
Get variable name
|
Var |
increment(Long i)
Increment an integer value
|
int |
intValue()
Return an integer value
|
boolean |
isNull()
Check if the variable contains NULL
|
boolean |
isTrue()
Return true/false for BOOL type
|
long |
longValue()
Return a long integer value
|
void |
negate()
Negate the boolean value
|
BigDecimal |
percentDiff(Var var)
Calculate difference between values in percent
|
void |
removeValue()
Remove value
|
void |
setName(String name)
Set variable name
|
Var |
setValue(Boolean val) |
Var |
setValue(Long val) |
void |
setValue(Object value) |
Var |
setValue(ResultSet rs,
ResultSetMetaData rsm,
int idx)
Set the new value from the result set
|
void |
setValue(String str)
Set the new value
|
Var |
setValues(ResultSet rs,
ResultSetMetaData rsm)
Set ROW values from the result set
|
String |
toSqlString()
Convert value to SQL string - string literals are quoted and escaped, ab'c -> 'ab''c'
|
String |
toString()
Convert value to String
|
public static final String DERIVED_TYPE
public static final String DERIVED_ROWTYPE
public static Var Empty
public static Var Null
public String name
public Var.Type type
public Object value
public Var()
public Var(Var var)
public Var(Long value)
public Var(BigDecimal value)
public Var(String value)
public Var(Double value)
public Var(Date value)
public Var(Timestamp value, int scale)
public Var(Interval value)
public Var(Boolean b)
public Var(Var.Type type)
public void setValue(String str)
public void setValue(Object value)
public Var setValue(ResultSet rs, ResultSetMetaData rsm, int idx) throws SQLException
SQLException
public Var setValues(ResultSet rs, ResultSetMetaData rsm) throws SQLException
SQLException
public static Var.Type defineType(String type)
public static Var.Type defineType(int type)
public void removeValue()
public boolean equals(BigDecimal d, Long i)
public int compareTo(Var v)
public BigDecimal percentDiff(Var var)
public int intValue()
public long longValue()
public BigDecimal decimalValue()
public double doubleValue()
public boolean isTrue()
public void negate()
public boolean isNull()
public String toSqlString()
public void setName(String name)
public String getName()
Copyright © 2016 The Apache Software Foundation. All rights reserved.