|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface EntityModel
Specifies a class responsible for, among other things, coordinating a EntityEditModel and an EntityTableModel.
Method Summary | |
---|---|
void |
addAfterRefreshListener(ActionListener listener)
|
void |
addBeforeRefreshListener(ActionListener listener)
|
EntityModel |
addDetailModel(EntityModel detailModel)
Adds the given detail model to this model |
void |
addDetailModels(EntityModel... detailModels)
Adds the given detail models to this model. |
void |
addLinkedDetailModelsListener(ActionListener listener)
|
void |
clearDetailModels()
Clears the detail models. |
boolean |
containsDetailModel(Class<? extends EntityModel> modelClass)
|
boolean |
containsDetailModel(EntityModel detailModel)
|
boolean |
containsDetailModel(String entityID)
|
boolean |
containsTableModel()
|
EntityModel |
getDetailModel(Class<? extends EntityModel> modelClass)
Returns the first detail model of the given type, this method does not automatically create an entity model if none is available |
EntityModel |
getDetailModel(String entityID)
Returns a detail model of the given type, automatically creates a default entity model if none is available and auto creation is turned on |
Collection<? extends EntityModel> |
getDetailModels()
|
EntityEditModel |
getEditModel()
|
Collection<EntityModel> |
getLinkedDetailModels()
|
EntityModel |
getMasterModel()
|
EntityTableModel |
getTableModel()
|
void |
initialize(String masterEntityID,
List<Entity> selectedMasterEntities)
Initializes this EntityModel according to the given master entities, sets the appropriate property value and filters the EntityTableModel |
void |
refreshDetailModels()
Refreshes the detail models. |
void |
removeAfterRefreshListener(ActionListener listener)
|
void |
removeBeforeRefreshListener(ActionListener listener)
|
void |
removeLinkedDetailModelsListener(ActionListener listener)
|
void |
setLinkedDetailModels(EntityModel... detailModels)
Sets the currently linked detail models. |
void |
setMasterModel(EntityModel entityModel)
Sets the model serving as master model |
Methods inherited from interface org.jminor.common.model.Refreshable |
---|
clear, refresh |
Methods inherited from interface org.jminor.framework.client.model.EntityDataProvider |
---|
getConnectionProvider, getEntityID |
Method Detail |
---|
EntityEditModel getEditModel()
EntityTableModel getTableModel()
boolean containsTableModel()
Collection<EntityModel> getLinkedDetailModels()
void setLinkedDetailModels(EntityModel... detailModels)
detailModels
- the detail models to linkvoid initialize(String masterEntityID, List<Entity> selectedMasterEntities)
masterEntityID
- the ID of the master entityselectedMasterEntities
- the master entitiesvoid setMasterModel(EntityModel entityModel)
entityModel
- the master entity modelEntityModel getMasterModel()
void addDetailModels(EntityModel... detailModels)
detailModels
- the detail models to addEntityModel addDetailModel(EntityModel detailModel)
detailModel
- the detail model
boolean containsDetailModel(Class<? extends EntityModel> modelClass)
modelClass
- the detail model class
boolean containsDetailModel(String entityID)
entityID
- the entity ID
boolean containsDetailModel(EntityModel detailModel)
detailModel
- the detail model
EntityModel getDetailModel(Class<? extends EntityModel> modelClass)
modelClass
- the type of the required EntityModel
entityModelClass
, null if none is foundEntityModel getDetailModel(String entityID)
entityID
- the entity ID of the required EntityModel
entityModelClass
Configuration.AUTO_CREATE_ENTITY_MODELS
Collection<? extends EntityModel> getDetailModels()
void refreshDetailModels()
void clearDetailModels()
void addBeforeRefreshListener(ActionListener listener)
listener
- a listener to be notified before a refresh is performedvoid removeBeforeRefreshListener(ActionListener listener)
listener
- the listener to removevoid addAfterRefreshListener(ActionListener listener)
listener
- a listener to be notified each time a refresh has been performedvoid removeAfterRefreshListener(ActionListener listener)
listener
- the listener to removevoid addLinkedDetailModelsListener(ActionListener listener)
listener
- a listener to be notified each time the linked detail models changevoid removeLinkedDetailModelsListener(ActionListener listener)
listener
- the listener to remove
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |