it.eng.spagobi.tools.importexport
Class ExporterMetadata

java.lang.Object
  extended by it.eng.spagobi.tools.importexport.ExporterMetadata

public class ExporterMetadata
extends java.lang.Object

Implements methods to insert exported metadata into the exported database


Constructor Summary
ExporterMetadata()
           
 
Method Summary
 java.util.List getBiObjectToInsert()
           
 void insertAlarm(Alarm alarm, org.hibernate.Session session)
          Insert Alarm.
 void insertAlarmContact(AlarmContact con, org.hibernate.Session session)
          Insert Alarm Contact
 java.util.List insertAllFromModelInstance(ModelInstance mi, org.hibernate.Session session)
          Insert Model Instance Tree.
 void insertAllSnapshot(BIObject biobj, java.util.List snapshotLis, org.hibernate.Session session)
          Insert all Snapshot and their binary content.
 void insertAllSubObject(BIObject biobj, java.util.List subObjectLis, org.hibernate.Session session)
          Insert all SubObject and their binary content.
 void insertBinContet(java.lang.Integer idContent, byte[] content, org.hibernate.Session session)
          Insert BinContent.
 void insertBIObject(BIObject biobj, org.hibernate.Session session, boolean insertDataSet)
          Insert a biobject into the exported database.
 void insertBIObjectParameter(BIObjectParameter biobjpar, org.hibernate.Session session)
          Insert a BIObject Parameter into the exported database.
 void insertBiParamDepend(java.util.List biparams, org.hibernate.Session session)
          Insert Dependencies between parameters.
 void insertBiParamViewDepend(java.util.List biparams, org.hibernate.Session session)
          Insert Visibility Dependencies between parameters.
 void insertCheck(Check check, org.hibernate.Session session)
          Insert a check into the exported database.
 void insertDataSet(GuiGenericDataSet dataSet, org.hibernate.Session session)
          Insert data set if not already present
 void insertDataSetAndDataSource(it.eng.spagobi.tools.dataset.bo.IDataSet dataset, org.hibernate.Session session)
          Insert data set.
 void insertDataSource(it.eng.spagobi.tools.datasource.bo.IDataSource ds, org.hibernate.Session session)
          Insert data source.
 void insertDomain(Domain domain, org.hibernate.Session session)
          Insert a domain into the exported database.
 void insertEngine(Engine engine, org.hibernate.Session session)
          Insert an engine into the exported database.
 void insertFunctionality(LowFunctionality funct, org.hibernate.Session session)
          Insert a functionality into the exported database.
 void insertFunctRole(it.eng.spagobi.commons.bo.Role role, LowFunctionality funct, java.lang.Integer permissionId, java.lang.String permissionCd, org.hibernate.Session session)
          Insert an association between a functionality and a role into the exported database.
 void insertHierarchy(OrganizationalUnitHierarchy hier, org.hibernate.Session session)
          Insert Hierarchy .
 void insertKpi(java.lang.Integer kpiId, org.hibernate.Session session)
          Insert Kpi .
 void insertKpiInstance(java.lang.Integer kpiInstId, org.hibernate.Session session)
          Insert Kpi Instance.
 void insertKpiInstancePeriod(KpiInstPeriod kpiInstPeriod, org.hibernate.Session session)
          Insert Kpi Instance Periodicity.
 SbiKpi insertKpiNorelations(java.lang.Integer kpiId, org.hibernate.Session session)
          Insert Kpi child for relations.
 void insertKpiRel(KpiRel kpiRel, org.hibernate.Session session)
          Insert KpiRel .
 void insertLov(ModalitiesValue lov, org.hibernate.Session session)
          Insert a list of value into the exported database.
 void insertMapCatalogue(org.hibernate.Session session)
          Exports the map catalogue (maps and features)
 void insertMeasureUnit(MeasureUnit mu, org.hibernate.Session session)
          Insert Measure Unit.
 void insertModelInstanceTree(ModelInstance mi, org.hibernate.Session session)
          Insert Model Instance.
 void insertModelResources(ModelResources modRes, org.hibernate.Session session)
          Insert ModelResources.
 void insertModelTree(Model mod, org.hibernate.Session session)
          Insert Model .
 void insertObjFunct(BIObject biobj, LowFunctionality funct, org.hibernate.Session session)
          Insert an association between a functionality and a biobject into the exported database.
 void insertObjMetacontent(ObjMetacontent objMetacontent, org.hibernate.Session session)
          Insert a Object Metadata Content into the exported database.
 void insertObjMetadata(ObjMetadata objMetadata, org.hibernate.Session session)
          Insert a Object Metadata Category into the exported database.
 void insertOrgUnitGrant(OrganizationalUnitGrant grant, org.hibernate.Session session)
          Insert all grants for model instance node.
 void insertOrgUnitGrantNodes(OrganizationalUnitGrantNode ou, org.hibernate.Session session)
          Insert all grants nodes for model instance node.
 void insertOu(OrganizationalUnit ou, org.hibernate.Session session)
          Insert OU .
 void insertOuNode(OrganizationalUnitNode node, org.hibernate.Session session)
          Insert ou node .
 void insertParameter(Parameter param, org.hibernate.Session session)
          Insert a parameter into the exported database.
 void insertParUse(ParameterUse parUse, org.hibernate.Session session)
          Insert a parameter use into the exported database.
 void insertParuseCheck(ParameterUse parUse, Check check, org.hibernate.Session session)
          Insert an association between a parameter use and a check into the exported database.
 void insertParuseRole(ParameterUse parUse, it.eng.spagobi.commons.bo.Role role, org.hibernate.Session session)
          Insert an association between a parameter use and a role into the exported database.
 void insertPeriodicity(Periodicity per, org.hibernate.Session session)
          Insert Periodicity.
 void insertResource(Resource res, org.hibernate.Session session)
          Insert Resources.
 void insertRole(it.eng.spagobi.commons.bo.Role role, org.hibernate.Session session)
          Insert a role into the exported database.
 void insertSubReportAssociation(Subreport sub, org.hibernate.Session session)
          Insert an association between a master report and a subreport.
 void insertThreshold(Threshold th, org.hibernate.Session session)
          Insert Threshold .
 void insertThresholdValue(ThresholdValue thValue, org.hibernate.Session session, SbiThreshold sbiTh)
          Insert Threshold Value.
 void insertUdp(Udp udp, org.hibernate.Session session)
          Insert Udp .
 void insertUdpValue(UdpValue udpValue, org.hibernate.Session session)
          Insert Udp Value.
 void setBiObjectToInsert(java.util.List biObjectToInsert)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExporterMetadata

