package com.libreecm.commonAPI.model.objects;


import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.libreecm.commonAPI.model.enums.BaseTypeId;
import com.libreecm.commonAPI.model.enums.PropertyIds;


@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
public class Item extends LibreECMDataObject {

	/**
	 * 
	 */
	private static final long serialVersionUID = 7281033100231790689L;
	private Boolean immutable;
	private Boolean includedInSupertypeQuery;

		
	public Item(){
		super();
		//For jackson, setObjectType SHOULD be called first
		super.setObjectType(new ItemObjectType());
		super.setBaseTypeId(BaseTypeId.CMIS_ITEM);
	}
	

	public Item(Uri uri, ObjectType objectType){
		super(uri, objectType);
	}


	
	/**
	 * @return the isImmutable
	 */
	public Boolean isImmutable() {
		return immutable;
	}


	/**
	 * @return the isIncludedInSupertypeQuery
	 */
	public Boolean isIncludedInSupertypeQuery() {
		return includedInSupertypeQuery;
	}


	/**
	 * @param isImmutable the isImmutable to set
	 */
	public void setImmutable(Boolean isImmutable) {
		if (isImmutable== null) return;
		addBooleanProperty(PropertyIds.IS_IMMUTABLE, isImmutable);
		this.immutable = isImmutable;
	}

	/**
	 * @param isIncludedInSupertypeQuery the isIncludedInSupertypeQuery to set
	 */
	public void setIncludedInSupertypeQuery(Boolean isIncludedInSupertypeQuery) {
		if (isIncludedInSupertypeQuery == null) return;
		addBooleanProperty("cmis:includedInSupertypeQuery", isIncludedInSupertypeQuery);
		this.includedInSupertypeQuery = isIncludedInSupertypeQuery;
	}

}
