/**
 * This class is generated by jOOQ
 */
package org.openforis.calc.persistence.jooq.tables.daos;


import java.util.List;

import javax.annotation.Generated;

import org.jooq.Configuration;
import org.jooq.impl.DAOImpl;
import org.openforis.calc.engine.ParameterMap;
import org.openforis.calc.engine.Worker.Status;
import org.openforis.calc.persistence.jooq.tables.ProcessingChainTable;
import org.openforis.calc.persistence.jooq.tables.records.ProcessingChainRecord;


import org.openforis.calc.chain.ProcessingChain;
/**
 * This class is generated by jOOQ.
 */
@Generated(
	value = {
		"http://www.jooq.org",
		"jOOQ version:3.6.2"
	},
	comments = "This class is generated by jOOQ"
)
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class ProcessingChainDao extends DAOImpl<ProcessingChainRecord, ProcessingChain, Integer> {

	/**
	 * Create a new ProcessingChainDao without any configuration
	 */
	public ProcessingChainDao() {
		super(ProcessingChainTable.PROCESSING_CHAIN, ProcessingChain.class);
	}

	/**
	 * Create a new ProcessingChainDao with an attached configuration
	 */
	public ProcessingChainDao(Configuration configuration) {
		super(ProcessingChainTable.PROCESSING_CHAIN, ProcessingChain.class, configuration);
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	protected Integer getId(ProcessingChain object) {
		return object.getId();
	}

	/**
	 * Fetch records that have <code>id IN (values)</code>
	 */
	public List<ProcessingChain> fetchById(Integer... values) {
		return fetch(ProcessingChainTable.PROCESSING_CHAIN.ID, values);
	}

	/**
	 * Fetch a unique record that has <code>id = value</code>
	 */
	public ProcessingChain fetchOneById(Integer value) {
		return fetchOne(ProcessingChainTable.PROCESSING_CHAIN.ID, value);
	}

	/**
	 * Fetch records that have <code>workspace_id IN (values)</code>
	 */
	public List<ProcessingChain> fetchByWorkspaceId(Integer... values) {
		return fetch(ProcessingChainTable.PROCESSING_CHAIN.WORKSPACE_ID, values);
	}

	/**
	 * Fetch records that have <code>parameters IN (values)</code>
	 */
	public List<ProcessingChain> fetchByParameters(ParameterMap... values) {
		return fetch(ProcessingChainTable.PROCESSING_CHAIN.PARAMETERS, values);
	}

	/**
	 * Fetch records that have <code>caption IN (values)</code>
	 */
	public List<ProcessingChain> fetchByCaption(String... values) {
		return fetch(ProcessingChainTable.PROCESSING_CHAIN.CAPTION, values);
	}

	/**
	 * Fetch records that have <code>description IN (values)</code>
	 */
	public List<ProcessingChain> fetchByDescription(String... values) {
		return fetch(ProcessingChainTable.PROCESSING_CHAIN.DESCRIPTION, values);
	}

	/**
	 * Fetch records that have <code>status IN (values)</code>
	 */
	public List<ProcessingChain> fetchByStatus(Status... values) {
		return fetch(ProcessingChainTable.PROCESSING_CHAIN.STATUS, values);
	}

	/**
	 * Fetch records that have <code>common_script IN (values)</code>
	 */
	public List<ProcessingChain> fetchByCommonScript(String... values) {
		return fetch(ProcessingChainTable.PROCESSING_CHAIN.COMMON_SCRIPT, values);
	}
}
