org.cruxframework.crux.core.client.db
Class Callback

java.lang.Object
  extended by org.cruxframework.crux.core.client.db.Callback
Direct Known Subclasses:
DatabaseCallback, DatabaseCountCallback, DatabaseCursorCallback, DatabaseDeleteCallback, DatabaseRetrieveCallback, DatabaseWriteCallback, FileStoreCursorCallback, Transaction.TransactionCallback

public class Callback
extends Object

Define a callback for database operations.

Author:
Thiago da Rosa de Bustamante

Field Summary
protected  AbstractDatabase db
           
 
Constructor Summary
Callback()
           
 
Method Summary
 void onError(String message)
          Called when an unexpected error occur.
protected  void setDb(AbstractDatabase db)
          Called by Crux to bind the callback object to the database.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

db

protected AbstractDatabase db
Constructor Detail

Callback

public Callback()
Method Detail

setDb

protected void setDb(AbstractDatabase db)
Called by Crux to bind the callback object to the database.

Parameters:
db - database that performed the operation handled by this callback.

onError

public void onError(String message)
Called when an unexpected error occur.

Parameters:
message - error message


Copyright © 2014. All rights reserved.