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
/**\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