package com.libreecm.db.jpa;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;

import org.hibernate.annotations.GenericGenerator;

@Entity
public class TypeMutability {

	@Id
	@GeneratedValue(generator="hilo-gen")
	@GenericGenerator(name="hilo-gen", strategy="hilo")
	private Integer id;
	
    private Boolean canCreate;
	private Boolean canUpdate;
	private Boolean canDelete;
	
	public String getId() {
		if (id==null)
			return null;
		return id.toString();
	}
	
	public void setId(String id) {
		this.id = Integer.parseInt(id);
	}
	
public TypeMutability(){
}
	/**
     * Indicates if a sub type of this type can be created.
     * 
     * @return <code>true</code> if a sub type can be created,
     *         <code>false</code> otherwise
     * 
     * @cmis 1.1
     */
    public Boolean canCreate(){
    	return this.canCreate;
    }

    /**
     * Indicates if this type can be updated.
     * 
     * @return <code>true</code> if this type can be updated, <code>false</code>
     *         otherwise
     * 
     * @cmis 1.1
     */
    public Boolean canUpdate(){
    	return this.canUpdate;
    }

    /**
     * Indicates if this type can be deleted.
     * 
     * @return <code>true</code> if this type can be deleted, <code>false</code>
     *         otherwise
     * 
     * @cmis 1.1
     */
    public Boolean canDelete(){
    	return this.canDelete;
    }
}
