1 /** 2 * Copyright 2005-2015 The Kuali Foundation 3 * 4 * Licensed under the Educational Community License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.opensource.org/licenses/ecl2.php 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 package org.kuali.rice.edl.impl.dao; 17 18 import java.util.List; 19 20 import org.kuali.rice.edl.impl.bo.EDocLiteAssociation; 21 import org.kuali.rice.edl.impl.bo.EDocLiteDefinition; 22 23 24 public interface EDocLiteDAO { 25 26 /** 27 * Persists the given {@link EDocLiteDefinition} to the datasource. 28 * @param definition the item to save. 29 * @return the saved {@link EDocLiteDefinition} 30 */ 31 public EDocLiteDefinition saveEDocLiteDefinition(EDocLiteDefinition definition); 32 33 /** 34 * Persists the given {@link EDocLiteAssociation} to the datasource. 35 * @param assoc the {@link EDocLiteAssociation} to save 36 * @return the saved {@link EDocLiteDefinition} 37 */ 38 public EDocLiteAssociation saveEDocLiteAssociation(EDocLiteAssociation assoc); 39 40 /** 41 * Returns a {@link EDocLiteDefinition} with the given definition name. 42 * @param defName the definition name 43 * @return a {@link EDocLiteDefinition} with the given definition name. 44 */ 45 public EDocLiteDefinition getEDocLiteDefinition(String defName); 46 47 /** 48 * Returns a {@link EDocLiteAssociation} with the associated document type name. 49 * @param documentTypeName the document type name 50 * @return a {@link EDocLiteAssociation} 51 */ 52 public EDocLiteAssociation getEDocLiteAssociation(String documentTypeName); 53 54 /** 55 * Returns a {@link EDocLiteAssociation} for the related association id 56 * @param associationId the association id 57 * @return a {@link EDocLiteAssociation} 58 */ 59 public EDocLiteAssociation getEDocLiteAssociation(Long associationId); 60 61 /** 62 * Returns all active {@link EDocLiteDefinition}. 63 * @return all active {@link EDocLiteDefinition} 64 */ 65 public List<String> getEDocLiteDefinitions(); 66 67 /** 68 * Returns all active {@link EDocLiteAssociation}. 69 * @return all active {@link EDocLiteAssociation} 70 */ 71 public List<EDocLiteAssociation> getEDocLiteAssociations(); 72 73 /** 74 * Returns a collection of {@link EDocLiteAssociation} with similar properties as the given object. 75 * @param edocLite 76 * @return a {@link List} of {@link EDocLiteAssociation} 77 */ 78 public List<EDocLiteAssociation> search(EDocLiteAssociation edocLite); 79 }