Use exponential backoff when updating the password or last login time in WebDAV.
[pithos] / src / gr / ebs / gss / server / domain / FileHeader.java
index 6523c94..6c528f6 100644 (file)
@@ -38,12 +38,19 @@ import javax.persistence.JoinColumn;
 import javax.persistence.ManyToOne;\r
 import javax.persistence.OneToMany;\r
 import javax.persistence.OrderBy;\r
+import javax.persistence.Table;\r
+import javax.persistence.UniqueConstraint;\r
 import javax.persistence.Version;\r
 \r
+import org.hibernate.annotations.Cache;\r
+import org.hibernate.annotations.CacheConcurrencyStrategy;\r
+\r
 /**\r
  * The immutable part of the structure of a file on the GSS service.\r
  */\r
 @Entity\r
+@Table(name="fileheader", uniqueConstraints=@UniqueConstraint(columnNames={"folder_id", "name"}))\r
+@Cache(usage=CacheConcurrencyStrategy.READ_WRITE)\r
 public final class FileHeader  implements Serializable{\r
 \r
        /**\r
@@ -74,13 +81,14 @@ public final class FileHeader  implements Serializable{
        /**\r
         * The file name.\r
         */\r
+       @Column(name="name")\r
        private String name;\r
 \r
        /**\r
         * The parent folder of this file.\r
         */\r
        @ManyToOne(optional=false)\r
-       @JoinColumn(nullable=false)\r
+       @JoinColumn(name="folder_id", nullable=false)\r
        private Folder folder;\r
 \r
        /**\r