Package org.ametys.odf.ose.export.impl
Class TypeFormationExport
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.odf.ose.export.AbstractOSEExport
-
- org.ametys.odf.ose.export.impl.TypeFormationExport
-
- All Implemented Interfaces:
OSEExport
,LogEnabled
,Serviceable
public class TypeFormationExport extends AbstractOSEExport implements Serviceable
This exports degrees to GROUPE_TYPE_FORMATION and TYPE_FORMATION tables.
-
-
Field Summary
Fields Modifier and Type Field Description private static String
__DEGREE_CATEGORY_CONTENT_TYPE
private static String
__DEGREES_ATTRIBUTE_NAME
private static String
__GROUPE_TYPE_TABLE_NAME
private static String
__TYPE_TABLE_NAME
protected OdfReferenceTableHelper
_refTableHelper
The ODF enumeration helper
-
Constructor Summary
Constructors Constructor Description TypeFormationExport()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private List<ParameterizableQuery>
_getInsertQueries()
private Stream<ParameterizableQuery>
_getInsertQueries(OdfReferenceTableEntry degreeCategory, String lang)
private ParameterizableQuery
_getInsertQueryForGroupType(OdfReferenceTableEntry degreeCategory, String lang)
private ParameterizableQuery
_getInsertQueryForType(OdfReferenceTableEntry degree, String lang, String degreeCategoryCode)
List<ParameterizableQuery>
_populate(String ametysCatalog, Long oseCatalog)
Populate the Ametys table(s) with the values from Ametys.List<ParameterizableQuery>
initializeDb()
Initialize the database by dropping old Ametys tables and source views and activate import on the OSE tables.void
service(ServiceManager manager)
-
Methods inherited from class org.ametys.odf.ose.export.AbstractOSEExport
populate
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Field Detail
-
__GROUPE_TYPE_TABLE_NAME
private static final String __GROUPE_TYPE_TABLE_NAME
- See Also:
- Constant Field Values
-
__TYPE_TABLE_NAME
private static final String __TYPE_TABLE_NAME
- See Also:
- Constant Field Values
-
__DEGREE_CATEGORY_CONTENT_TYPE
private static final String __DEGREE_CATEGORY_CONTENT_TYPE
- See Also:
- Constant Field Values
-
__DEGREES_ATTRIBUTE_NAME
private static final String __DEGREES_ATTRIBUTE_NAME
- See Also:
- Constant Field Values
-
_refTableHelper
protected OdfReferenceTableHelper _refTableHelper
The ODF enumeration helper
-
-
Constructor Detail
-
TypeFormationExport
public TypeFormationExport()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
initializeDb
public List<ParameterizableQuery> initializeDb()
Description copied from interface:OSEExport
Initialize the database by dropping old Ametys tables and source views and activate import on the OSE tables.- Specified by:
initializeDb
in interfaceOSEExport
- Returns:
- A
List
of queries
-
_populate
public List<ParameterizableQuery> _populate(String ametysCatalog, Long oseCatalog)
Description copied from class:AbstractOSEExport
Populate the Ametys table(s) with the values from Ametys.- Specified by:
_populate
in classAbstractOSEExport
- Parameters:
ametysCatalog
- The Ametys catalog to filter data.oseCatalog
- The OSE catalog to insert into the right year.- Returns:
- A
List
of queries
-
_getInsertQueries
private List<ParameterizableQuery> _getInsertQueries()
-
_getInsertQueries
private Stream<ParameterizableQuery> _getInsertQueries(OdfReferenceTableEntry degreeCategory, String lang)
-
_getInsertQueryForGroupType
private ParameterizableQuery _getInsertQueryForGroupType(OdfReferenceTableEntry degreeCategory, String lang)
-
_getInsertQueryForType
private ParameterizableQuery _getInsertQueryForType(OdfReferenceTableEntry degree, String lang, String degreeCategoryCode)
-
-