org.jminor.framework.client.model
Interface EntityApplicationModel

All Superinterfaces:
Refreshable
All Known Implementing Classes:
DefaultEntityApplicationModel

public interface EntityApplicationModel
extends Refreshable

A central application model class.


Method Summary
 EntityModel addMainApplicationModel(EntityModel detailModel)
          Adds the given detail model to this model
 void addMainApplicationModels(EntityModel... mainApplicationModels)
          Adds the given detail models to this model.
 EntityConnectionProvider getConnectionProvider()
           
 EntityModel getMainApplicationModel(Class<? extends EntityModel> modelClass)
           
 EntityModel getMainApplicationModel(String entityID)
           
 List<? extends EntityModel> getMainApplicationModels()
           
 User getUser()
           
 void login(User user)
          Logs in the given user
 void logout()
          Log out from this application model
 
Methods inherited from interface org.jminor.common.model.Refreshable
clear, refresh
 

Method Detail

logout

void logout()
Log out from this application model


login

void login(User user)
Logs in the given user

Parameters:
user - the user to login

getUser

User getUser()
Returns:
the current user

getConnectionProvider

EntityConnectionProvider getConnectionProvider()
Returns:
the EntityConnectionProvider instance being used by this EntityApplicationModel

addMainApplicationModels

void addMainApplicationModels(EntityModel... mainApplicationModels)
Adds the given detail models to this model.

Parameters:
mainApplicationModels - the detail models to add

addMainApplicationModel

EntityModel addMainApplicationModel(EntityModel detailModel)
Adds the given detail model to this model

Parameters:
detailModel - the detail model
Returns:
the detail model just added

getMainApplicationModels

List<? extends EntityModel> getMainApplicationModels()
Returns:
an unmodifiable List containing the main application models

getMainApplicationModel

EntityModel getMainApplicationModel(Class<? extends EntityModel> modelClass)
Parameters:
modelClass - the model class
Returns:
the EntityModel of the given type

getMainApplicationModel

EntityModel getMainApplicationModel(String entityID)
Parameters:
entityID - the entity ID
Returns:
the EntityModel based on the given entityID