public ExporterMetadata()
Method Detail

insertDomain

public void insertDomain(Domain domain,
                         org.hibernate.Session session)
                  throws it.eng.spago.error.EMFUserError
Insert a domain into the exported database.

Parameters:
domain - Domain object to export
session - Hibernate session for the exported database
Throws:
it.eng.spago.error.EMFUserError - the EMF user error

insertObjMetadata

public void insertObjMetadata(ObjMetadata objMetadata,
                              org.hibernate.Session session)
                       throws it.eng.spago.error.EMFUserError
Insert a Object Metadata Category into the exported database.

Parameters:
objMetadata - ObjMetadata object to export
session - Hibernate session for the exported database
Throws:
it.eng.spago.error.EMFUserError - the EMF user error

insertObjMetacontent

public void insertObjMetacontent(ObjMetacontent objMetacontent,
                                 org.hibernate.Session session)
                          throws it.eng.spago.error.EMFUserError
Insert a Object Metadata Content into the exported database.

Parameters:
objMetadataContent - ObjMetadataContent object to export
session - Hibernate session for the exported database
Throws:
it.eng.spago.error.EMFUserError - the EMF user error

insertDataSource

public void insertDataSource(it.eng.spagobi.tools.datasource.bo.IDataSource ds,
                             org.hibernate.Session session)
                      throws it.eng.spago.error.EMFUserError
Insert data source.

