it.eng.spagobi.tools.objmetadata.dao
Interface IObjMetadataDAO

All Superinterfaces:
ISpagoBIDao
All Known Implementing Classes:
ObjMetadataDAOHibImpl

public interface IObjMetadataDAO
extends ISpagoBIDao

Defines the interfaces for all methods needed to insert, modify and deleting object's metadata.


Method Summary
 void eraseObjMetadata(ObjMetadata aObjMetadata)
          Implements the query to erase an object's metadata.
 boolean hasBIObjAssociated(java.lang.String id)
          Tells if a objMetadata is associated to any BI Objects.
 boolean hasSubObjAssociated(java.lang.String id)
          Tells if a objMetadata is associated to any BI SubObjects.
 void insertObjMetadata(ObjMetadata aObjMetadata)
          Implements the query to insert an object's metadata.
 java.util.List loadAllObjMetadata()
          Loads all detail information for all object's metadata.
 ObjMetadata loadObjMetaDataByID(java.lang.Integer id)
          Loads all detail information for a metadata identified by its id.
 ObjMetadata loadObjMetadataByLabel(java.lang.String label)
          Loads all detail information for object's metadata whose label is equal to label.
 java.util.List loadObjMetaDataListByType(java.lang.String type)
          Loads all detail information for a metadata identified by its type.
 void modifyObjMetadata(ObjMetadata aObjMetadata)
          Implements the query to modify an object's metadata.
 
Methods inherited from interface it.eng.spagobi.commons.dao.ISpagoBIDao
getUserProfile, setUserID, setUserProfile
 

Method Detail

loadObjMetaDataListByType

java.util.List loadObjMetaDataListByType(java.lang.String type)
                                         throws it.eng.spago.error.EMFUserError
Loads all detail information for a metadata identified by its type. All these informations, achived by a query to the DB, are stored into a metadata object, which is returned.

Parameters:
type - The type of metadata to load (LONG_TEXT or SHORT_TEXT)
Returns:
A objMetadata object containing all loaded information
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

loadObjMetaDataByID

ObjMetadata loadObjMetaDataByID(java.lang.Integer id)
                                throws it.eng.spago.error.EMFUserError
Loads all detail information for a metadata identified by its id. All these information, achived by a query to the DB, are stored into a metadata object, which is returned.

Parameters:
id - The id for the metadata to load
Returns:
A objMetadata object containing all loaded information
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

loadObjMetadataByLabel

ObjMetadata loadObjMetadataByLabel(java.lang.String label)
                                   throws it.eng.spago.error.EMFUserError
Loads all detail information for object's metadata whose label is equal to label.

Parameters:
label - The label for the metadata to load
Returns:
An ObjMetada object containing all loaded information
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

loadAllObjMetadata

java.util.List loadAllObjMetadata()
                                  throws it.eng.spago.error.EMFUserError
Loads all detail information for all object's metadata. For each of them, detail information is stored into a ObjMetadata object. After that, all metadata are stored into a List, which is returned.

Returns:
A list containing all metadata objects
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

modifyObjMetadata

void modifyObjMetadata(ObjMetadata aObjMetadata)
                       throws it.eng.spago.error.EMFUserError
Implements the query to modify an object's metadata. All information needed is stored into the input ObjMetadata object.

Parameters:
aObjMetadata - The object containing all modify information
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

insertObjMetadata

void insertObjMetadata(ObjMetadata aObjMetadata)
                       throws it.eng.spago.error.EMFUserError
Implements the query to insert an object's metadata. All information needed is stored into the input ObjMetadata object.

Parameters:
aObjMetadata - The object containing all insert information
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

eraseObjMetadata

void eraseObjMetadata(ObjMetadata aObjMetadata)
                      throws it.eng.spago.error.EMFUserError
Implements the query to erase an object's metadata. All information needed is stored into the input ObjMetadata object.

Parameters:
aObjMetadata - The object containing all delete information
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

hasBIObjAssociated

boolean hasBIObjAssociated(java.lang.String id)
                           throws it.eng.spago.error.EMFUserError
Tells if a objMetadata is associated to any BI Objects. It is useful because a metadata cannot be deleted if it is used by one or more BI Objects.

Parameters:
id - The objMetadata identifier
Returns:
True if the metadata is used by one or more objects, else false
Throws:
it.eng.spago.error.EMFUserError - If any exception occurred

hasSubObjAssociated

boolean hasSubObjAssociated(java.lang.String id)
                            throws it.eng.spago.error.EMFUserError
Tells if a objMetadata is associated to any BI SubObjects. It is useful because a metadata cannot be deleted if it is used by one or more BI SubObjects.

Parameters:
id - The objMetadata identifier
Returns:
True if the metadata is used by one or more subobjects, else false
Throws:
it.eng.spago.error.EMFUserError - If any exception occurred