com.formkiq.server.domain.ClientForm 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 javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Type;
import org.hibernate.annotations.TypeDef;
import org.hibernate.annotations.TypeDefs;
import com.formkiq.server.domain.type.StringJsonUserType;
/**
* Form Log domain.
*
*/
@Entity
@Table(name = "client_forms")
@TypeDefs({
@TypeDef(name = "StringJsonObject", typeClass = StringJsonUserType.class)
})
public class ClientForm implements AssetHolder {
/** identifier column. */
@Id
@GeneratedValue(generator = "system-uuid")
@GenericGenerator(name = "system-uuid", strategy = "uuid")
@Column(name = "client_form_id", unique = true,
columnDefinition = "uuid")
private String clientFormId;
/** Client ID column. */
@NotNull
@Column(name = "client_id", nullable = false)
private String clientid;
/** Parent UUID column. */
@Column(name = "parent_uuid", nullable = false)
private String parentUUID;
/** Form ID column. */
@NotNull
@Column(name = "form_id", nullable = false)
private String formid;
/** SHA1 Hash column. */
@NotNull
@Column(name = "sha1_hash", nullable = false)
private String sha1hash;
/** Asset ID column. */
@NotNull
@Column(name = "asset_id", nullable = false)
private String assetid;
/** JSON data. */
@Type(type = "StringJsonObject")
@NotNull
@Column(name = "data", nullable = false, columnDefinition = "jsonb")
private String data;
/** inserted column. */
@NotNull
@Column(name = "inserted_date", nullable = false)
private Date insertedDate;
/** updated column. */
@NotNull
@Column(name = "updated_date", nullable = false)
private Date updatedDate;
/**
* default constructor.
*/
public ClientForm() {
}
/**
* @return {@link String}
*/
public String getFormid() {
return this.formid;
}
/**
* @param id {@link String}
*/
public void setFormid(final String id) {
this.formid = id;
}
/**
* @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 byte[]
*/
public String getSha1hash() {
return this.sha1hash;
}
/**
* @param hash byte[]
*/
@Override
public void setSha1hash(final String hash) {
this.sha1hash = hash;
}
/**
* @return {@link String}
*/
@Override
public String getAssetid() {
return this.assetid;
}
/**
* @param asset {@link String}
*/
@Override
public void setAssetid(final String asset) {
this.assetid = asset;
}
/**
* @return {@link String}
*/
public String getClientid() {
return this.clientid;
}
/**
* @param id {@link String}
*/
public void setClientid(final String id) {
this.clientid = id;
}
/**
* @return {@link String}
*/
public String getClientFormId() {
return this.clientFormId;
}
/**
* @param clientForm {@link String}
*/
public void setClientFormId(final String clientForm) {
this.clientFormId = clientForm;
}
/**
* @return {@link String}
*/
public String getData() {
return this.data;
}
/**
* @param string {@link String}
*/
public void setData(final String string) {
this.data = string;
}
/**
* @return {@link String}
*/
public String getParentUUID() {
return this.parentUUID;
}
/**
* @param parent {@link String}
*/
public void setParentUUID(final String parent) {
this.parentUUID = parent;
}
}