public class Record extends Object implements Serializable
Constructor and Description |
---|
Record() |
Modifier and Type | Method and Description |
---|---|
Record |
clear()
Remove all columns of this record.
|
boolean |
equals(Object o) |
<T> T |
get(String column)
Get column of any mysql type
|
<T> T |
get(String column,
Object defaultValue)
Get column of any mysql type.
|
BigDecimal |
getBigDecimal(String column)
Get column of mysql type: decimal, numeric
|
BigInteger |
getBigInteger(String column)
Get column of mysql type: unsigned bigint
|
Boolean |
getBoolean(String column)
Get column of mysql type: bit, tinyint(1)
|
Byte |
getByte(String column) |
byte[] |
getBytes(String column)
Get column of mysql type: binary, varbinary, tinyblob, blob, mediumblob, longblob
I have not finished the test.
|
String[] |
getColumnNames()
Return column names of this record.
|
Map<String,Object> |
getColumns()
Return columns map.
|
Object[] |
getColumnValues()
Return column values of this record.
|
Date |
getDate(String column)
Get column of mysql type: date, year
|
Double |
getDouble(String column)
Get column of mysql type: real, double
|
Float |
getFloat(String column)
Get column of mysql type: float
|
Integer |
getInt(String column)
Get column of mysql type: int, integer, tinyint(n) n > 1, smallint, mediumint
|
Long |
getLong(String column)
Get column of mysql type: bigint
|
Number |
getNumber(String column)
Get column of any type that extends from Number
|
Short |
getShort(String column) |
String |
getStr(String column)
Get column of mysql type: varchar, char, enum, set, text, tinytext, mediumtext, longtext
|
Time |
getTime(String column)
Get column of mysql type: time
|
Timestamp |
getTimestamp(String column)
Get column of mysql type: timestamp, datetime
|
int |
hashCode() |
Record |
keep(String... columns)
Keep columns of this record and remove other columns.
|
Record |
keep(String column)
Keep column of this record and remove other columns.
|
Record |
remove(String... columns)
Remove columns of this record.
|
Record |
remove(String column)
Remove attribute of this record.
|
Record |
removeNullValueColumns()
Remove columns if it is null.
|
Record |
set(String column,
Object value)
Set column to record.
|
Record |
setColumns(Map<String,Object> columns)
Set columns value with map.
|
Record |
setColumns(Model<?> model)
Set columns value with Model object.
|
Record |
setColumns(Record record)
Set columns value with Record.
|
Record |
setContainerFactoryByConfigName(String configName)
Set the containerFactory by configName.
|
String |
toJson()
Return json string of this record.
|
String |
toString() |
public Record setContainerFactoryByConfigName(String configName)
configName
- the config namepublic Record setColumns(Map<String,Object> columns)
columns
- the columns mappublic Record setColumns(Record record)
record
- the Record objectpublic Record setColumns(Model<?> model)
model
- the Model objectpublic Record remove(String column)
column
- the column name of the recordpublic Record remove(String... columns)
columns
- the column names of the recordpublic Record removeNullValueColumns()
public Record keep(String... columns)
columns
- the column names of the recordpublic Record keep(String column)
column
- the column names of the recordpublic Record clear()
public Record set(String column, Object value)
column
- the column namevalue
- the value of the columnpublic <T> T get(String column)
public <T> T get(String column, Object defaultValue)
public String getStr(String column)
public Integer getInt(String column)
public BigInteger getBigInteger(String column)
public Timestamp getTimestamp(String column)
public BigDecimal getBigDecimal(String column)
public byte[] getBytes(String column)
public String[] getColumnNames()
public Object[] getColumnValues()
public String toJson()
Copyright © 2018. All rights reserved.