Commit 6063bcaa authored by Matija Obreza's avatar Matija Obreza

Use default JPA names for tables and columns

parent a732d0e6
......@@ -43,7 +43,7 @@ import org.genesys.blocks.security.model.AclAwareModel;
*
* @author mobreza
*/
@Entity(name = "repositorygallery")
@Entity(name = "RepositoryGallery")
public class ImageGallery extends AuditedVersionedModel implements AclAwareModel, Copyable<ImageGallery> {
/** The Constant serialVersionUID. */
......@@ -53,7 +53,7 @@ public class ImageGallery extends AuditedVersionedModel implements AclAwareModel
* Each Gallery has a dedicated "path" in the file repository. A gallery "owns"
* a unique path in the repository.
*/
@Column(name = "path", nullable = false, unique = true)
@Column(nullable = false, unique = true)
private String path;
/**
......@@ -70,7 +70,7 @@ public class ImageGallery extends AuditedVersionedModel implements AclAwareModel
/** The images. */
@ManyToMany(cascade = { CascadeType.REFRESH })
@JoinTable(name = "repositorygalleryimage", joinColumns = @JoinColumn(name = "galleryId"), inverseJoinColumns = @JoinColumn(name = "imageId"))
@JoinTable(name = "RepositoryGalleryImage", joinColumns = @JoinColumn(name = "galleryId"), inverseJoinColumns = @JoinColumn(name = "imageId"))
@OrderColumn(name = "position")
private List<RepositoryImage> images;
......
......@@ -34,7 +34,7 @@ import org.genesys.filerepository.metadata.ImageMetadata;
* @author mobreza
*/
@Entity
@Table(name = "repositorydocument")
@Table
public class RepositoryDocument extends RepositoryFile implements DocumentMetadata {
/** The Constant serialVersionUID. */
......
......@@ -48,7 +48,7 @@ import org.hibernate.annotations.Type;
* The RepositoryFile.
*/
@Entity
@Table(name = "repositoryfile",
@Table(name = "RepositoryFile",
// indexes
indexes = { @Index(unique = false, columnList = "path", name = "IX_repoFile_path") }
// unique
......@@ -62,74 +62,76 @@ public class RepositoryFile extends AuditedVersionedModelWithoutId implements Ac
/** The id. */
@Id
@GeneratedValue(strategy = GenerationType.TABLE)
@Column(name = "id", unique = true, nullable = false, length = 20)
@Column(unique = true, nullable = false, length = 20)
private Long id = InMemoryIdGenerator.nextId();
/** The uuid. */
@Column(name = "uuid", unique = true, nullable = false, updatable = false)
@Column(unique = true, nullable = false, updatable = false)
@Type(type = "uuid-binary")
private UUID uuid;
/** The path. */
// Path in the repository
@Column(name = "path", nullable = false)
@Column(nullable = false)
private String path;
/** The original filename as provided by the end user. */
@Column(name = "originalFilename", nullable = false)
@Column(nullable = false)
private String originalFilename;
/** Extension based on originalFilename. */
@Column(name = "extension")
@Column(length = 50)
private String extension;
/** The title. */
@Column(name = "title")
@Column(length = 200)
private String title;
/** The subject. */
@Column(name = "subject")
@Column
@Lob
private String subject;
/** The description. */
@Column(name = "description")
@Column
@Lob
private String description;
/** The creator. */
@Column(name = "creator")
@Column(length = 200)
private String creator;
/** The created. */
@Column(name = "created")
@Column(length = 200)
private String created;
/** The rights holder. */
@Column(name = "rightsHolder")
@Column(length = 200)
private String rightsHolder;
/** The access rights. */
@Column(name = "accessRights")
@Column(length = 200)
private String accessRights;
/** The license. */
@Column(name = "license")
@Column(length = 50)
private String license;
/** The content type. */
@Column(name = "contentType")
@Column(length = 200)
private String contentType;
/** The extent. */
@Column(name = "extent")
@Column(length = 200)
private String extent;
/** The bibliographic citation. */
@Column(name = "bibliographicCitation")
@Column
@Lob
private String bibliographicCitation;
/** URL where the resource was originally retrieved from. */
@Column(length = 400, nullable = true)
@Column(length = 500)
private String originalUrl;
/**
......
......@@ -35,18 +35,18 @@ import org.genesys.filerepository.metadata.ImageMetadata;
* @author mobreza
*/
@Entity
@Table(name = "repositoryimage")
@Table
public class RepositoryImage extends RepositoryFile implements ImageMetadata {
/** The Constant serialVersionUID. */
private static final long serialVersionUID = 5822511953635202374L;
/** The width. */
@Column(name = "width")
@Column
private int width;
/** The height. */
@Column(name = "height")
@Column
private int height;
/** The orientation. */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment