- corrects all identifiers of db-objects to upper case

git-svn-id: https://svn.libreccm.org/ccm/ccm_ng@3610 8810af33-2d31-482b-a856-94f89814c4df
pull/2/head
tosmers 2015-09-10 17:17:17 +00:00
parent 3351579875
commit 75ceb5e2ce
6 changed files with 62 additions and 23 deletions

View File

@ -31,7 +31,7 @@ import java.util.Objects;
* @author <a href="mailto:tosmers@uni-bremen.de">Tobias Osmers</a> * @author <a href="mailto:tosmers@uni-bremen.de">Tobias Osmers</a>
*/ */
@Entity @Entity
@Table(schema = "ccm-docrepo", name = "blob_objects") @Table(schema = "CCM_DOCREPO", name = "BLOB_OBJECTS")
public class BlobObject implements Serializable { public class BlobObject implements Serializable {
private static final long serialVersionUID = -7468014879548796218L; private static final long serialVersionUID = -7468014879548796218L;
@ -40,14 +40,14 @@ public class BlobObject implements Serializable {
* necessary to define an additional ID on classes which extend this class. * necessary to define an additional ID on classes which extend this class.
*/ */
@Id @Id
@Column(name = "blob_object_id") @Column(name = "BLOB_OBJECT_ID")
@GeneratedValue(strategy = GenerationType.AUTO) @GeneratedValue(strategy = GenerationType.AUTO)
private long blobObjectId; private long blobObjectId;
/** /**
* The Content of the blob-object. * The Content of the blob-object.
*/ */
@Column(name = "content") @Column(name = "CONTENT")
@NotEmpty @NotEmpty
private Blob content; private Blob content;

View File

@ -19,8 +19,6 @@
package org.libreccm.docrepo; package org.libreccm.docrepo;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table; import javax.persistence.Table;
/** /**
@ -28,11 +26,7 @@ import javax.persistence.Table;
* @author <a href="mailto:tosmers@uni-bremen.de">Tobias Osmers</a> * @author <a href="mailto:tosmers@uni-bremen.de">Tobias Osmers</a>
*/ */
@Entity @Entity
@Table(schema = "ccm-docrepo", name = "files") @Table(schema = "CCM_DOCREPO", name = "FILES")
@NamedQueries({
@NamedQuery(name = "getFileRevisionBlob",
query = "")
})
public class File extends ResourceImpl { public class File extends ResourceImpl {
private static final long serialVersionUID = -504220783419811504L; private static final long serialVersionUID = -504220783419811504L;

View File

@ -26,7 +26,7 @@ import javax.persistence.Table;
* @author <a href="mailto:tosmers@uni-bremen.de">Tobias Osmers</a> * @author <a href="mailto:tosmers@uni-bremen.de">Tobias Osmers</a>
*/ */
@Entity @Entity
@Table(schema = "ccm-docrepo", name = "folders") @Table(schema = "CCM_DOCREPO", name = "FOLDERS")
public class Folder extends ResourceImpl { public class Folder extends ResourceImpl {
private static final long serialVersionUID = 1561466556458872622L; private static final long serialVersionUID = 1561466556458872622L;

View File

@ -28,7 +28,7 @@ import javax.persistence.Table;
* @author <a href="mailto:tosmers@uni-bremen.de">Tobias Osmers</a> * @author <a href="mailto:tosmers@uni-bremen.de">Tobias Osmers</a>
*/ */
@Entity @Entity
@Table(schema = "ccm-docrepo", name = "recent_updated_docs_portlets") @Table(schema = "CCM_DOCREPO", name = "RECENT_UPDATED_DOCS_PORTLETS")
public class RecentUpdatedDocsPortlet extends Portlet { public class RecentUpdatedDocsPortlet extends Portlet {
private static final long serialVersionUID = -4091024367070127101L; private static final long serialVersionUID = -4091024367070127101L;

View File

@ -22,8 +22,6 @@ import org.libreccm.web.Application;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table; import javax.persistence.Table;
/** /**
@ -31,18 +29,14 @@ import javax.persistence.Table;
* @author <a href="mailto:tosmers@uni-bremen.de">Tobias Osmers</a> * @author <a href="mailto:tosmers@uni-bremen.de">Tobias Osmers</a>
*/ */
@Entity @Entity
@Table(schema = "ccm-docrepo", name = "repositories") @Table(schema = "CCM_DOCREPO", name = "REPOSITORIES")
@NamedQueries({
@NamedQuery(name = "getRepositoryRoots",
query = "")
})
public class Repository extends Application { public class Repository extends Application {
private static final long serialVersionUID = 6673243021462798036L; private static final long serialVersionUID = 6673243021462798036L;
@Column(name = "root_id") @Column(name = "ROOT_ID")
private long rootId; private long rootId;
@Column(name = "owner_id") @Column(name = "OWNER_ID")
private long ownerId; private long ownerId;
public Repository() { public Repository() {

View File

@ -18,12 +18,63 @@
*/ */
package org.libreccm.docrepo; package org.libreccm.docrepo;
import java.io.Serializable; import org.hibernate.validator.constraints.NotBlank;
import org.libreccm.core.CcmObject;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import java.sql.Date;
/** /**
* *
* @author <a href="mailto:tosmers@uni-bremen.de">Tobias Osmers</a> * @author <a href="mailto:tosmers@uni-bremen.de">Tobias Osmers</a>
*/ */
public class ResourceImpl implements Serializable{ @Entity
@Table(schema = "CCM_DOCREPO", name = "RESOURCE_IMPL")
public class ResourceImpl extends CcmObject {
private static final long serialVersionUID = -910317798106611214L; private static final long serialVersionUID = -910317798106611214L;
@Column(name = "NAME")
@NotBlank
private String name;
@Column(name = "DESCRIPTION")
private String description;
@Column(name = "IS_FOLDER")
@NotBlank
private boolean isFolder;
@Column(name = "PATH")
@NotBlank
private String path;
@Column(name = "MIME_TYPE")
private String mimeType;
@Column(name = "SIZE")
private long size;
@Column(name = "CREATION_DATE")
@NotBlank
@Temporal(TemporalType.TIMESTAMP)
private Date creationDate;
@Column(name = "CREATION_IP")
private String creationIp;
@Column(name = "LAST_MODIFIED_DATE")
@NotBlank
@Temporal(TemporalType.TIMESTAMP)
private Date lastModifiedDate;
@Column(name = "LAST_MODIFIED_IP")
private String lastModifiedIp;
public ResourceImpl() {
super();
}
} }