Parameters:
ds - the ds
session - the session
Throws:
it.eng.spago.error.EMFUserError - the EMF user error

insertDataSet

public void insertDataSet(GuiGenericDataSet dataSet,
                          org.hibernate.Session session)
                   throws it.eng.spago.error.EMFUserError
Insert data set if not already present

Parameters:
dataSet - the a data set
Throws:
it.eng.spago.error.EMFUserError - the EMF user error
See Also:
it.eng.spagobi.tools.dataset.dao.IDataSetDAO#insertDataSet(it.eng.spagobi.tools.dataset.bo.AbstractDataSet)

insertDataSetAndDataSource

public void insertDataSetAndDataSource(it.eng.spagobi.tools.dataset.bo.IDataSet dataset,
                                       org.hibernate.Session session)
                                throws it.eng.spago.error.EMFUserError
Insert data set.

Parameters:
dataset - the dataset
session - the session
Throws:
it.eng.spago.error.EMFUserError - the EMF user error

insertEngine

public void insertEngine(Engine engine,
                         org.hibernate.Session session)
                  throws it.eng.spago.error.EMFUserError
Insert an engine into the exported database.

Parameters:
engine - Engine Object to export
session - Hibernate session for the exported database
Throws:
it.eng.spago.error.EMFUserError - the EMF user error

insertAllSnapshot

public void insertAllSnapshot(BIObject biobj,
                              java.util.List snapshotLis,
                              org.hibernate.Session session)
                       throws it.eng.spago.error.EMFUserError
Insert all Snapshot and their binary content.

Parameters:
biobj - the biobj
snapshotLis - the snapshot lis
session - the session
Throws:
it.eng.spago.error.EMFUserError - the EMF user error

insertAllSubObject

public void insertAllSubObject(BIObject biobj,
                               java.util.List subObjectLis,
                               org.hibernate.Session session)
                        throws it.eng.spago.error.EMFUserError
Insert all SubObject and their binary content.

Parameters:
biobj - the biobj
subObjectLis - the sub object lis
session - the session
Throws:
it.eng.spago.error.EMFUserError - the EMF user error

insertBIObject

public void insertBIObject(BIObject biobj,
                           org.hibernate.Session session,
                           boolean insertDataSet)
                    throws it.eng.spago.error.EMFUserError
Insert a biobject into the exported database.

Parameters:
biobj - BIObject to export
session - Hibernate session for the exported database
Throws:
it.eng.spago.error.EMFUserError - the EMF user error

insertBIObjectParameter

public void insertBIObjectParameter(BIObjectParameter biobjpar,
                                    org.hibernate.Session session)
                             throws it.eng.spago.error.EMFUserError
Insert a BIObject Parameter into the exported database.

Parameters:
biobjpar - BIObject parameter to insert
session - Hibernate session for the exported database
Throws:
it.eng.spago.error.EMFUserError - the EMF user error

insertParameter

public void insertParameter(Parameter param,
                            org.hibernate.Session session)
                     throws it.eng.spago.error.EMFUserError
Insert a parameter into the exported database.

Parameters:
param - The param object to insert
session - Hibernate session for the exported database
Throws:
it.eng.spago.error.EMFUserError - the EMF user error

insertParUse

public void insertParUse(ParameterUse parUse,
                         org.hibernate.Session session)
                  throws it.eng.spago.error.EMFUserError
Insert a parameter use into the exported database.

Parameters:
parUse - The Parameter use object to export
session - Hibernate session for the exported database
Throws:
it.eng.spago.error.EMFUserError - the EMF user error

insertBiParamDepend

public void insertBiParamDepend(java.util.List biparams,
                                org.hibernate.Session session)
                         throws it.eng.spago.error.EMFUserError
Insert Dependencies between parameters.

Parameters:
biparams - the biparams
session - the session
Throws:
it.eng.spago.error.EMFUserError - the EMF user error

insertBiParamViewDepend

public void insertBiParamViewDepend(java.util.List biparams,
                                    org.hibernate.Session session)
                             throws it.eng.spago.error.EMFUserError
Insert Visibility Dependencies between parameters.

Parameters:
biparams - the biparams
session - the session
Throws:
it.eng.spago.error.EMFUserError - the EMF user error

insertLov

public void insertLov(ModalitiesValue lov,
                      org.hibernate.Session session)
               throws it.eng.spago.error.EMFUserError
Insert a list of value into the exported database.

Parameters:
lov - The list of values object to export
session - Hibernate session for the exported database
Throws:
it.eng.spago.error.EMFUserError - the EMF user error

insertCheck

public void insertCheck(Check check,
                        org.hibernate.Session session)
                 throws it.eng.spago.error.EMFUserError
Insert a check into the exported database.

Parameters:
check - The check object to export
session - Hibernate session for the exported database
Throws:
it.eng.spago.error.EMFUserError - the EMF user error

insertParuseCheck

public void insertParuseCheck(ParameterUse parUse,
                              Check check,
                              org.hibernate.Session session)
                       throws it.eng.spago.error.EMFUserError
Insert an association between a parameter use and a check into the exported database.

Parameters:
parUse - The paruse object which is an element of the association
check - The check object which is an element of the association
session - Hibernate session for the exported database
Throws:
it.eng.spago.error.EMFUserError - the EMF user error

insertParuseRole

public void insertParuseRole(ParameterUse parUse,
                             it.eng.spagobi.commons.bo.Role role,
                             org.hibernate.Session session)
                      throws it.eng.spago.error.EMFUserError
Insert an association between a parameter use and a role into the exported database.

Parameters:
parUse - The paruse object which is an element of the association
role - The role object which is an element of the association
session - Hibernate session for the exported database
Throws:
it.eng.spago.error.EMFUserError - the EMF user error

insertSubReportAssociation

public void insertSubReportAssociation(Subreport sub,
                                       org.hibernate.Session session)
                                throws it.eng.spago.error.EMFUserError
Insert an association between a master report and a subreport.

Parameters:
sub - The subreport
session - Hibernate session for the exported database
Throws:
it.eng.spago.error.EMFUserError - the EMF user error

insertFunctionality

public void insertFunctionality(LowFunctionality funct,
                                org.hibernate.Session session)
                         throws it.eng.spago.error.EMFUserError
Insert a functionality into the exported database.

Parameters:
funct - Functionality Object to export
session - Hibernate session for the exported database
Throws:
it.eng.spago.error.EMFUserError - the EMF user error

insertRole

public void insertRole(it.eng.spagobi.commons.bo.Role role,
                       org.hibernate.Session session)
                throws it.eng.spago.error.EMFUserError
Insert a role into the exported database.

Parameters:
role - The role object to export
session - Hibernate session for the exported database
Throws:
it.eng.spago.error.EMFUserError - the EMF user error

insertFunctRole

public void insertFunctRole(it.eng.spagobi.commons.bo.Role role,
                            LowFunctionality funct,
                            java.lang.Integer permissionId,
                            java.lang.String permissionCd,
                            org.hibernate.Session session)
                     throws it.eng.spago.error.EMFUserError
Insert an association between a functionality and a role into the exported database.

Parameters:
role - The role object which is an element of the association
funct - The functionality object which is an element of the association
permissionId - The id of the permission associated to the couple role / functionality
permissionCd - The code of the permission associated to the couple role / functionality
session - Hibernate session for the exported database
Throws:
it.eng.spago.error.EMFUserError - the EMF user error

insertObjFunct

public void insertObjFunct(BIObject biobj,
                           LowFunctionality funct,
                           org.hibernate.Session session)
                    throws it.eng.spago.error.EMFUserError
Insert an association between a functionality and a biobject into the exported database.

Parameters:
biobj - The BIObject which is an element of the association
funct - The functionality object which is an element of the association
session - Hibernate session for the exported database
Throws:
it.eng.spago.error.EMFUserError - the EMF user error

insertMapCatalogue

public void insertMapCatalogue(org.hibernate.Session session)
                        throws it.eng.spago.error.EMFUserError
Exports the map catalogue (maps and features)

