org.apache.empire.db
Class DBObject

java.lang.Object
  extended by org.apache.empire.commons.ErrorObject
      extended by org.apache.empire.db.DBObject
All Implemented Interfaces:
ErrorInfo
Direct Known Subclasses:
DBDatabase, DBExpr, DBIndex, DBRecordData, DBRelation

public abstract class DBObject
extends ErrorObject

Base class for all database related objects. Every object is attached to a DBDatabase object.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.empire.commons.ErrorObject
ErrorObject.ObjectErrorInfo
 
Constructor Summary
DBObject()
           
 
Method Summary
protected  boolean error(ErrorType type, java.sql.SQLException sqle)
          Sets the current error from an SQL Exception.
protected  boolean error(java.sql.SQLException sqle)
          Sets the current error from an SQL Exception.
abstract  DBDatabase getDatabase()
          Returns the database object to which this object belongs to.
 
Methods inherited from class org.apache.empire.commons.ErrorObject
clearError, clearErrorInfo, error, error, error, error, error, error, error, getErrorInfo, getErrorMessage, getErrorParams, getErrorSource, getErrorType, getMessage, hasError, internalSetError, isExceptionsEnabled, setExceptionsEnabled, success
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DBObject

public DBObject()
Method Detail

getDatabase

public abstract DBDatabase getDatabase()
Returns the database object to which this object belongs to. For the database object itself this function will return the this pointer.

Returns:
the database object

error

protected boolean error(ErrorType type,
                        java.sql.SQLException sqle)
Sets the current error from an SQL Exception.

Parameters:
type - the error type
sqle - the SQL error message
Returns:
the return value is always false

error

protected boolean error(java.sql.SQLException sqle)
Sets the current error from an SQL Exception.

Parameters:
sqle - the SQL error message
Returns:
the return value is always false


Copyright © 2008-2010 Apache Software Foundation. All Rights Reserved.