001 /*
002 * Copyright 2011 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.kfs.integration.ld;
017
018 import java.util.Collection;
019
020 /**
021 * Labor business object for SegmentedBusinessObject Used mostly for lookups. This interface is useful when segmenting lookup
022 * results. For example, If you wanted to split results for amounts in July, August, September, November, etc..., into separate
023 * records, this would helpful in doing that.
024 *
025 * @see org.kuali.rice.kns.bo.BusinessObject
026 */
027 public interface SegmentedBusinessObject {
028
029 /**
030 * Determines whether to apply segments to lookup results
031 *
032 * @return boolean
033 */
034 public boolean isLookupResultsSegmented();
035
036 /**
037 * Retrieve a collection of the property names to base the business object segmentation on
038 *
039 * @return a collection of the property names to base the business object segmentation on
040 */
041 public Collection<String> getSegmentedPropertyNames();
042
043 /**
044 * Returns String to append to the returned object id
045 *
046 * @param segmentedPropertyName - name of the segmented property for the instance
047 * @return String that will be used for object id
048 */
049 public String getAdditionalReturnData(String segmentedPropertyName);
050 }