Package org.ametys.odf.ose.export
Class ExportUtils
- java.lang.Object
 - 
- org.ametys.odf.ose.export.ExportUtils
 
 
- 
public final class ExportUtils extends Object
Utils method for export 
- 
- 
Field Summary
Fields Modifier and Type Field Description private static String__TABLE_PREFIXprivate static String__VIEW_PREFIX 
- 
Constructor Summary
Constructors Modifier Constructor Description privateExportUtils() 
- 
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static ParameterizableQuery_activateImport(String baseName)private static ParameterizableQuery_createTable(String baseName, Set<Column> tableColumns)private static ParameterizableQuery_createView(String baseName, Set<Column> tableColumns)private static ParameterizableQuery_dropTable(String baseName)private static ParameterizableQuery_dropView(String baseName)static ParameterizableQuerydeleteFrom(String tableName)Build the request to delete all the rows from a table.static ParameterizableQuerydeleteFromAmetys(String baseName)Build the request to delete all the rows from an Ametys table.static List<ParameterizableQuery>initializeTableAndView(String baseName, Set<Column> tableColumns)Build requests to drop, create and activate import on the OSE table defined by the parameter baseName.static ParameterizableQueryinsertInto(String tableName, List<QueryParameter> parameters)Build a request to insert values into the table.static ParameterizableQueryinsertIntoAmetys(String baseName, List<QueryParameter> parameters)Build a request to insert values into the Ametys table. 
 - 
 
- 
- 
Field Detail
- 
__TABLE_PREFIX
private static final String __TABLE_PREFIX
- See Also:
 - Constant Field Values
 
 
- 
__VIEW_PREFIX
private static final String __VIEW_PREFIX
- See Also:
 - Constant Field Values
 
 
 - 
 
- 
Constructor Detail
- 
ExportUtils
private ExportUtils()
 
 - 
 
- 
Method Detail
- 
insertIntoAmetys
public static ParameterizableQuery insertIntoAmetys(String baseName, List<QueryParameter> parameters)
Build a request to insert values into the Ametys table. The baseName will be prefixed by "AMETYS_".- Parameters:
 baseName- The name of the OSE tableparameters- The list of the parameters with their name and type.- Returns:
 - A query
 
 
- 
insertInto
public static ParameterizableQuery insertInto(String tableName, List<QueryParameter> parameters)
Build a request to insert values into the table.- Parameters:
 tableName- The name of the OSE tableparameters- The list of the parameters with their name and type.- Returns:
 - A query
 
 
- 
deleteFromAmetys
public static ParameterizableQuery deleteFromAmetys(String baseName)
Build the request to delete all the rows from an Ametys table. The baseName will be prefixed by "AMETYS_".- Parameters:
 baseName- The name of the OSE table- Returns:
 - A query
 
 
- 
deleteFrom
public static ParameterizableQuery deleteFrom(String tableName)
Build the request to delete all the rows from a table.- Parameters:
 tableName- The name of the OSE table- Returns:
 - A query
 
 
- 
initializeTableAndView
public static List<ParameterizableQuery> initializeTableAndView(String baseName, Set<Column> tableColumns)
Build requests to drop, create and activate import on the OSE table defined by the parameter baseName.- Parameters:
 baseName- The name of the OSE tabletableColumns- The columns for the Ametys table and the source view- Returns:
 - A 
Listof queries 
 
- 
_dropTable
private static ParameterizableQuery _dropTable(String baseName)
 
- 
_dropView
private static ParameterizableQuery _dropView(String baseName)
 
- 
_createTable
private static ParameterizableQuery _createTable(String baseName, Set<Column> tableColumns)
 
- 
_createView
private static ParameterizableQuery _createView(String baseName, Set<Column> tableColumns)
 
- 
_activateImport
private static ParameterizableQuery _activateImport(String baseName)
 
 - 
 
 -