OpenConcerto

Dépôt officiel du code source de l'ERP OpenConcerto
sonarqube

svn://code.openconcerto.org/openconcerto

Rev

Rev 149 | Rev 180 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 149 Rev 156
Line 13... Line 13...
13
 
13
 
14
 package org.openconcerto.erp.core.edm;
14
 package org.openconcerto.erp.core.edm;
15
 
15
 
16
import org.openconcerto.sql.model.SQLRowValues;
16
import org.openconcerto.sql.model.SQLRowValues;
17
 
17
 
-
 
18
import java.io.File;
18
import java.io.Serializable;
19
import java.io.Serializable;
19
 
20
 
20
public class Attachment implements Serializable {
21
public class Attachment implements Serializable {
21
    private final int id;
22
    private final int id;
22
    private String name;
23
    private String name;
Line 35... Line 36...
35
        this.id = rowAttachment.getID();
36
        this.id = rowAttachment.getID();
36
        this.name = rowAttachment.getString("NAME");
37
        this.name = rowAttachment.getString("NAME");
37
        this.mimeType = rowAttachment.getString("MIMETYPE");
38
        this.mimeType = rowAttachment.getString("MIMETYPE");
38
        this.fileName = rowAttachment.getString("FILENAME");
39
        this.fileName = rowAttachment.getString("FILENAME");
39
        this.fileSize = rowAttachment.getInt("FILESIZE");
40
        this.fileSize = rowAttachment.getInt("FILESIZE");
40
        this.storagePath = rowAttachment.getString("STORAGE_PATH");
41
        this.storagePath = rowAttachment.getString("STORAGE_PATH").replace('\\', File.separatorChar);
41
        this.storageFileName = rowAttachment.getString("STORAGE_FILENAME");
42
        this.storageFileName = rowAttachment.getString("STORAGE_FILENAME");
42
        this.sourceTable = rowAttachment.getString("SOURCE_TABLE");
43
        this.sourceTable = rowAttachment.getString("SOURCE_TABLE");
43
        this.sourceId = rowAttachment.getInt("SOURCE_ID");
44
        this.sourceId = rowAttachment.getInt("SOURCE_ID");
44
        this.parentId = rowAttachment.getInt("ID_PARENT");
45
        this.parentId = rowAttachment.getInt("ID_PARENT");
45
    }
46
    }