View Javadoc
1   /**
2    * Copyright 2005-2014 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.kew.docsearch;
17  
18  import java.sql.ResultSet;
19  import java.sql.SQLException;
20  import java.util.Map;
21  
22  import org.kuali.rice.kew.api.document.attribute.DocumentAttribute;
23  import org.kuali.rice.kew.routeheader.DocumentRouteHeaderValue;
24  
25  import javax.persistence.Entity;
26  import javax.persistence.Id;
27  import javax.persistence.MappedSuperclass;
28  import javax.persistence.NamedQueries;
29  import javax.persistence.NamedQuery;
30  
31  /**
32   * Model bean mapped to ojb that holds a single piece of searchable data for a document.
33   *
34   * @author Kuali Rice Team (rice.collab@kuali.org)
35   *
36   */
37  public interface SearchableAttributeValue {
38  
39  	public String getAttributeDataType();
40  
41  	public String getAttributeTableName();
42  
43  	public boolean allowsWildcards();
44  
45  	public boolean allowsCaseInsensitivity();
46  
47  	public boolean allowsRangeSearches();
48  
49      public boolean isPassesDefaultValidation(String valueEntered);
50  
51      public Boolean isRangeValid(String lowerValue, String upperValue);
52  
53      public void setupAttributeValue(String value);
54  
55      public void setupAttributeValue(ResultSet resultSet, String columnName) throws SQLException;
56  
57      public String getSearchableAttributeDisplayValue();
58  
59  	public String getOjbConcreteClass();
60  
61      public void setOjbConcreteClass(String ojbConcreteClass);
62  
63      public DocumentRouteHeaderValue getRouteHeader();
64  
65      public void setRouteHeader(DocumentRouteHeaderValue routeHeader);
66  
67      public String getDocumentId();
68  
69      public void setDocumentId(String documentId);
70  
71      public String getSearchableAttributeKey();
72  
73      public void setSearchableAttributeKey(String searchableAttributeKey);
74  
75      public String getSearchableAttributeValueId();
76  
77      public void setSearchableAttributeValueId(String searchableAttributeValueId);
78  
79      public Object getSearchableAttributeValue();
80  
81      public DocumentAttribute toDocumentAttribute();
82  }