|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.jhu.tmaj.beans.JBean edu.jhu.tmaj.beans.dynamic.DynamicJBean
public abstract class DynamicJBean
A JBean that represents a DynamicTable, such as Specimens. Additional support in this class is provided to handle the Dynamic fields.
Field Summary | |
---|---|
(package private) DynamicMetaData |
dynamicMetaData
The DynamicMetaData tells which types have which dynamic fields, and which fields are enumerated. |
Fields inherited from class edu.jhu.tmaj.beans.JBean |
---|
staticMetaData |
Constructor Summary | |
---|---|
DynamicJBean(StaticMetaData staticMetaData,
DynamicMetaData dynamicMetaData)
|
Method Summary | |
---|---|
void |
addDynamicValue(int fieldID,
DynamicValue dynamicValue)
Adds dynamic data to this Bean from a record in a Dynamic-Data table, such as TissueDiagnosisData |
void |
createFromSwingMap(java.util.Map<DatabaseField,java.lang.Object> columnField_value)
Creates this Bean, both the static and dynamic part, from a Map obtained from a JTable. |
protected java.util.List<JBean> |
getBeanList(Search search)
Returns a List of Beans from a Search. |
java.util.List<DatabaseField> |
getColumnIdentifiers(Search search,
java.util.List<JBean> beanList)
Returns a List of ColumnIdentifiers based on a Search and the list of Beans generated. |
(package private) java.lang.String |
getDynamicBaseSQL()
Returns a SQL statement that will pull records from the DynamicData table (e.g. |
java.util.List<DynamicTField> |
getDynamicColumnIdentifiers(java.util.Set<java.lang.Integer> typeIDs)
Returns the DynamicFields given the types. |
DynamicMetaData |
getDynamicMetaData()
Returns the DynamicMetaData for this bean, which determines what the dynamic fields are, and what enumerations they have. |
(package private) java.lang.String |
getDynamicSQL(Search search)
Returns a SQL statement that will pull records from the DynamicData table (e.g. |
(package private) abstract java.lang.String |
getDynamicTableName()
Returns the name of the Table that contains the DynamicData for this Bean, for example, SpecimenData. |
java.util.List<PickListEnumeration> |
getEnumerations(DatabaseField field)
Gets a list of enumerations for a given column. |
java.util.Map<DatabaseField,java.lang.Object> |
getSwingHash()
Converts this Bean to a Map that makes it ready to be converted into a row into a JTable. |
protected java.lang.Object |
getSwingToBeanObject(DatabaseField columnField,
java.lang.Object oldValue)
Converts a value that would be found in a swing JTable into a value that is suitable for this JBean. |
abstract DatabaseField |
getTypeField()
Returns the TField column where the type of this DynamicBean is put. |
java.lang.Integer |
getTypeID()
Returns the type of this DynamicBean, which determines which dynamic-fields will be displayed. |
void |
insert()
Performs an INSERT operation on the database with the data in this bean. |
boolean |
isEnumerated(DatabaseField field)
Returns true if the field is enumerated (has a drop down box.) This DynamicMetaData is checked if the TField is a DynamicField, whereas the staticMetaData is checked if the TField is not a DynamicTField. |
void |
setTypeID(int typeID)
Sets the Type of this DynamicBean. |
void |
syncDynamicData()
Writes the dynamic data in this bean to the database. |
void |
update()
Performs an UPDATE operation on the database with the data in this bean. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
final DynamicMetaData dynamicMetaData
Constructor Detail |
---|
public DynamicJBean(StaticMetaData staticMetaData, DynamicMetaData dynamicMetaData)
Method Detail |
---|
public final DynamicMetaData getDynamicMetaData()
public final java.util.List<DatabaseField> getColumnIdentifiers(Search search, java.util.List<JBean> beanList)
JBean
getColumnIdentifiers
in class JBean
public java.util.List<DynamicTField> getDynamicColumnIdentifiers(java.util.Set<java.lang.Integer> typeIDs)
public final boolean isEnumerated(DatabaseField field)
isEnumerated
in class JBean
public final java.util.Map<DatabaseField,java.lang.Object> getSwingHash()
getSwingHash
in class JBean
public final java.util.List<PickListEnumeration> getEnumerations(DatabaseField field)
getEnumerations
in class JBean
final java.lang.String getDynamicBaseSQL()
java.lang.String getDynamicSQL(Search search)
protected final java.util.List<JBean> getBeanList(Search search) throws java.sql.SQLException
JBean
getBeanList
in class JBean
java.sql.SQLException
public final void syncDynamicData() throws java.sql.SQLException
java.sql.SQLException
public final void createFromSwingMap(java.util.Map<DatabaseField,java.lang.Object> columnField_value)
createFromSwingMap
in class JBean
columnField_value
- A map where the keys are the columns in the Swing table, and the values are the
data the user put in.public final void addDynamicValue(int fieldID, DynamicValue dynamicValue)
public void insert() throws java.sql.SQLException
insert
in class JBean
java.sql.SQLException
public final void update() throws java.sql.SQLException
update
in class JBean
java.sql.SQLException
protected final java.lang.Object getSwingToBeanObject(DatabaseField columnField, java.lang.Object oldValue)
getSwingToBeanObject
in class JBean
public final void setTypeID(int typeID)
public final java.lang.Integer getTypeID()
public abstract DatabaseField getTypeField()
abstract java.lang.String getDynamicTableName()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |