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.krms.impl.repository; 017 018import org.kuali.rice.core.api.criteria.QueryByCriteria; 019import org.kuali.rice.krms.api.repository.reference.ReferenceObjectBinding; 020import org.kuali.rice.krms.api.repository.reference.ReferenceObjectBindingQueryResults; 021import java.util.List; 022 023/** 024 * This is the interface for accessing repository {@link ReferenceObjectBindingBo} related business objects. 025 * 026 * @author Kuali Rice Team (rice.collab@kuali.org) 027 * 028 */ 029public interface ReferenceObjectBindingBoService { 030 031 032 /** 033 * This will create a {@link ReferenceObjectBinding} exactly like the parameter passed in. 034 * 035 * @param referenceObjectBinding The ReferenceObjectBinding to create. 036 * @throws IllegalArgumentException if the ReferenceObjectBinding is null. 037 * @throws IllegalStateException if the ReferenceObjectBinding already exists in the system. 038 * @return a {@link ReferenceObjectBinding} exactly like the parameter passed in. 039 * 040 */ 041 public ReferenceObjectBinding createReferenceObjectBinding(ReferenceObjectBinding referenceObjectBinding); 042 043 /** 044 * Retrieves a ReferenceObjectBinding from the repository based on the given id. 045 * 046 * @param referenceObjectBindingId to retrieve. 047 * @return a {@link ReferenceObjectBinding} identified by the given id. 048 * A null reference is returned if an invalid or non-existent id is supplied. 049 * 050 */ 051 public ReferenceObjectBinding getReferenceObjectBinding(String referenceObjectBindingId); 052 053 /** 054 * This will update an existing {@link ReferenceObjectBinding}. 055 * 056 * @param referenceObjectBinding The ReferenceObjectBinding to update. 057 * @throws IllegalArgumentException if the ReferenceObjectBinding is null. 058 * @throws IllegalStateException if the ReferenceObjectBinding does not exists in the system. 059 * 060 */ 061 public void updateReferenceObjectBinding(ReferenceObjectBinding referenceObjectBinding); 062 063 /** 064 * Delete the {@link ReferenceObjectBinding} with the given id. 065 * 066 * @param referenceObjectBindingId to delete. 067 * @throws IllegalArgumentException if the ReferenceObjectBinding is null. 068 * @throws IllegalStateException if the ReferenceObjectBinding does not exists in the system 069 * 070 */ 071 public void deleteReferenceObjectBinding(String referenceObjectBindingId); 072 073 public List<ReferenceObjectBinding> findReferenceObjectBindingsByCollectionName(String collectionName); 074 075 public List<ReferenceObjectBinding> findReferenceObjectBindingsByKrmsDiscriminatorType(String krmsDiscriminatorType); 076 077 public List<ReferenceObjectBinding> findReferenceObjectBindingsByKrmsObject(String krmsObjectId); 078 079 public List<ReferenceObjectBinding> findReferenceObjectBindingsByNamespace(String namespace); 080 081 public List<ReferenceObjectBinding> findReferenceObjectBindingsByReferenceDiscriminatorType(String referenceDiscriminatorType); 082 083 public List<ReferenceObjectBinding> findReferenceObjectBindingsByReferenceObject(String referenceObjectId); 084 085 public List<String> findReferenceObjectBindingIds(final QueryByCriteria queryByCriteria); 086 087 public ReferenceObjectBindingQueryResults findReferenceObjectBindings(final QueryByCriteria queryByCriteria); 088 089 /** 090 * Converts a mutable {@link ReferenceObjectBindingBo} to its immutable counterpart, {@link ReferenceObjectBinding}. 091 * @param referenceObjectBindingBo the mutable business object. 092 * @return a {@link ReferenceObjectBinding} the immutable object. 093 * 094 */ 095 public ReferenceObjectBinding to(ReferenceObjectBindingBo referenceObjectBindingBo); 096 097 /** 098 * Converts a immutable {@link ReferenceObjectBinding} to its mutable {@link ReferenceObjectBindingBo} counterpart. 099 * @param referenceObjectBinding the immutable object. 100 * @return a {@link ReferenceObjectBindingBo} the mutable ReferenceObjectBindingBo. 101 * 102 */ 103 public ReferenceObjectBindingBo from(ReferenceObjectBinding referenceObjectBinding); 104 105}