org.tentackle.appworx
Interface QbfPlugin

All Known Implementing Classes:
DefaultQbfPlugin

public interface QbfPlugin

Interface for a "plugin" to a search dialog.

The plugin determines a panel to enter the search criteria, performs its validation and executes the query.

Author:
harald

Method Summary
 void cleanup()
          Closes the plugin and release all ressources (esp.
 boolean executeQuery()
          Executes the query.
 DbCursor<? extends AppDbObject> getCursor()
           
 Collection<? extends AppDbObject> getObjects()
          Gets the query result as a collection of objects.
 QbfPanel getPanel()
          Determines the panel to enter the search criteria.
 QbfParameter getParameter()
          Gets the search criteria (usually entered by the user).
 int getRowCount()
          Gets the number of objects.
 boolean isParameterValid()
          Performs a validation of the search criteria.
 boolean isResultDisplayable()
          Checks whether the result is displayable, i.e.
 AppDbObject newAppDbObject()
          Creates a new object in the database context of the plugin.
 String notFoundMessage()
          Returns a message for "no such data found..." or whatever.
 void setParameter(QbfParameter parameter)
          Initializes the search criteria.
 

Method Detail

setParameter

void setParameter(QbfParameter parameter)
Initializes the search criteria.

Parameters:
parameter - the qbf parameter

getParameter

QbfParameter getParameter()
Gets the search criteria (usually entered by the user).

Returns:
the qbf parameter

getPanel

QbfPanel getPanel()
Determines the panel to enter the search criteria.

Returns:
the search panel

isParameterValid

boolean isParameterValid()
Performs a validation of the search criteria.

Returns:
true if running the query is ok

executeQuery

boolean executeQuery()
Executes the query.

Returns:
true if some records found, false if nothing found

getCursor

DbCursor<? extends AppDbObject> getCursor()

getObjects

Collection<? extends AppDbObject> getObjects()
Gets the query result as a collection of objects.

Returns:
the collection, never null

getRowCount

int getRowCount()
Gets the number of objects. Keep in mind that using this method on a cursor based query will read all objects to determine the size of the result set.

Returns:
the number of objects

isResultDisplayable

boolean isResultDisplayable()
Checks whether the result is displayable, i.e. will not cause any further problems if displayed.

Returns:
true if result is displayable

cleanup

void cleanup()
Closes the plugin and release all ressources (esp. the cursor, if any)


newAppDbObject

AppDbObject newAppDbObject()
Creates a new object in the database context of the plugin.

Returns:
the newly created object

notFoundMessage

String notFoundMessage()
Returns a message for "no such data found..." or whatever.

Returns:
the message


Copyright © 2001-2008 Harald Krake, Bergstr. 48, 78098 Triberg, Germany, harald@krake.de