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
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ParameterizableQuery
deleteFrom(String tableName)
Build the request to delete all the rows from a table.static ParameterizableQuery
deleteFromAmetys(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 ParameterizableQuery
insertInto(String tableName, List<QueryParameter> parameters)
Build a request to insert values into the table.static ParameterizableQuery
insertIntoAmetys(String baseName, List<QueryParameter> parameters)
Build a request to insert values into the Ametys table.
-
-
-
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
List
of queries
-
-