public class CustomerSegmentExtractCmdImpl extends TaskCommandImpl implements CustomerSegmentExtractCmd
Modifier and Type | Field and Description |
---|---|
static java.lang.String | CLASSNAME
The full class name for this class.
|
static java.lang.String | COPYRIGHT
Copyright statement.
|
Constructor and Description |
---|
CustomerSegmentExtractCmdImpl() |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String | buildLine(java.lang.String code, int count)
Builds a line to be saved in the CSV file.
|
protected void | close()
This method close all the connections, open statements, and reset the global variables.
|
protected java.lang.String | compressFile(java.lang.String parentDir)
Compress the customer segment customers information export file.
|
protected void | extractCustomerSegmentCustomersInfo()
Performs the logic of extracting the customer segment customers information from the database, converting them to a comma separated file, optionally compressing the file and uploading the file in the database.
|
protected java.sql.Connection | getAuthoringConnection()
Gets the Authoring database connection
|
protected java.lang.String | getCustomerSegmentCustomersInfoExtractSQL()
Gets the final SQL statement to retrieve the customer segment's customers information list.
|
protected java.lang.String | getFileHeader(boolean includeLogonId, boolean includeEmailsOptOutCustomers, int includeCustomersNames)
This method returns the header of the export file based on the input parameters includeLogonId, includeEmailsOptOutCustomers, and includeCustomersNames.
|
protected java.sql.Connection | getProductionConnection()
Gets the Production database connection.
|
protected java.lang.String | getSQLOrderBy(boolean includeLogonId, boolean includeEmailsOptOutCustomers, int includeCustomersNames)
This method returns the SQL ORDER BY statement based on the input parameters includeLogonId, includeEmailsOptOutCustomers, and includeCustomersNames.
|
protected java.lang.String | getSQLSelect(boolean includeLogonId, boolean includeEmailsOptOutCustomers, int includeCustomersNames)
This method returns the SQL SELECT statement based on the input parameters includeLogonId, includeEmailsOptOutCustomers, and includeCustomersNames.
|
boolean | getStatus()
Returns the status of the command execution
|
void | performExecute()
This method performs the business logic for this command.
|
protected void | setFileHeader(java.lang.String fileHeader)
This method allows a user to overwrite the file header of the customer segment export file.
|
protected void | setInclude1stAdditionalADDRESScolumns(java.lang.String additionalADDRESScolumnsWithCommas)
This method allows quick customization of including additional ADDRESS table columns in the customer segment export.
|
protected void | setInclude2ndAdditionalUSERDEMOcolumns(java.lang.String additionalUSERDEMOcolumnsWithCommas)
This method allows quick customization of including additional USERDEMO table columns in the customer segment export.
|
protected void | setIncludeFileHeader(java.lang.Boolean includeFileHeader)
This method allows a user to set whether or not to include the header for the export file.
|
protected void | setIncludeLastAdditionalCustomTableColumns(java.lang.String customTableName, java.lang.String customTableColumnsWithCommas, java.lang.String customTableColumnWithRelationToAddressMemberID)
This method allows quick customization of including an additional custom table and its columns in the customer segment export.
|
protected void | setSQLOrderBy(java.lang.String sqlOrderBy)
This method allows a user to overwrite the SQL ORDER BY statement for customization scenario.
|
protected void | setSQLSelect(java.lang.String sqlSelect)
This method allows a user to overwrite the SQL SELECT statement for customization scenario.
|
protected void | updateBLOB(java.lang.Long uploadFileId, java.io.File file, java.sql.Connection connection)
Updates the FILECONTENT column of the UPLOADFILE table
|
public static final java.lang.String COPYRIGHT
public static final java.lang.String CLASSNAME
public void performExecute() throws ECException
public boolean getStatus()
protected java.lang.String getCustomerSegmentCustomersInfoExtractSQL() throws ECException
protected java.lang.String buildLine(java.lang.String code, int count) throws java.sql.SQLException
protected void extractCustomerSegmentCustomersInfo() throws ECException
protected void updateBLOB(java.lang.Long uploadFileId, java.io.File file, java.sql.Connection connection) throws ECException
protected java.lang.String compressFile(java.lang.String parentDir) throws ECException
protected void close()
protected java.sql.Connection getAuthoringConnection() throws ECException
protected java.sql.Connection getProductionConnection() throws ECException
protected java.lang.String getSQLSelect(boolean includeLogonId, boolean includeEmailsOptOutCustomers, int includeCustomersNames)
protected java.lang.String getSQLOrderBy(boolean includeLogonId, boolean includeEmailsOptOutCustomers, int includeCustomersNames)
protected java.lang.String getFileHeader(boolean includeLogonId, boolean includeEmailsOptOutCustomers, int includeCustomersNames)
protected void setSQLSelect(java.lang.String sqlSelect)
protected void setSQLOrderBy(java.lang.String sqlOrderBy)
protected void setFileHeader(java.lang.String fileHeader)
protected void setIncludeFileHeader(java.lang.Boolean includeFileHeader)
protected void setInclude1stAdditionalADDRESScolumns(java.lang.String additionalADDRESScolumnsWithCommas)
protected void setInclude2ndAdditionalUSERDEMOcolumns(java.lang.String additionalUSERDEMOcolumnsWithCommas)
protected void setIncludeLastAdditionalCustomTableColumns(java.lang.String customTableName, java.lang.String customTableColumnsWithCommas, java.lang.String customTableColumnWithRelationToAddressMemberID)