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.kew.docsearch;
017
018import java.sql.ResultSet;
019import java.sql.SQLException;
020import java.util.Map;
021
022import org.kuali.rice.kew.api.document.attribute.DocumentAttribute;
023import org.kuali.rice.kew.routeheader.DocumentRouteHeaderValue;
024
025import javax.persistence.Entity;
026import javax.persistence.Id;
027import javax.persistence.MappedSuperclass;
028import javax.persistence.NamedQueries;
029import javax.persistence.NamedQuery;
030
031/**
032 * Model bean mapped to ojb that holds a single piece of searchable data for a document.
033 *
034 * @author Kuali Rice Team (rice.collab@kuali.org)
035 *
036 */
037public interface SearchableAttributeValue {
038
039        public String getAttributeDataType();
040
041        public String getAttributeTableName();
042
043        public boolean allowsWildcards();
044
045        public boolean allowsCaseInsensitivity();
046
047        public boolean allowsRangeSearches();
048
049    public boolean isPassesDefaultValidation(String valueEntered);
050
051    public Boolean isRangeValid(String lowerValue, String upperValue);
052
053    public void setupAttributeValue(String value);
054
055    public void setupAttributeValue(ResultSet resultSet, String columnName) throws SQLException;
056
057    public String getSearchableAttributeDisplayValue();
058
059        public String getOjbConcreteClass();
060
061    public void setOjbConcreteClass(String ojbConcreteClass);
062
063    public DocumentRouteHeaderValue getRouteHeader();
064
065    public void setRouteHeader(DocumentRouteHeaderValue routeHeader);
066
067    public String getDocumentId();
068
069    public void setDocumentId(String documentId);
070
071    public String getSearchableAttributeKey();
072
073    public void setSearchableAttributeKey(String searchableAttributeKey);
074
075    public String getSearchableAttributeValueId();
076
077    public void setSearchableAttributeValueId(String searchableAttributeValueId);
078
079    public Object getSearchableAttributeValue();
080
081    public DocumentAttribute toDocumentAttribute();
082}