Parameters:
session - Hibernate session for the exported database
Throws:
it.eng.spago.error.EMFUserError

insertAllFromModelInstance

public java.util.List insertAllFromModelInstance(ModelInstance mi,
                                                 org.hibernate.Session session)
                                          throws it.eng.spago.error.EMFUserError
Insert Model Instance Tree.

Parameters:
mi - the Model Instance
session - the session
Throws:
it.eng.spago.error.EMFUserError - the EMF user error

insertModelInstanceTree

public void insertModelInstanceTree(ModelInstance mi,
                                    org.hibernate.Session session)
                             throws it.eng.spago.error.EMFUserError
Insert Model Instance.

Parameters:
mi - the Model Instance
session - the session
Throws:
it.eng.spago.error.EMFUserError - the EMF user error

insertModelTree

public void insertModelTree(Model mod,
                            org.hibernate.Session session)
                     throws it.eng.spago.error.EMFUserError
Insert Model .

Parameters:
mod - the Model
session - the session
Throws:
it.eng.spago.error.EMFUserError - the EMF user error

insertKpi

public void insertKpi(java.lang.Integer kpiId,
                      org.hibernate.Session session)
               throws it.eng.spago.error.EMFUserError
Insert Kpi .

Parameters:
kpi - the Kpi
session - the session
Throws:
it.eng.spago.error.EMFUserError - the EMF user error

insertKpiNorelations

public SbiKpi insertKpiNorelations(java.lang.Integer kpiId,
                                   org.hibernate.Session session)
                            throws it.eng.spago.error.EMFUserError
Insert Kpi child for relations.

Parameters:
kpiId - the Kpi child id
session - the session
Throws:
it.eng.spago.error.EMFUserError - the EMF user error

insertKpiInstance

public void insertKpiInstance(java.lang.Integer kpiInstId,
                              org.hibernate.Session session)
                       throws it.eng.spago.error.EMFUserError
Insert Kpi Instance.

Parameters:
kpiInst - the Kpi Instance
session - the session
Throws:
it.eng.spago.error.EMFUserError - the EMF user error

insertThreshold

public void insertThreshold(Threshold th,
                            org.hibernate.Session session)
                     throws it.eng.spago.error.EMFUserError
Insert Threshold .

Parameters:
th - the Threshold
session - the session
Throws:
it.eng.spago.error.EMFUserError - the EMF user error

insertThresholdValue

public void insertThresholdValue(ThresholdValue thValue,
                                 org.hibernate.Session session,
                                 SbiThreshold sbiTh)
                          throws it.eng.spago.error.EMFUserError
Insert Threshold Value.

Parameters:
th - the Threshold Value
session - the session
Throws:
it.eng.spago.error.EMFUserError - the EMF user error

insertMeasureUnit

public void insertMeasureUnit(MeasureUnit mu,
                              org.hibernate.Session session)
                       throws it.eng.spago.error.EMFUserError
Insert Measure Unit.

Parameters:
mu - the Measure Unit
session - the session
Throws:
it.eng.spago.error.EMFUserError - the EMF user error

insertKpiInstancePeriod

public void insertKpiInstancePeriod(KpiInstPeriod kpiInstPeriod,
                                    org.hibernate.Session session)
                             throws it.eng.spago.error.EMFUserError
Insert Kpi Instance Periodicity.

Parameters:
kpiPeriod - kpiInstancePeriodicity
session - the session
Throws:
it.eng.spago.error.EMFUserError - the EMF user error

insertPeriodicity

public void insertPeriodicity(Periodicity per,
                              org.hibernate.Session session)
                       throws it.eng.spago.error.EMFUserError
Insert Periodicity.

Parameters:
mu - the Measure Unit
session - the session
Throws:
it.eng.spago.error.EMFUserError - the EMF user error

insertModelResources

public void insertModelResources(ModelResources modRes,
                                 org.hibernate.Session session)
                          throws it.eng.spago.error.EMFUserError
Insert ModelResources.

Parameters:
modRes - the modelResource
session - the session
Throws:
it.eng.spago.error.EMFUserError - the EMF user error

