001 /**
002 * Copyright 2005-2014 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 */
016 package org.kuali.rice.edl.impl.dao;
017
018 import java.util.List;
019
020 import org.kuali.rice.edl.impl.bo.EDocLiteAssociation;
021 import org.kuali.rice.edl.impl.bo.EDocLiteDefinition;
022
023
024 public interface EDocLiteDAO {
025
026 /**
027 * Persists the given {@link EDocLiteDefinition} to the datasource.
028 * @param definition the item to save.
029 * @return the saved {@link EDocLiteDefinition}
030 */
031 public EDocLiteDefinition saveEDocLiteDefinition(EDocLiteDefinition definition);
032
033 /**
034 * Persists the given {@link EDocLiteAssociation} to the datasource.
035 * @param assoc the {@link EDocLiteAssociation} to save
036 * @return the saved {@link EDocLiteDefinition}
037 */
038 public EDocLiteAssociation saveEDocLiteAssociation(EDocLiteAssociation assoc);
039
040 /**
041 * Returns a {@link EDocLiteDefinition} with the given definition name.
042 * @param defName the definition name
043 * @return a {@link EDocLiteDefinition} with the given definition name.
044 */
045 public EDocLiteDefinition getEDocLiteDefinition(String defName);
046
047 /**
048 * Returns a {@link EDocLiteAssociation} with the associated document type name.
049 * @param documentTypeName the document type name
050 * @return a {@link EDocLiteAssociation}
051 */
052 public EDocLiteAssociation getEDocLiteAssociation(String documentTypeName);
053
054 /**
055 * Returns a {@link EDocLiteAssociation} for the related association id
056 * @param associationId the association id
057 * @return a {@link EDocLiteAssociation}
058 */
059 public EDocLiteAssociation getEDocLiteAssociation(Long associationId);
060
061 /**
062 * Returns all active {@link EDocLiteDefinition}.
063 * @return all active {@link EDocLiteDefinition}
064 */
065 public List<String> getEDocLiteDefinitions();
066
067 /**
068 * Returns all active {@link EDocLiteAssociation}.
069 * @return all active {@link EDocLiteAssociation}
070 */
071 public List<EDocLiteAssociation> getEDocLiteAssociations();
072
073 /**
074 * Returns a collection of {@link EDocLiteAssociation} with similar properties as the given object.
075 * @param edocLite
076 * @return a {@link List} of {@link EDocLiteAssociation}
077 */
078 public List<EDocLiteAssociation> search(EDocLiteAssociation edocLite);
079 }