org.melati.poem
Class Searchability

Package class diagram package Searchability
java.lang.Object
  extended by org.melati.poem.Searchability

public final class Searchability
extends Object

The quality of being searchable: yes, no or primary.


Nested Class Summary
static class Searchability.NameUnrecognisedException
          Thrown when an invalid Searchability level is specified, by a typing mistake in the DSD for example.
 
Field Summary
 Integer index
          The Id of the Searchability.
static Searchability no
          The column is not searchable so the user will not be given the opportunity to enter search criteria for it.
static Searchability primary
          The column is the only one in the table for which a special widget is provided to enter a search value.
static Searchability yes
          The column is searchable so that the user is able to enter search criteria for it included along with others when searching for rows.
 
Method Summary
static int count()
           
static Searchability forIndex(int index)
           
 Integer getIndex()
           
 String getName()
           
static Searchability named(String name)
          Throws NameUnrecognisedException if not found.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

index

public final Integer index
The Id of the Searchability.


primary

public static final Searchability primary
The column is the only one in the table for which a special widget is provided to enter a search value.

There is at most one such column per table. The user is able to select matching rows without popping up a search criteria dialogue window.


yes

public static final Searchability yes
The column is searchable so that the user is able to enter search criteria for it included along with others when searching for rows.

Currently the search criteria for a column consist of at most one non-null value.


no

public static final Searchability no
The column is not searchable so the user will not be given the opportunity to enter search criteria for it.

Method Detail

forIndex

public static Searchability forIndex(int index)
Parameters:
index - key
Returns:
the selected Searchability

count

public static int count()
Returns:
the number of Searchabilities

named

public static Searchability named(String name)
Throws NameUnrecognisedException if not found.

Parameters:
name - String name of Searchability
Returns:
the Searchability

toString

public String toString()
Overrides:
toString in class Object
Returns:
the name and index
See Also:
Object.toString()

getIndex

public Integer getIndex()
Returns:
the index

getName

public String getName()
Returns:
the Name


Copyright © 2000-2010 PanEris. All Rights Reserved.