insertResource

public void insertResource(Resource res,
                           org.hibernate.Session session)
                    throws it.eng.spago.error.EMFUserError
Insert Resources.

Parameters:
res - the resource
session - the session
Throws:
it.eng.spago.error.EMFUserError - the EMF user error

getBiObjectToInsert

public java.util.List getBiObjectToInsert()

setBiObjectToInsert

public void setBiObjectToInsert(java.util.List biObjectToInsert)

insertAlarm

public void insertAlarm(Alarm alarm,
                        org.hibernate.Session session)
                 throws it.eng.spago.error.EMFUserError
Insert Alarm.

Parameters:
res - the Alarm
session - the session
Throws:
it.eng.spago.error.EMFUserError - the EMF user error

insertAlarmContact

public void insertAlarmContact(AlarmContact con,
                               org.hibernate.Session session)
                        throws it.eng.spago.error.EMFUserError
Insert Alarm Contact

Parameters:
con - the Alarm Contact
session - the session
Throws:
it.eng.spago.error.EMFUserError - the EMF user error

insertBinContet

public void insertBinContet(java.lang.Integer idContent,
                            byte[] content,
                            org.hibernate.Session session)
                     throws it.eng.spago.error.EMFUserError
Insert BinContent.

Parameters:
id - and content
session - the session
Throws:
it.eng.spago.error.EMFUserError - the EMF user error

insertKpiRel

public void insertKpiRel(KpiRel kpiRel,
                         org.hibernate.Session session)
                  throws it.eng.spago.error.EMFUserError
Insert KpiRel .

Parameters:
kpiRel - the KpiRel
session - the session
Throws:
it.eng.spago.error.EMFUserError - the EMF user error

insertUdp

public void insertUdp(Udp udp,
                      org.hibernate.Session session)
               throws it.eng.spago.error.EMFUserError
Insert Udp .

Parameters:
udp - the Udp
session - the session
Throws:
it.eng.spago.error.EMFUserError - the EMF user error

insertUdpValue

public void insertUdpValue(UdpValue udpValue,
                           org.hibernate.Session session)
                    throws it.eng.spago.error.EMFUserError
Insert Udp Value.

Parameters:
udpValue - the Udp Value
session - the session
Throws:
it.eng.spago.error.EMFUserError - the EMF user error

insertOu

public void insertOu(OrganizationalUnit ou,
                     org.hibernate.Session session)
              throws it.eng.spago.error.EMFUserError
Insert OU .

Parameters:
ou - the OU
session - the session
Throws:
it.eng.spago.error.EMFUserError - the EMF user error

insertHierarchy

public void insertHierarchy(OrganizationalUnitHierarchy hier,
                            org.hibernate.Session session)
                     throws it.eng.spago.error.EMFUserError
Insert Hierarchy .

Parameters:
hier - the Hierarchy
session - the session
Throws:
it.eng.spago.error.EMFUserError - the EMF user error

insertOuNode

public void insertOuNode(OrganizationalUnitNode node,
                         org.hibernate.Session session)
                  throws it.eng.spago.error.EMFUserError
Insert ou node .

Parameters:
node - the ou node
session - the session
Throws:
it.eng.spago.error.EMFUserError - the EMF user error

insertOrgUnitGrant

public void insertOrgUnitGrant(OrganizationalUnitGrant grant,
                               org.hibernate.Session session)
                        throws it.eng.spago.error.EMFUserError
Insert all grants for model instance node.

Parameters:
grant - the OrganizationalUnitGrant
session - the session
Throws:
it.eng.spago.error.EMFUserError - the EMF user error

insertOrgUnitGrantNodes

public void insertOrgUnitGrantNodes(OrganizationalUnitGrantNode ou,
                                    org.hibernate.Session session)
                             throws it.eng.spago.error.EMFUserError
Insert all grants nodes for model instance node.

Parameters:
ou - the OrganizationalUnitGrantNode
session - the session
Throws:
it.eng.spago.error.EMFUserError - the EMF user error