Package com.jk.core.model.table
Class JKTableRecord
java.lang.Object
com.jk.core.model.table.JKTableRecord
The Class JKTableRecord.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds the empty value.void
addEmptyValues
(Vector<JKTableColumn> tableColumns) Adds the empty values.getColumn
(int index) Gets the column.int
getColumnIndex
(String name) Gets the column index.Gets the columns values.getColumnValue
(int col) Gets the column value.getColumnValue
(String name) Gets the column value.getColumnValueAsDate
(int colIndex) Gets the column value as date.getColumnValueAsDate
(String colName) Gets the column value as date.double
getColumnValueAsDouble
(int col) Gets the column value as double.getColumnValueAsDouble
(int col, double defaultValue) Gets the column value as double.double
getColumnValueAsDouble
(String colName) Gets the column value as double.getColumnValueAsFloat
(int col) Gets the column value as float.int
getColumnValueAsInteger
(int col) Gets the column value as integer.int
getColumnValueAsInteger
(String colName) Gets the column value as integer.getFieldValue
(String name) Gets the field value.Gets the status.boolean
isColumnEnabled
(int col) Checks if is column enabled.boolean
Checks if is modified.void
setColumnEnabled
(int col, boolean enable) Sets the column enabled.void
setColumnsValues
(Vector<JKTableColumnValue> values) Sets the columns values.void
setColumnValue
(int columnIndex, Object value) Sets the column value.void
setColumnValue
(String colName, Object value) Sets the column value.void
setFieldValue
(String name, Object value) Sets the field value.void
setStatus
(JKTableRecord.RecordStatus status) Sets the status.toHash()
To hash.To values vector.
-
Constructor Details
-
JKTableRecord
public JKTableRecord()
-
-
Method Details
-
addEmptyValue
Adds the empty value.- Parameters:
col
- the col
-
addEmptyValues
Adds the empty values.- Parameters:
tableColumns
- the table columns
-
getColumn
Gets the column.- Parameters:
index
- the index- Returns:
- the column
-
getColumnIndex
Gets the column index.- Parameters:
name
- the name- Returns:
- the column index
-
getColumnsValues
Gets the columns values.- Returns:
- the columns values
-
getColumnValue
Gets the column value.- Parameters:
col
- the col- Returns:
- the column value
-
getColumnValue
Gets the column value.- Parameters:
name
- the name- Returns:
- the column value
-
getColumnValueAsDate
Gets the column value as date.- Parameters:
colIndex
- the col index- Returns:
- the column value as date
-
getColumnValueAsDate
Gets the column value as date.- Parameters:
colName
- the col name- Returns:
- the column value as date
-
getColumnValueAsDouble
public double getColumnValueAsDouble(int col) Gets the column value as double.- Parameters:
col
- the col- Returns:
- the column value as double
-
getColumnValueAsDouble
Gets the column value as double.- Parameters:
col
- the coldefaultValue
- the default value- Returns:
- the column value as double
-
getColumnValueAsDouble
Gets the column value as double.- Parameters:
colName
- the col name- Returns:
- the column value as double
-
getColumnValueAsFloat
Gets the column value as float.- Parameters:
col
- the col- Returns:
- the column value as float
-
getColumnValueAsInteger
public int getColumnValueAsInteger(int col) Gets the column value as integer.- Parameters:
col
- the col- Returns:
- the column value as integer
-
getColumnValueAsInteger
Gets the column value as integer.- Parameters:
colName
- the col name- Returns:
- the column value as integer
-
getFieldValue
Gets the field value.- Parameters:
name
- the name- Returns:
- the field value
-
getStatus
Gets the status.- Returns:
- the status
-
isColumnEnabled
public boolean isColumnEnabled(int col) Checks if is column enabled.- Parameters:
col
- the col- Returns:
- true, if is column enabled
-
isModified
public boolean isModified()Checks if is modified.- Returns:
- true, if is modified
-
setColumnEnabled
public void setColumnEnabled(int col, boolean enable) Sets the column enabled.- Parameters:
col
- the colenable
- the enable
-
setColumnsValues
Sets the columns values.- Parameters:
values
- the new columns values
-
setColumnValue
Sets the column value.- Parameters:
columnIndex
- the column indexvalue
- the value
-
setColumnValue
Sets the column value.- Parameters:
colName
- the col namevalue
- the value
-
setFieldValue
Sets the field value.- Parameters:
name
- the namevalue
- the value
-
setStatus
Sets the status.- Parameters:
status
- the new status
-
toHash
To hash.- Returns:
- the hashtable
-
toValuesVector
To values vector.- Returns:
- the vector
-