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 */
016package org.kuali.rice.kns.datadictionary;
017
018/**
019 * @author Kuali Rice Team (rice.collab@kuali.org)
020 *
021 * @deprecated Use {@link org.kuali.rice.krad.datadictionary.BusinessObjectEntry}.
022 */
023@Deprecated
024public class BusinessObjectEntry extends org.kuali.rice.krad.datadictionary.BusinessObjectEntry {
025
026    protected InquiryDefinition inquiryDefinition;
027    protected LookupDefinition lookupDefinition;
028
029    @Override
030    public void completeValidation() {
031
032        super.completeValidation();
033
034        if (hasInquiryDefinition()) {
035            inquiryDefinition.completeValidation(getDataObjectClass(), null);
036        }
037
038        if (hasLookupDefinition()) {
039            lookupDefinition.completeValidation(getDataObjectClass(), null);
040        }
041    }
042
043    /**
044     * @return true if this instance has an inquiryDefinition
045     */
046    public boolean hasInquiryDefinition() {
047        return (inquiryDefinition != null);
048    }
049
050    /**
051     * @return current inquiryDefinition for this BusinessObjectEntry, or null if there is none
052     */
053    public InquiryDefinition getInquiryDefinition() {
054        return inquiryDefinition;
055    }
056
057    /**
058     * The inquiry element is used to specify the fields that will be displayed on the
059     * inquiry screen for this business object and the order in which they will appear.
060     *
061     * DD: See InquiryDefinition.java
062     *
063     * JSTL: The inquiry element is a Map which is accessed using
064     * a key of "inquiry".  This map contains the following keys:
065     * title (String)
066     * inquiryFields (Map)
067     *
068     * See InquiryMapBuilder.java
069     */
070    public void setInquiryDefinition(InquiryDefinition inquiryDefinition) {
071        this.inquiryDefinition = inquiryDefinition;
072    }
073
074    /**
075     * @return true if this instance has a lookupDefinition
076     */
077    public boolean hasLookupDefinition() {
078        return (lookupDefinition != null);
079    }
080
081    /**
082     * @return current lookupDefinition for this BusinessObjectEntry, or null if there is none
083     */
084    public LookupDefinition getLookupDefinition() {
085        return lookupDefinition;
086    }
087
088    /**
089     * The lookup element is used to specify the rules for "looking up"
090     * a business object.  These specifications define the following:
091     * How to specify the search criteria used to locate a set of business objects
092     * How to display the search results
093     *
094     * DD: See LookupDefinition.java
095     *
096     * JSTL: The lookup element is a Map which is accessed using
097     * a key of "lookup".  This map contains the following keys:
098     * lookupableID (String, optional)
099     * title (String)
100     * menubar (String, optional)
101     * defaultSort (Map, optional)
102     * lookupFields (Map)
103     * resultFields (Map)
104     * resultSetLimit (String, optional)
105     *
106     * See LookupMapBuilder.java
107     */
108    public void setLookupDefinition(LookupDefinition lookupDefinition) {
109        this.lookupDefinition = lookupDefinition;
110    }
111}