
com.formkiq.server.domain.FolderAccess Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of formkiq-server Show documentation
Show all versions of formkiq-server Show documentation
Server-side integration for the FormKiQ ios application
package com.formkiq.server.domain;
import java.util.Date;
import java.util.List;
import java.util.UUID;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import org.apache.commons.lang3.StringUtils;
import org.hibernate.annotations.Type;
import com.formkiq.server.domain.type.FolderPermission;
import com.formkiq.server.domain.type.FolderStatus;
/**
* Access Control for Folders Domain.
*
*/
@Entity
@Table(name = "folders_access")
public class FolderAccess {
/** identifier column. */
@Id
@Column(name = "folder_access_id", unique = true, columnDefinition = "uuid")
@Type(type = "pg-uuid")
private UUID folderaccessid;
/** User ID Column. */
@NotNull
@Column(name = "user_id", nullable = false, columnDefinition = "uuid")
@Type(type = "pg-uuid")
private UUID userid;
/** Folder ID column. */
@NotNull
@Column(name = "folder_id", nullable = false, columnDefinition = "uuid")
@Type(type = "pg-uuid")
private UUID folderid;
/** Permissions, comma delimited. */
@NotNull
@Column(name = "permissions", nullable = false)
private String permissions;
/** status type column. */
@NotNull
@Enumerated(EnumType.STRING)
@Column(name = "status", nullable = false)
private FolderStatus status;
/** inserted column. */
@NotNull
@Column(name = "inserted_date", nullable = false)
private Date insertedDate;
/** updated column. */
@NotNull
@Column(name = "updated_date", nullable = false)
private Date updatedDate;
/**
* constructor.
*/
public FolderAccess() {
}
/**
* @return {@link UUID}
*/
public UUID getFolderaccessid() {
return this.folderaccessid;
}
/**
* @param folderaccess {@link UUID}
*/
public void setFolderaccessid(final UUID folderaccess) {
this.folderaccessid = folderaccess;
}
/**
* @return {@link UUID}
*/
public UUID getUserid() {
return this.userid;
}
/**
* @param user {@link UUID}
*/
public void setUserid(final UUID user) {
this.userid = user;
}
/**
* @return {@link UUID}
*/
public UUID getFolderid() {
return this.folderid;
}
/**
* @param folder {@link String}
*/
public void setFolderid(final UUID folder) {
this.folderid = folder;
}
/**
* @return {@link String}
*/
public String getPermissions() {
return this.permissions;
}
/**
* @param perms {@link String}
*/
public void setPermissions(final String perms) {
this.permissions = perms;
}
/**
* @param list {@link List}
*/
public void setPermissions(final List list) {
this.permissions = StringUtils.join(list, ",");
}
/**
* @return {@link Date}
*/
public Date getInsertedDate() {
return this.insertedDate != null ? (Date) this.insertedDate.clone()
: null;
}
/**
* @param date {@link Date}
*/
public void setInsertedDate(final Date date) {
this.insertedDate = date != null ? (Date) date.clone() : null;
}
/**
* @return {@link Date}
*/
public Date getUpdatedDate() {
return this.updatedDate != null ? (Date) this.updatedDate.clone()
: null;
}
/**
* @param date {@link Date}
*/
public void setUpdatedDate(final Date date) {
this.updatedDate = date != null ? (Date) date.clone() : null;
}
/**
* @return {@link FolderStatus}
*/
public FolderStatus getStatus() {
return this.status;
}
/**
* @param folderstatus {@link FolderStatus}
*/
public void setStatus(final FolderStatus folderstatus) {
this.status = folderstatus;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy