public class EntityDataModel<T> extends AbstractTableModel implements TableModel, Iterable<T>
meta-model API
of JPA 2.0 specification.Modifier and Type | Field and Description |
---|---|
static int |
ALL_ATTR
Constant designates to include all fields.
|
static int |
ASSOCIATION_ATTR
Constant designates to include single-valued relation fields.
|
static int |
BASIC_ATTR
Constant designates to include non-relation fields.
|
static int |
PLURAL_ATTR
Constant designates to include multi-valued relation fields.
|
static int |
ROW_COUNT
Constant designates to show a row count field at the first column.
|
listenerList
Constructor and Description |
---|
EntityDataModel(Class<T> cls,
List<T> data,
javax.persistence.metamodel.Metamodel meta,
int styleBits)
Attributes of the entity are reordered with basic attributes, followed by singular
association followed by the many-valued attributes.
|
Modifier and Type | Method and Description |
---|---|
javax.persistence.metamodel.Attribute<?,?> |
getAttribute(int columnIndex)
Gets the attribute at a given column index.
|
Class<?> |
getColumnClass(int columnIndex) |
int |
getColumnCount() |
String |
getColumnName(int columnIndex) |
T |
getRow(int row)
Gets the entity represented in the given row.
|
int |
getRowCount() |
Object |
getValueAt(int rowIndex,
int columnIndex) |
boolean |
isCellEditable(int rowIndex,
int columnIndex) |
Iterator<T> |
iterator() |
void |
setValueAt(Object value,
int rowIndex,
int columnIndex) |
void |
updateData(List<T> newData) |
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addTableModelListener, removeTableModelListener
forEach, spliterator
public static int BASIC_ATTR
public static int ASSOCIATION_ATTR
public static int PLURAL_ATTR
public static int ALL_ATTR
public static int ROW_COUNT
public javax.persistence.metamodel.Attribute<?,?> getAttribute(int columnIndex)
public T getRow(int row)
public Class<?> getColumnClass(int columnIndex)
getColumnClass
in interface TableModel
getColumnClass
in class AbstractTableModel
public int getColumnCount()
getColumnCount
in interface TableModel
public String getColumnName(int columnIndex)
getColumnName
in interface TableModel
getColumnName
in class AbstractTableModel
public int getRowCount()
getRowCount
in interface TableModel
public Object getValueAt(int rowIndex, int columnIndex)
getValueAt
in interface TableModel
public boolean isCellEditable(int rowIndex, int columnIndex)
isCellEditable
in interface TableModel
isCellEditable
in class AbstractTableModel
public void setValueAt(Object value, int rowIndex, int columnIndex)
setValueAt
in interface TableModel
setValueAt
in class AbstractTableModel
Copyright © 2006–2018 Apache Software Foundation. All rights reserved.