it.eng.spagobi.kpi.model.dao
Interface IModelResourceDAO

All Superinterfaces:
ISpagoBIDao
All Known Implementing Classes:
ModelResourceDAOImpl

public interface IModelResourceDAO
extends ISpagoBIDao


Method Summary
 void addModelResource(java.lang.Integer modelId, java.lang.Integer resourceId)
          Add an association between a model instance and a resource.
 boolean isSelected(java.lang.Integer modelId, java.lang.Integer resourceId)
          Check if a resources is associated with a modelInstance.
 java.util.List loadModelResourceByModelId(java.lang.Integer modelInstId)
          Load all couples .
 void removeAllModelResource(java.lang.Integer modelId)
          Remove all association between a model and same resources.
 void removeModelResource(java.lang.Integer modelId, java.lang.Integer resourceId)
          Remove an association between a model instance and a resource.
 Resource toResource(SbiKpiModelResources re)
           
 
Methods inherited from interface it.eng.spagobi.commons.dao.ISpagoBIDao
getUserProfile, setTenant, setUserID, setUserProfile
 

Method Detail

loadModelResourceByModelId

java.util.List loadModelResourceByModelId(java.lang.Integer modelInstId)
                                          throws it.eng.spago.error.EMFUserError
Load all couples .

Parameters:
modelId - the id of modelInstance to check.
Returns:
list of modelResource Id
Throws:
it.eng.spago.error.EMFUserError

toResource

Resource toResource(SbiKpiModelResources re)
                    throws it.eng.spago.error.EMFUserError
Throws:
it.eng.spago.error.EMFUserError

isSelected

boolean isSelected(java.lang.Integer modelId,
                   java.lang.Integer resourceId)
                   throws it.eng.spago.error.EMFUserError
Check if a resources is associated with a modelInstance.

Parameters:
modelId - the id of modelInstance to check.
resourceId - the id of resources to check.
Returns:
true if exist an association between the model instance id and the resources id, false otherwise.
Throws:
it.eng.spago.error.EMFUserError

removeModelResource

void removeModelResource(java.lang.Integer modelId,
                         java.lang.Integer resourceId)
                         throws it.eng.spago.error.EMFUserError
Remove an association between a model instance and a resource.

Parameters:
modelId - the id of modelInstance.
resourceId - the id of the resource.
Throws:
it.eng.spago.error.EMFUserError

addModelResource

void addModelResource(java.lang.Integer modelId,
                      java.lang.Integer resourceId)
                      throws it.eng.spago.error.EMFUserError
Add an association between a model instance and a resource.

Parameters:
modelId - the id of modelInstance.
resourceId - the id of the resource.
Throws:
it.eng.spago.error.EMFUserError

removeAllModelResource

void removeAllModelResource(java.lang.Integer modelId)
                            throws it.eng.spago.error.EMFUserError
Remove all association between a model and same resources.

Parameters:
modelId - the id of modelInstance.
Throws:
it.eng.spago.error.EMFUserError