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.kns.bo; 17 18 import java.util.List; 19 20 21 /** 22 * 23 * This is a marker interface used to determine whether we are dealing with a GlobalBusinessObject or something else 24 * 25 * If implementations of this class implement {@link PersistableBusinessObject} as well, then it is strongly recommended that 26 * classes override {@link PersistableBusinessObject#buildListOfDeletionAwareLists()} as well. If this is not done correctly, then 27 * deleted collection elements will not be persisted, and upon reload from the DB, the deleted items will appear in the collection. 28 * 29 * @deprecated use BulkUpdate instead 30 */ 31 @Deprecated 32 public interface GlobalBusinessObject { 33 34 /** 35 * Gets the documentNumber attribute. 36 * 37 * @return Returns the documentNumber 38 * 39 */ 40 public String getDocumentNumber(); 41 42 /** 43 * Sets the documentNumber attribute. 44 * 45 * @param documentNumber The documentNumber to set. 46 * 47 */ 48 public void setDocumentNumber(String documentNumber); 49 50 /** 51 * 52 * This method applies the global changed fields to the list of BOs contained within, and returns the list, with all the 53 * relevant values updated. 54 * 55 * @return Returns a List of BusinessObjects that are ready for persisting, with any relevant values changed 56 * 57 */ 58 public List generateGlobalChangesToPersist(); 59 60 /** 61 * 62 * This method generates a list of BusinessObjects that need to be deleted as part of the final processing for a global 63 * maintenance document. These records should be deleted before the records from getGlobalChangesToPersist() are persisted. 64 * 65 * @return A List of BusinessObjects that should be deleted as part of this global maint doc's final processing. 66 * 67 */ 68 public List generateDeactivationsToPersist(); 69 70 /** 71 * 72 * This method examines the underlying document and determines whether it can be persisted as part of the enclosing 73 * MaintenanceDocument. If it returns false, then the Maintenance Document it is part of should not be saved, as a SQL Exception 74 * is likely to result. 75 * 76 * @return True if the document can be safely persisted, False if not. 77 * 78 */ 79 public boolean isPersistable(); 80 81 /** 82 * Returns a list of all global detail objects on this document. This method needs to return all detail 83 * objects, even if they are of different types. 84 * 85 * @return 86 */ 87 public List<? extends GlobalBusinessObjectDetail> getAllDetailObjects(); 88 }