org.melati.poem
Class Searchability

java.lang.Object
  extended by org.melati.poem.Searchability

public final class Searchability
extends java.lang.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
 java.lang.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)
           
 java.lang.Integer getIndex()
           
 java.lang.String getName()
           
static Searchability named(java.lang.String name)
          Throws NameUnrecognisedException if not found.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

index

public final java.lang.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(java.lang.String name)
Throws NameUnrecognisedException if not found.

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

toString

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

getIndex

public java.lang.Integer getIndex()
Returns:
the index

getName

public java.lang.String getName()
Returns:
the Name


Copyright © 2000-2009 PanEris. All Rights Reserved.