TColumn - column typeTTable - table typepublic abstract class UserCoreRow<TColumn extends UserColumn,TTable extends UserTable<TColumn>> extends Object
| Modifier and Type | Field and Description |
|---|---|
protected int[] |
columnTypes
Cursor column types of this row, based upon the data values
|
protected TTable |
table
User table
|
protected Object[] |
values
Array of row values
|
| Modifier | Constructor and Description |
|---|---|
protected |
UserCoreRow(TTable table)
Constructor to create an empty row
|
protected |
UserCoreRow(TTable table,
int[] columnTypes,
Object[] values)
Constructor
|
protected |
UserCoreRow(UserCoreRow<TColumn,TTable> userCoreRow)
Copy Constructor
|
| Modifier and Type | Method and Description |
|---|---|
int |
columnCount()
Get the column count
|
protected Object |
copyValue(TColumn column,
Object value)
Copy the value of the data type
|
Set<Map.Entry<String,ColumnValue>> |
getAsMap()
Get a Map
|
TColumn |
getColumn(int index)
Get the column at the index
|
TColumn |
getColumn(String columnName)
Get the column of the column name
|
int |
getColumnIndex(String columnName)
Get the index of the column name
|
String |
getColumnName(int index)
Get the column name at the index
|
String[] |
getColumnNames()
Get the column names
|
long |
getId()
Get the id value, which is the value of the primary key
|
TColumn |
getPkColumn()
Get the primary key column
|
int |
getPkColumnIndex()
Get the primary key column index
|
int |
getRowColumnType(int index)
Get the Cursor column data type at the index
|
int |
getRowColumnType(String columnName)
Get the Cursor column data type of the column name
|
int[] |
getRowColumnTypes()
Get the row column data types
|
TTable |
getTable()
Get the table
|
Object |
getValue(int index)
Get the value at the index
|
Object |
getValue(String columnName)
Get the value of the column name
|
Object[] |
getValues()
Get the row values
|
boolean |
hasColumn(String columnName)
Check if the row has the column
|
boolean |
hasId()
Check if the row has an id value
|
boolean |
hasIdColumn()
Check if the row has an id column
|
void |
resetId()
Clears the id so the row can be used as part of an insert or create
|
void |
setValue(int index,
Object value)
Set the column value at the index
|
void |
setValue(String columnName,
Object value)
Set the column value of the column name
|
protected void |
validateValue(TColumn column,
Object value,
Class<?>... valueTypes)
Validate the value and its actual value types against the column data
type class
|
protected final int[] columnTypes
protected final Object[] values
protected UserCoreRow(TTable table, int[] columnTypes, Object[] values)
table - tablecolumnTypes - column typesvalues - valuesprotected UserCoreRow(TTable table)
table - tableprotected UserCoreRow(UserCoreRow<TColumn,TTable> userCoreRow)
userCoreRow - user core row to copyprotected Object copyValue(TColumn column, Object value)
column - table columnvalue - valuepublic int columnCount()
public Set<Map.Entry<String,ColumnValue>> getAsMap()
public String[] getColumnNames()
public String getColumnName(int index)
index - indexpublic int getColumnIndex(String columnName)
columnName - column namepublic Object getValue(int index)
index - indexpublic Object getValue(String columnName)
columnName - column namepublic Object[] getValues()
public int[] getRowColumnTypes()
public int getRowColumnType(int index)
index - indexpublic int getRowColumnType(String columnName)
columnName - column namepublic TTable getTable()
public TColumn getColumn(int index)
index - indexpublic TColumn getColumn(String columnName)
columnName - column namepublic boolean hasColumn(String columnName)
columnName - column namepublic long getId()
public boolean hasIdColumn()
public boolean hasId()
public int getPkColumnIndex()
public TColumn getPkColumn()
public void setValue(int index,
Object value)
index - indexvalue - valuepublic void setValue(String columnName, Object value)
columnName - column namevalue - valuepublic void resetId()
Copyright © 2018 National Geospatial-Intelligence Agency. All rights reserved.