Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.RuntimeCollective.search.test
Class TestSearchable  view TestSearchable download TestSearchable.java

java.lang.Object
  extended bycom.RuntimeCollective.search.test.TestSearchable
All Implemented Interfaces:
com.RuntimeCollective.webapps.bean.EntityBean, com.RuntimeCollective.search.bean.Searchable, java.io.Serializable

public class TestSearchable
extends java.lang.Object
implements com.RuntimeCollective.search.bean.Searchable

Test searchable object.

Version:
$Id: TestSearchable.java,v 1.4 2003/09/30 15:12:58 joe Exp $

Field Summary
static java.lang.String DATABASE_TABLE
          The name of a table (in the default database) that indexes this bean type.
private  int id
           
static java.lang.String searchCategory
          The category, or section name, to "file" this object under in the search index.
private  java.lang.String searchText
           
 
Fields inherited from interface com.RuntimeCollective.webapps.bean.EntityBean
INTERFACE_BEAN, NULL_ID
 
Constructor Summary
TestSearchable(int id)
           
TestSearchable(int i, java.lang.String s)
          Construct a TestSearchable with the given text, which will be returned on getSearchText() and getSearchTitle().
 
Method Summary
 void delete()
          Delete this bean from the database.
 java.util.Collection getFields()
          Get a Collection of Strings, for every Field that can be searched for on this object.
 java.lang.String getFirstTest()
           
 int getId()
          Get the unique id of this bean instance.
 java.lang.String getLink()
          Get a link that will display this object (ok, so this is a bit of a hack - there must be a better way)
 java.lang.String getSearchSummary()
          Get a short, one paragraph summary for this searchable object.
 java.lang.String getSearchText()
          Get all text for this object that will be searched on.
 java.lang.String getSearchTitle()
          Get a one-line title for this searchable object.
 java.lang.String getSecondTest()
           
 com.RuntimeCollective.search.bean.Searchable[] populateIndex()
          Return all Searchable objects of this class that should be added to the search index, given an empty index to populate.
 void save()
          Save this bean to the database.
 void setId(int id)
          Set the unique id of this bean instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

searchText

private java.lang.String searchText

id

private int id

DATABASE_TABLE

public static java.lang.String DATABASE_TABLE
The name of a table (in the default database) that indexes this bean type. This table must have a PK column called "id" and a row for each of the beans of this type.


searchCategory

public static java.lang.String searchCategory
The category, or section name, to "file" this object under in the search index.

Constructor Detail

TestSearchable

public TestSearchable(int id)

TestSearchable

public TestSearchable(int i,
                      java.lang.String s)
Construct a TestSearchable with the given text, which will be returned on getSearchText() and getSearchTitle().

Method Detail

getId

public int getId()
Get the unique id of this bean instance.

Specified by:
getId in interface com.RuntimeCollective.webapps.bean.EntityBean

setId

public void setId(int id)
Set the unique id of this bean instance.

Specified by:
setId in interface com.RuntimeCollective.webapps.bean.EntityBean

save

public void save()
          throws java.sql.SQLException
Save this bean to the database.

Specified by:
save in interface com.RuntimeCollective.webapps.bean.EntityBean

delete

public void delete()
            throws java.sql.SQLException
Delete this bean from the database. It is up to the particular subclass whether the bean is deleted the database entirely, or just marked as 'archived' -- as long as it is no longer returned by the EntityBean(id) constructor.

Specified by:
delete in interface com.RuntimeCollective.webapps.bean.EntityBean

getSearchTitle

public java.lang.String getSearchTitle()
Get a one-line title for this searchable object.

Specified by:
getSearchTitle in interface com.RuntimeCollective.search.bean.Searchable

getSearchSummary

public java.lang.String getSearchSummary()
Get a short, one paragraph summary for this searchable object.

Specified by:
getSearchSummary in interface com.RuntimeCollective.search.bean.Searchable

getSearchText

public java.lang.String getSearchText()
Get all text for this object that will be searched on.

Specified by:
getSearchText in interface com.RuntimeCollective.search.bean.Searchable

getFields

public java.util.Collection getFields()
Get a Collection of Strings, for every Field that can be searched for on this object.

Specified by:
getFields in interface com.RuntimeCollective.search.bean.Searchable

getLink

public java.lang.String getLink()
Get a link that will display this object (ok, so this is a bit of a hack - there must be a better way)

Specified by:
getLink in interface com.RuntimeCollective.search.bean.Searchable

populateIndex

public com.RuntimeCollective.search.bean.Searchable[] populateIndex()
                                                             throws com.RuntimeCollective.search.SearchException
Description copied from interface: com.RuntimeCollective.search.bean.Searchable
Return all Searchable objects of this class that should be added to the search index, given an empty index to populate. Note: This would normally be a static method, but it's defined in the Searchable *interface*.

Specified by:
populateIndex in interface com.RuntimeCollective.search.bean.Searchable

getFirstTest

public java.lang.String getFirstTest()

getSecondTest

public java.lang.String getSecondTest()