1 /** 2 * Copyright 2005-2013 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.krms.impl.repository; 17 18 import org.kuali.rice.core.api.criteria.QueryByCriteria; 19 import org.kuali.rice.krms.api.repository.reference.ReferenceObjectBinding; 20 import org.kuali.rice.krms.api.repository.reference.ReferenceObjectBindingQueryResults; 21 import java.util.List; 22 23 /** 24 * This is the interface for accessing repository {@link ReferenceObjectBindingBo} related business objects. 25 * 26 * @author Kuali Rice Team (rice.collab@kuali.org) 27 * 28 */ 29 public interface ReferenceObjectBindingBoService { 30 31 32 /** 33 * This will create a {@link ReferenceObjectBinding} exactly like the parameter passed in. 34 * 35 * @param referenceObjectBinding The ReferenceObjectBinding to create. 36 * @throws IllegalArgumentException if the ReferenceObjectBinding is null. 37 * @throws IllegalStateException if the ReferenceObjectBinding already exists in the system. 38 * @return a {@link ReferenceObjectBinding} exactly like the parameter passed in. 39 * 40 */ 41 public ReferenceObjectBinding createReferenceObjectBinding(ReferenceObjectBinding referenceObjectBinding); 42 43 /** 44 * Retrieves a ReferenceObjectBinding from the repository based on the given id. 45 * 46 * @param referenceObjectBindingId to retrieve. 47 * @return a {@link ReferenceObjectBinding} identified by the given id. 48 * A null reference is returned if an invalid or non-existent id is supplied. 49 * 50 */ 51 public ReferenceObjectBinding getReferenceObjectBinding(String referenceObjectBindingId); 52 53 /** 54 * This will update an existing {@link ReferenceObjectBinding}. 55 * 56 * @param referenceObjectBinding The ReferenceObjectBinding to update. 57 * @throws IllegalArgumentException if the ReferenceObjectBinding is null. 58 * @throws IllegalStateException if the ReferenceObjectBinding does not exists in the system. 59 * 60 */ 61 public void updateReferenceObjectBinding(ReferenceObjectBinding referenceObjectBinding); 62 63 /** 64 * Delete the {@link ReferenceObjectBinding} with the given id. 65 * 66 * @param referenceObjectBindingId to delete. 67 * @throws IllegalArgumentException if the ReferenceObjectBinding is null. 68 * @throws IllegalStateException if the ReferenceObjectBinding does not exists in the system 69 * 70 */ 71 public void deleteReferenceObjectBinding(String referenceObjectBindingId); 72 73 public List<ReferenceObjectBinding> findReferenceObjectBindingsByCollectionName(String collectionName); 74 75 public List<ReferenceObjectBinding> findReferenceObjectBindingsByKrmsDiscriminatorType(String krmsDiscriminatorType); 76 77 public List<ReferenceObjectBinding> findReferenceObjectBindingsByKrmsObject(String krmsObjectId); 78 79 public List<ReferenceObjectBinding> findReferenceObjectBindingsByNamespace(String namespace); 80 81 public List<ReferenceObjectBinding> findReferenceObjectBindingsByReferenceDiscriminatorType(String referenceDiscriminatorType); 82 83 public List<ReferenceObjectBinding> findReferenceObjectBindingsByReferenceObject(String referenceObjectId); 84 85 public List<String> findReferenceObjectBindingIds(final QueryByCriteria queryByCriteria); 86 87 public ReferenceObjectBindingQueryResults findReferenceObjectBindings(final QueryByCriteria queryByCriteria); 88 89 /** 90 * Converts a mutable {@link ReferenceObjectBindingBo} to its immutable counterpart, {@link ReferenceObjectBinding}. 91 * @param referenceObjectBindingBo the mutable business object. 92 * @return a {@link ReferenceObjectBinding} the immutable object. 93 * 94 */ 95 public ReferenceObjectBinding to(ReferenceObjectBindingBo referenceObjectBindingBo); 96 97 /** 98 * Converts a immutable {@link ReferenceObjectBinding} to its mutable {@link ReferenceObjectBindingBo} counterpart. 99 * @param referenceObjectBinding the immutable object. 100 * @return a {@link ReferenceObjectBindingBo} the mutable ReferenceObjectBindingBo. 101 * 102 */ 103 public ReferenceObjectBindingBo from(ReferenceObjectBinding referenceObjectBinding); 104 105 }