[UPDATE]
- adds javadoc to the entity classes of docrepo - adds missing getter setter to the entity classes of docrepo git-svn-id: https://svn.libreccm.org/ccm/ccm_ng@3634 8810af33-2d31-482b-a856-94f89814c4dfpull/2/head
parent
8abb9f6ddc
commit
5146d1611e
|
|
@ -27,12 +27,15 @@ import java.sql.Blob;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Entity class for a blob object in the doc-repository. Instances of this class
|
||||||
|
* will be persisted into the database.
|
||||||
*
|
*
|
||||||
* @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;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -22,12 +22,15 @@ import javax.persistence.Entity;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Entity class for a file in the doc-repository. Instances will be persisted
|
||||||
|
* into the database. Instance variables are inherited from {@link ResourceImpl}.
|
||||||
*
|
*
|
||||||
* @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")
|
||||||
public class File extends ResourceImpl {
|
public class File extends ResourceImpl {
|
||||||
|
|
||||||
private static final long serialVersionUID = -504220783419811504L;
|
private static final long serialVersionUID = -504220783419811504L;
|
||||||
|
|
||||||
public File() {
|
public File() {
|
||||||
|
|
|
||||||
|
|
@ -22,12 +22,15 @@ import javax.persistence.Entity;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Entity class of a folder in the doc-repository. Instances will be persisted
|
||||||
|
* into the database. Instance variables are inherited from {@link ResourceImpl}.
|
||||||
*
|
*
|
||||||
* @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;
|
||||||
|
|
||||||
public Folder() {
|
public Folder() {
|
||||||
|
|
|
||||||
|
|
@ -24,15 +24,19 @@ import javax.persistence.Entity;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Entity class for a portlet of recent updated documents in the doc-repository.
|
||||||
|
* Instances will be persisted into the database. Instance variables are inherited
|
||||||
|
* form {@link Portlet}.
|
||||||
*
|
*
|
||||||
* @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 = "REC_UPD_DOCS_PORTLETS")
|
||||||
public class RecentUpdatedDocsPortlet extends Portlet {
|
public class RecUpdDocsPortlet extends Portlet {
|
||||||
|
|
||||||
private static final long serialVersionUID = -4091024367070127101L;
|
private static final long serialVersionUID = -4091024367070127101L;
|
||||||
|
|
||||||
public RecentUpdatedDocsPortlet() {
|
public RecUpdDocsPortlet() {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -25,17 +25,26 @@ import javax.persistence.Entity;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Entity class of a repository for documents. Instances will be persisted into the
|
||||||
|
* database. Instance variables are inherited from {@link Application}.
|
||||||
*
|
*
|
||||||
* @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")
|
||||||
public class Repository extends Application {
|
public class Repository extends Application {
|
||||||
|
|
||||||
private static final long serialVersionUID = 6673243021462798036L;
|
private static final long serialVersionUID = 6673243021462798036L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The root of the repository.
|
||||||
|
*/
|
||||||
@Column(name = "ROOT_ID")
|
@Column(name = "ROOT_ID")
|
||||||
private long rootId;
|
private long rootId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The owner of the repository.
|
||||||
|
*/
|
||||||
@Column(name = "OWNER_ID")
|
@Column(name = "OWNER_ID")
|
||||||
private long ownerId;
|
private long ownerId;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,52 +31,172 @@ import javax.persistence.TemporalType;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Abstract entity class of a resource. Instances will be persisted into the
|
||||||
|
* database through the inheriting subclasses.
|
||||||
|
*
|
||||||
|
* The inheriting subclasses and therefore resources are: {@link File},
|
||||||
|
* {@link Folder}
|
||||||
*
|
*
|
||||||
* @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 = "RESOURCE_IMPL")
|
@Table(schema = "CCM_DOCREPO", name = "RESOURCE_IMPL")
|
||||||
public class ResourceImpl extends CcmObject {
|
public abstract class ResourceImpl extends CcmObject {
|
||||||
|
|
||||||
private static final long serialVersionUID = -910317798106611214L;
|
private static final long serialVersionUID = -910317798106611214L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Name of the resource.
|
||||||
|
*/
|
||||||
@Column(name = "NAME")
|
@Column(name = "NAME")
|
||||||
@NotBlank
|
@NotBlank
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Description of the resource.
|
||||||
|
*/
|
||||||
@Column(name = "DESCRIPTION")
|
@Column(name = "DESCRIPTION")
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Flag, wheather the resource is a folder or not.
|
||||||
|
*/
|
||||||
@Column(name = "IS_FOLDER")
|
@Column(name = "IS_FOLDER")
|
||||||
@NotBlank
|
@NotBlank
|
||||||
private boolean isFolder;
|
private boolean isFolder;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Path to the resource
|
||||||
|
*/
|
||||||
@Column(name = "PATH")
|
@Column(name = "PATH")
|
||||||
@NotBlank
|
@NotBlank
|
||||||
private String path;
|
private String path;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Mime-type of the resource
|
||||||
|
*/
|
||||||
@Column(name = "MIME_TYPE")
|
@Column(name = "MIME_TYPE")
|
||||||
private String mimeType;
|
private String mimeType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Size of the resource.
|
||||||
|
*/
|
||||||
@Column(name = "SIZE")
|
@Column(name = "SIZE")
|
||||||
private long size;
|
private long size;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creation date of the resource.
|
||||||
|
*/
|
||||||
@Column(name = "CREATION_DATE")
|
@Column(name = "CREATION_DATE")
|
||||||
@NotBlank
|
@NotBlank
|
||||||
@Temporal(TemporalType.TIMESTAMP)
|
@Temporal(TemporalType.TIMESTAMP)
|
||||||
private Date creationDate;
|
private Date creationDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creation ip of the resource.
|
||||||
|
*/
|
||||||
@Column(name = "CREATION_IP")
|
@Column(name = "CREATION_IP")
|
||||||
private String creationIp;
|
private String creationIp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Date of the latest modification of the resource.
|
||||||
|
*/
|
||||||
@Column(name = "LAST_MODIFIED_DATE")
|
@Column(name = "LAST_MODIFIED_DATE")
|
||||||
@NotBlank
|
@NotBlank
|
||||||
@Temporal(TemporalType.TIMESTAMP)
|
@Temporal(TemporalType.TIMESTAMP)
|
||||||
private Date lastModifiedDate;
|
private Date lastModifiedDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Ip of the latest modification of the resource.
|
||||||
|
*/
|
||||||
@Column(name = "LAST_MODIFIED_IP")
|
@Column(name = "LAST_MODIFIED_IP")
|
||||||
private String lastModifiedIp;
|
private String lastModifiedIp;
|
||||||
|
|
||||||
public ResourceImpl() {
|
public ResourceImpl() {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//> Begin GETTER & SETTER
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescription() {
|
||||||
|
return description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescription(String description) {
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isFolder() {
|
||||||
|
return isFolder;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIsFolder(boolean isFolder) {
|
||||||
|
this.isFolder = isFolder;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPath() {
|
||||||
|
return path;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPath(String path) {
|
||||||
|
this.path = path;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMimeType() {
|
||||||
|
return mimeType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMimeType(String mimeType) {
|
||||||
|
this.mimeType = mimeType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getSize() {
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSize(long size) {
|
||||||
|
this.size = size;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getCreationDate() {
|
||||||
|
return creationDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreationDate(Date creationDate) {
|
||||||
|
this.creationDate = creationDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreationIp() {
|
||||||
|
return creationIp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreationIp(String creationIp) {
|
||||||
|
this.creationIp = creationIp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getLastModifiedDate() {
|
||||||
|
return lastModifiedDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLastModifiedDate(Date lastModifiedDate) {
|
||||||
|
this.lastModifiedDate = lastModifiedDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLastModifiedIp() {
|
||||||
|
return lastModifiedIp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLastModifiedIp(String lastModifiedIp) {
|
||||||
|
this.lastModifiedIp = lastModifiedIp;
|
||||||
|
}
|
||||||
|
|
||||||
|
//< End GETTER & SETTER
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue