[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;
|
||||
|
||||
/**
|
||||
* 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>
|
||||
*/
|
||||
@Entity
|
||||
@Table(schema = "CCM_DOCREPO", name = "BLOB_OBJECTS")
|
||||
public class BlobObject implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -7468014879548796218L;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -22,12 +22,15 @@ import javax.persistence.Entity;
|
|||
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>
|
||||
*/
|
||||
@Entity
|
||||
@Table(schema = "CCM_DOCREPO", name = "FILES")
|
||||
public class File extends ResourceImpl {
|
||||
|
||||
private static final long serialVersionUID = -504220783419811504L;
|
||||
|
||||
public File() {
|
||||
|
|
|
|||
|
|
@ -22,12 +22,15 @@ import javax.persistence.Entity;
|
|||
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>
|
||||
*/
|
||||
@Entity
|
||||
@Table(schema = "CCM_DOCREPO", name = "FOLDERS")
|
||||
public class Folder extends ResourceImpl {
|
||||
|
||||
private static final long serialVersionUID = 1561466556458872622L;
|
||||
|
||||
public Folder() {
|
||||
|
|
|
|||
|
|
@ -24,15 +24,19 @@ import javax.persistence.Entity;
|
|||
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>
|
||||
*/
|
||||
@Entity
|
||||
@Table(schema = "CCM_DOCREPO", name = "RECENT_UPDATED_DOCS_PORTLETS")
|
||||
public class RecentUpdatedDocsPortlet extends Portlet {
|
||||
@Table(schema = "CCM_DOCREPO", name = "REC_UPD_DOCS_PORTLETS")
|
||||
public class RecUpdDocsPortlet extends Portlet {
|
||||
|
||||
private static final long serialVersionUID = -4091024367070127101L;
|
||||
|
||||
public RecentUpdatedDocsPortlet() {
|
||||
public RecUpdDocsPortlet() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
|
@ -25,17 +25,26 @@ import javax.persistence.Entity;
|
|||
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>
|
||||
*/
|
||||
@Entity
|
||||
@Table(schema = "CCM_DOCREPO", name = "REPOSITORIES")
|
||||
public class Repository extends Application {
|
||||
|
||||
private static final long serialVersionUID = 6673243021462798036L;
|
||||
|
||||
/**
|
||||
* The root of the repository.
|
||||
*/
|
||||
@Column(name = "ROOT_ID")
|
||||
private long rootId;
|
||||
|
||||
/**
|
||||
* The owner of the repository.
|
||||
*/
|
||||
@Column(name = "OWNER_ID")
|
||||
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>
|
||||
*/
|
||||
@Entity
|
||||
@Table(schema = "CCM_DOCREPO", name = "RESOURCE_IMPL")
|
||||
public class ResourceImpl extends CcmObject {
|
||||
public abstract class ResourceImpl extends CcmObject {
|
||||
|
||||
private static final long serialVersionUID = -910317798106611214L;
|
||||
|
||||
/**
|
||||
* Name of the resource.
|
||||
*/
|
||||
@Column(name = "NAME")
|
||||
@NotBlank
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* Description of the resource.
|
||||
*/
|
||||
@Column(name = "DESCRIPTION")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* Flag, wheather the resource is a folder or not.
|
||||
*/
|
||||
@Column(name = "IS_FOLDER")
|
||||
@NotBlank
|
||||
private boolean isFolder;
|
||||
|
||||
/**
|
||||
* Path to the resource
|
||||
*/
|
||||
@Column(name = "PATH")
|
||||
@NotBlank
|
||||
private String path;
|
||||
|
||||
/**
|
||||
* Mime-type of the resource
|
||||
*/
|
||||
@Column(name = "MIME_TYPE")
|
||||
private String mimeType;
|
||||
|
||||
/**
|
||||
* Size of the resource.
|
||||
*/
|
||||
@Column(name = "SIZE")
|
||||
private long size;
|
||||
|
||||
/**
|
||||
* Creation date of the resource.
|
||||
*/
|
||||
@Column(name = "CREATION_DATE")
|
||||
@NotBlank
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
private Date creationDate;
|
||||
|
||||
/**
|
||||
* Creation ip of the resource.
|
||||
*/
|
||||
@Column(name = "CREATION_IP")
|
||||
private String creationIp;
|
||||
|
||||
/**
|
||||
* Date of the latest modification of the resource.
|
||||
*/
|
||||
@Column(name = "LAST_MODIFIED_DATE")
|
||||
@NotBlank
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
private Date lastModifiedDate;
|
||||
|
||||
/**
|
||||
* Ip of the latest modification of the resource.
|
||||
*/
|
||||
@Column(name = "LAST_MODIFIED_IP")
|
||||
private String lastModifiedIp;
|
||||
|
||||
public ResourceImpl() {
|
||||
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