it.eng.spagobi.mapcatalogue.bo.dao.hibernate
Class SbiGeoFeaturesDAOHibImpl

java.lang.Object
  extended by it.eng.spagobi.mapcatalogue.bo.dao.hibernate.AbstractHibernateDAO
      extended by it.eng.spagobi.mapcatalogue.bo.dao.hibernate.SbiGeoFeaturesDAOHibImpl
All Implemented Interfaces:
ISbiGeoFeaturesDAO

public class SbiGeoFeaturesDAOHibImpl
extends AbstractHibernateDAO
implements ISbiGeoFeaturesDAO

Author:
giachino

Constructor Summary
SbiGeoFeaturesDAOHibImpl()
           
 
Method Summary
 void eraseFeature(GeoFeature aFeature)
          Implements the query to erase a feature.
 boolean hasMapsAssociated(java.lang.String featureId)
          Tells if a feature is associated to any maps.
 void insertFeature(GeoFeature aFeature)
          Implements the query to insert a feature.
 java.util.List loadAllFeatures()
          Loads all detail information for all features.
 GeoFeature loadFeatureByID(java.lang.Integer featureID)
          Loads all detail information for a map identified by its mapID.
 GeoFeature loadFeatureByName(java.lang.String name)
          Loads all detail information for feature whose name is equal to name.
 void modifyFeature(GeoFeature aFeature)
          Implements the query to modify a feature.
 GeoFeature toGeoFeature(SbiGeoFeatures hibFeature)
          From the Hibernate Feature object at input, gives the corrispondent GeoFeature object.
 
Methods inherited from class it.eng.spagobi.mapcatalogue.bo.dao.hibernate.AbstractHibernateDAO
getSession, logException
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SbiGeoFeaturesDAOHibImpl

public SbiGeoFeaturesDAOHibImpl()
Method Detail

loadFeatureByID

public GeoFeature loadFeatureByID(java.lang.Integer featureID)
                           throws it.eng.spago.error.EMFUserError
Description copied from interface: ISbiGeoFeaturesDAO
Loads all detail information for a map identified by its mapID. All these information, achived by a query to the DB, are stored into an map object, which is returned.

Specified by:
loadFeatureByID in interface ISbiGeoFeaturesDAO
Parameters:
featureID - The id for the feature to load
Returns:
A SbiGeoFeatures object containing all loaded information
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred
See Also:
it.eng.spagobi.geo.bo.dao.ISbiGeoFeaturesDAO#loadFeatureByID(integer)

loadFeatureByName

public GeoFeature loadFeatureByName(java.lang.String name)
                             throws it.eng.spago.error.EMFUserError
Description copied from interface: ISbiGeoFeaturesDAO
Loads all detail information for feature whose name is equal to name. Each feature that is added into a SbiGeoFeatures object, which is returned.

Specified by:
loadFeatureByName in interface ISbiGeoFeaturesDAO
Parameters:
name - The name for the feature to load
Returns:
An SbiGeoFeatures object containing all loaded information
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred
See Also:
it.eng.spagobi.geo.bo.dao.ISbiGeoFeaturesDAO#loadFeatureByName(string)

modifyFeature

public void modifyFeature(GeoFeature aFeature)
                   throws it.eng.spago.error.EMFUserError
Description copied from interface: ISbiGeoFeaturesDAO
Implements the query to modify a feature. All information needed is stored into the input feature object.

Specified by:
modifyFeature in interface ISbiGeoFeaturesDAO
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred
See Also:
it.eng.spagobi.geo.bo.dao.IEngineDAO#modifyEngine(it.eng.spagobi.bo.Engine)

insertFeature

public void insertFeature(GeoFeature aFeature)
                   throws it.eng.spago.error.EMFUserError
Description copied from interface: ISbiGeoFeaturesDAO
Implements the query to insert a feature. All information needed is stored into the input feature object.

Specified by:
insertFeature in interface ISbiGeoFeaturesDAO
Parameters:
aFeature - The object containing all insert information
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred
See Also:
it.eng.spagobi.geo.bo.dao.IEngineDAO#insertEngine(it.eng.spagobi.bo.Engine)

eraseFeature

public void eraseFeature(GeoFeature aFeature)
                  throws it.eng.spago.error.EMFUserError
Description copied from interface: ISbiGeoFeaturesDAO
Implements the query to erase a feature. All information needed is stored into the input feature object.

Specified by:
eraseFeature in interface ISbiGeoFeaturesDAO
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred
See Also:
it.eng.spagobi.geo.bo.dao.IEngineDAO#eraseEngine(it.eng.spagobi.bo.Engine)

loadAllFeatures

public java.util.List loadAllFeatures()
                               throws it.eng.spago.error.EMFUserError
Description copied from interface: ISbiGeoFeaturesDAO
Loads all detail information for all features. For each of them, detail information is stored into an feature object. After that, all features are stored into a List, which is returned.

Specified by:
loadAllFeatures in interface ISbiGeoFeaturesDAO
Returns:
A list containing all feature objects
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred
See Also:
it.eng.spagobi.geo.bo.dao.IEngineDAO#loadAllEngines()

hasMapsAssociated

public boolean hasMapsAssociated(java.lang.String featureId)
                          throws it.eng.spago.error.EMFUserError
Description copied from interface: ISbiGeoFeaturesDAO
Tells if a feature is associated to any maps. It is useful because a feature cannot be exists without a map, so if there arent more maps, the feature must to be deleted.

Specified by:
hasMapsAssociated in interface ISbiGeoFeaturesDAO
Parameters:
featureId - The feature identifier
Returns:
True if the feature is used by one or more objects, else false
Throws:
it.eng.spago.error.EMFUserError - If any exception occurred
See Also:
it.eng.spagobi.geo.bo.dao.ISbiGeoMapsDAO#hasFeaturesAssociated(java.lang.String)

toGeoFeature

public GeoFeature toGeoFeature(SbiGeoFeatures hibFeature)
From the Hibernate Feature object at input, gives the corrispondent GeoFeature object.

Parameters:
hibFeature - The Hibernate Feature object
Returns:
the corrispondent output GeoFeature