001/** 002 * Copyright 2005-2016 The Kuali Foundation 003 * 004 * Licensed under the Educational Community License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/ecl2.php 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.kuali.rice.kew.doctype.dao; 017 018import java.util.Collection; 019import java.util.List; 020 021import org.kuali.rice.kew.doctype.bo.DocumentType; 022import org.kuali.rice.kew.rule.bo.RuleAttribute; 023 024 025/** 026 * @author Kuali Rice Team (rice.collab@kuali.org) 027 */ 028public interface DocumentTypeDAO { 029 030 public DocumentType findById(String docTypeId); 031 032 public DocumentType findByName(String name); // docType is case sensitive by default 033 034 public DocumentType findByName(String name, boolean caseSensitive); 035 036 public void save(DocumentType documentType); 037 038 public Collection<DocumentType> find(DocumentType documentType, DocumentType docTypeParentName, boolean climbHierarchy); 039 040 public void delete(DocumentType documentType); 041 042 public List findByDocumentId(String documentId); 043 044 public Integer getMaxVersionNumber(String docTypeName); 045 046 public List findAllCurrentRootDocuments(); 047 048 public List findAllCurrent(); 049 050 public List findAllCurrentByName(String name); 051 052 public List<DocumentType> findPreviousInstances(String documentTypeName); 053 054 public List<String> getChildDocumentTypeIds(String parentDocumentTypeId); 055 056 public List findDocumentTypeAttributes(RuleAttribute ruleAttribute); 057 058 public String findDocumentTypeIdByDocumentId(String documentId); 059 060 public String findDocumentTypeIdByName(String documentTypeName); 061 062 public String findDocumentTypeNameById(String documentTypeId); 063}