// Path: src/main/java/com/orange/clara/cloud/servicedbdumper/converter/MetadataConverter.java
// @Converter
// public class MetadataConverter implements AttributeConverter<Metadata, String> {
//     @Override
//     public String convertToDatabaseColumn(Metadata metadata) {
//         if (metadata == null) {
//             return null;
//         }
//         ObjectMapper objectMapper = new ObjectMapper();
//         try {
//             return objectMapper.writeValueAsString(metadata);
//         } catch (JsonProcessingException e) {
//             throw new RuntimeException(e.getMessage(), e);
//         }
//     }
// 
//     @Override
//     public Metadata convertToEntityAttribute(String metadataInJson) {
//         if (metadataInJson == null) {
//             return null;
//         }
//         ObjectMapper objectMapper = new ObjectMapper();
//         try {
//             return objectMapper.readValue(metadataInJson, Metadata.class);
//         } catch (IOException e) {
//             throw new RuntimeException(e.getMessage(), e);
//         }
//     }
// }


import com.orange.clara.cloud.servicedbdumper.converter.CryptoConverter;
import com.orange.clara.cloud.servicedbdumper.converter.MetadataConverter;
import javax.persistence.*;
import java.io.File;
import java.util.Calendar;
import java.util.Date;
    public DbDumperServiceInstance getDbDumperServiceInstance() {
        return dbDumperServiceInstance;
    }

    public void setDbDumperServiceInstance(DbDumperServiceInstance dbDumperServiceInstance) {
        this.dbDumperServiceInstance = dbDumperServiceInstance;
        dbDumperServiceInstance.addDatabaseDumpFile(this);
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getFileName() {
        return this.fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public void setFileName(File file) {
        this.fileName = file.getName();
    }

    public File getFile() {
// Path: src/main/java/com/orange/clara/cloud/servicedbdumper/converter/MetadataConverter.java
// @Converter
// public class MetadataConverter implements AttributeConverter<Metadata, String> {
//     @Override
//     public String convertToDatabaseColumn(Metadata metadata) {
//         if (metadata == null) {
//             return null;
//         }
//         ObjectMapper objectMapper = new ObjectMapper();
//         try {
//             return objectMapper.writeValueAsString(metadata);
//         } catch (JsonProcessingException e) {
//             throw new RuntimeException(e.getMessage(), e);
//         }
//     }
// 
//     @Override
//     public Metadata convertToEntityAttribute(String metadataInJson) {
//         if (metadataInJson == null) {
//             return null;
//         }
//         ObjectMapper objectMapper = new ObjectMapper();
//         try {
//             return objectMapper.readValue(metadataInJson, Metadata.class);
//         } catch (IOException e) {
//             throw new RuntimeException(e.getMessage(), e);
//         }
//     }
// }


// Path: src/main/java/com/orange/clara/cloud/servicedbdumper/model/DatabaseDumpFile.java
import com.orange.clara.cloud.servicedbdumper.converter.CryptoConverter;
import com.orange.clara.cloud.servicedbdumper.converter.MetadataConverter;
import javax.persistence.*;
import java.io.File;
import java.util.Calendar;
import java.util.Date;

    public DbDumperServiceInstance getDbDumperServiceInstance() {
        return dbDumperServiceInstance;
    }

    public void setDbDumperServiceInstance(DbDumperServiceInstance dbDumperServiceInstance) {
        this.dbDumperServiceInstance = dbDumperServiceInstance;
        dbDumperServiceInstance.addDatabaseDumpFile(this);
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getFileName() {
        return this.fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public void setFileName(File file) {
        this.fileName = file.getName();
    }

    public File getFile() {
        return new File(this.fileName);