/**
   * Construct a ImageMiddlewareImpl whit the values of the table record pass by parameter
   *
   * @param record with values from the table
   * @return ImageMiddlewareImpl setters the values from table
   */
  private ImageMiddlewareImpl constructFrom(DatabaseTableRecord record)
      throws FileNotFoundException, CantCreateFileException {

    /*
     * Construct object
     */
    ImageMiddlewareImpl imageMiddleware = new ImageMiddlewareImpl();
    imageMiddleware.setFileId(
        UUID.fromString(
            record.getStringValue(
                WalletPublisherMiddlewareDatabaseConstants
                    .SCREENS_SHOTS_COMPONENTS_FILE_ID_COLUMN_NAME)));
    imageMiddleware.setComponentId(
        UUID.fromString(
            record.getStringValue(
                WalletPublisherMiddlewareDatabaseConstants
                    .SCREENS_SHOTS_COMPONENTS_COMPONENT_ID_COLUMN_NAME)));
    imageMiddleware.setData(imageManager.loadImageFile(imageMiddleware.getFileId().toString()));

    return imageMiddleware;
  }
  /**
   * Construct a DatabaseTableRecord whit the values of the a imageImpl pass by parameter
   *
   * @param imageImpl the contains the values
   * @return DatabaseTableRecord whit the values
   */
  private DatabaseTableRecord constructFrom(ImageMiddlewareImpl imageImpl) {

    /*
     * Create the record to the entity
     */
    DatabaseTableRecord entityRecord = getDatabaseTable().getEmptyRecord();

    /*
     * Set the entity values
     */
    entityRecord.setStringValue(
        WalletPublisherMiddlewareDatabaseConstants.SCREENS_SHOTS_COMPONENTS_FILE_ID_COLUMN_NAME,
        imageImpl.getFileId().toString());
    entityRecord.setStringValue(
        WalletPublisherMiddlewareDatabaseConstants
            .SCREENS_SHOTS_COMPONENTS_COMPONENT_ID_COLUMN_NAME,
        imageImpl.getComponentId().toString());

    /*
     * return the new table record
     */
    return entityRecord;
  }