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

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

public class SbiGeoMapsDAOHibImpl
extends AbstractHibernateDAO
implements ISbiGeoMapsDAO

Author:
giachino

Constructor Summary
SbiGeoMapsDAOHibImpl()
           
 
Method Summary
 void eraseMap(GeoMap aMap)
          Erase map.
 java.util.List getFeaturesFromSVG(byte[] content)
          Gets the features (tag ) from the SVG File.
 boolean hasFeaturesAssociated(java.lang.String mapId)
          Checks for features associated.
 void insertMap(GeoMap aMap, byte[] content)
          Insert map.
 java.util.List loadAllMaps()
          Load all maps.
 GeoMap loadMapByID(java.lang.Integer mapID)
          Load map by id.
 GeoMap loadMapByName(java.lang.String name)
          Load map by name.
 void modifyMap(GeoMap aMap, byte[] content)
          Modify map.
 GeoMap toGeoMap(SbiGeoMaps hibMap)
          From the Hibernate Map object at input, gives the corrispondent GeoMap object.
 
Methods inherited from class it.eng.spagobi.mapcatalogue.bo.dao.hibernate.AbstractHibernateDAO
getSession, logException
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SbiGeoMapsDAOHibImpl

public SbiGeoMapsDAOHibImpl()
Method Detail

loadMapByID

public GeoMap loadMapByID(java.lang.Integer mapID)
                   throws it.eng.spago.error.EMFUserError
Load map by id.

Specified by:
loadMapByID in interface ISbiGeoMapsDAO
Parameters:
mapID - the map id
Returns:
the geo map
Throws:
it.eng.spago.error.EMFUserError - the EMF user error
See Also:
it.eng.spagobi.geo.bo.dao.ISbiGeoMapsDAO#loadMapByID(integer)

loadMapByName

public GeoMap loadMapByName(java.lang.String name)
                     throws it.eng.spago.error.EMFUserError
Load map by name.

Specified by:
loadMapByName in interface ISbiGeoMapsDAO
Parameters:
name - the name
Returns:
the geo map
Throws:
it.eng.spago.error.EMFUserError - the EMF user error
See Also:
it.eng.spagobi.geo.bo.dao.ISbiGeoMapsDAO#loadMapByName(string)

modifyMap

public void modifyMap(GeoMap aMap,
                      byte[] content)
               throws it.eng.spago.error.EMFUserError
Modify map.

Specified by:
modifyMap in interface ISbiGeoMapsDAO
Parameters:
aMap - the a map
content - the content file svg
Throws:
it.eng.spago.error.EMFUserError - the EMF user error
See Also:
it.eng.spagobi.geo.bo.dao.IEngineDAO#modifyEngine(it.eng.spagobi.bo.Engine)

insertMap

public void insertMap(GeoMap aMap,
                      byte[] content)
               throws it.eng.spago.error.EMFUserError
Insert map.

Specified by:
insertMap in interface ISbiGeoMapsDAO
Parameters:
aMap - the a map
content - the content of svg file
Throws:
it.eng.spago.error.EMFUserError - the EMF user error
See Also:
it.eng.spagobi.geo.bo.dao.IEngineDAO#insertEngine(it.eng.spagobi.bo.Engine)

eraseMap

public void eraseMap(GeoMap aMap)
              throws it.eng.spago.error.EMFUserError
Erase map.

Specified by:
eraseMap in interface ISbiGeoMapsDAO
Parameters:
aMap - the a map
Throws:
it.eng.spago.error.EMFUserError - the EMF user error
See Also:
it.eng.spagobi.geo.bo.dao.IEngineDAO#eraseEngine(it.eng.spagobi.bo.Engine)

loadAllMaps

public java.util.List loadAllMaps()
                           throws it.eng.spago.error.EMFUserError
Load all maps.

Specified by:
loadAllMaps in interface ISbiGeoMapsDAO
Returns:
the list
Throws:
it.eng.spago.error.EMFUserError - the EMF user error
See Also:
it.eng.spagobi.geo.bo.dao.IEngineDAO#loadAllEngines()

hasFeaturesAssociated

public boolean hasFeaturesAssociated(java.lang.String mapId)
                              throws it.eng.spago.error.EMFUserError
Checks for features associated.

Specified by:
hasFeaturesAssociated in interface ISbiGeoMapsDAO
Parameters:
mapId - the map id
Returns:
true, if checks for features associated
Throws:
it.eng.spago.error.EMFUserError - the EMF user error
See Also:
it.eng.spagobi.geo.bo.dao.ISbiGeoMapsDAO#hasFeaturesAssociated(java.lang.String)

getFeaturesFromSVG

public java.util.List getFeaturesFromSVG(byte[] content)
                                  throws java.lang.Exception
Gets the features (tag ) from the SVG File.

Specified by:
getFeaturesFromSVG in interface ISbiGeoMapsDAO
Parameters:
content - the content of svg file
Returns:
the features from svg
Throws:
java.lang.Exception - raised If there are some problems

toGeoMap

public GeoMap toGeoMap(SbiGeoMaps hibMap)
From the Hibernate Map object at input, gives the corrispondent GeoMap object.

Parameters:
hibMap - The Hibernate Map object
Returns:
the corrispondent output GeoMap