]> SALOME platform Git repositories - tools/siman.git/blobdiff - Workspace/Siman-Common/src/org/splat/service/dto/FileDTO.java
Salome HOME
File id is added to the checked out info.
[tools/siman.git] / Workspace / Siman-Common / src / org / splat / service / dto / FileDTO.java
index 99405b640ab0855492febe49fd421aa30f8715b1..4a679caf24b052ee534a8907323d793d28313cac 100644 (file)
@@ -15,6 +15,10 @@ package org.splat.service.dto;
  */
 public class FileDTO {
 
+       /**
+        * File persistent id.
+        */
+       private Long _id;
        /**
         * True if the file is a result file for a document.
         */
@@ -35,6 +39,8 @@ public class FileDTO {
        /**
         * Constructor with initialization.
         * 
+        * @param id
+        *            file persistent id
         * @param relativePath
         *            relative file path
         * @param state
@@ -44,14 +50,15 @@ public class FileDTO {
         * @param isResult
         *            true if the file is result
         */
-       public FileDTO(final String relativePath, final char state,
+       public FileDTO(final long id, final String relativePath, final char state,
                        final String processing, final boolean isResult) {
+               _id = id;
                _path = relativePath;
                _state = state;
                _processing = processing;
                _isResult = isResult;
        }
-       
+
        /**
         * Constructor with partial initialization.
         * 
@@ -156,10 +163,30 @@ public class FileDTO {
                        fstate = "file-outdated";
                }
                buf.append(indent).append(ftype).append(" file: ").append(getPath())
-                               .append('\n').append(indent).append(
+                               .append('\n').append(indent).append("    File ID: ").append(
+                                               getId()).append('\n').append(indent).append(
                                                "    Automatic processing: ").append(getProcessing())
                                .append('\n').append(indent).append("    State: ").append(
                                                fstate).append('\n');
                return buf.toString();
        }
+
+       /**
+        * Get the id.
+        * 
+        * @return the id
+        */
+       public Long getId() {
+               return _id;
+       }
+
+       /**
+        * Set the id.
+        * 
+        * @param id
+        *            the id to set
+        */
+       public void setId(final Long id) {
+               _id = id;
+       }
 }