empire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From franci...@apache.org
Subject svn commit: r1158339 [1/5] - in /incubator/empire-db/trunk: ./ empire-db-codegen/src/main/java/org/apache/empire/db/codegen/ empire-db-examples/empire-db-example-advanced/src/main/java/org/apache/empire/samples/db/advanced/ empire-db-examples/empire-db...
Date Tue, 16 Aug 2011 15:56:44 GMT
Author: francisdb
Date: Tue Aug 16 15:56:41 2011
New Revision: 1158339

URL: http://svn.apache.org/viewvc?rev=1158339&view=rev
Log:
EMPIREDB-99 Remove optional support for old style error handing
Merge branch to trunk

Added:
    incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/java/org/apache/empire/struts2/websample/web/SampleErrors.java
      - copied unchanged from r1158327, incubator/empire-db/branches/EMPIREDB-99/empire-db-examples/empire-db-example-struts2-cxf/src/main/java/org/apache/empire/struts2/websample/web/SampleErrors.java
    incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/web/SampleErrors.java
      - copied unchanged from r1158327, incubator/empire-db/branches/EMPIREDB-99/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/web/SampleErrors.java
    incubator/empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/action/ErrorInfo.java
      - copied unchanged from r1158327, incubator/empire-db/branches/EMPIREDB-99/empire-db-struts2/src/main/java/org/apache/empire/struts2/action/ErrorInfo.java
    incubator/empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/exceptions/   (props changed)
      - copied from r1158327, incubator/empire-db/branches/EMPIREDB-99/empire-db-struts2/src/main/java/org/apache/empire/struts2/exceptions/
    incubator/empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/exceptions/InvalidFormDataException.java
      - copied unchanged from r1158327, incubator/empire-db/branches/EMPIREDB-99/empire-db-struts2/src/main/java/org/apache/empire/struts2/exceptions/InvalidFormDataException.java
    incubator/empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/exceptions/WebException.java
      - copied unchanged from r1158327, incubator/empire-db/branches/EMPIREDB-99/empire-db-struts2/src/main/java/org/apache/empire/struts2/exceptions/WebException.java
    incubator/empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/web/FieldErrors.java
      - copied unchanged from r1158327, incubator/empire-db/branches/EMPIREDB-99/empire-db-struts2/src/main/java/org/apache/empire/struts2/web/FieldErrors.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/data/bean/BeanResult.java
      - copied unchanged from r1158327, incubator/empire-db/branches/EMPIREDB-99/empire-db/src/main/java/org/apache/empire/data/bean/BeanResult.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBDDLGenerator.java
      - copied unchanged from r1158327, incubator/empire-db/branches/EMPIREDB-99/empire-db/src/main/java/org/apache/empire/db/DBDDLGenerator.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/   (props changed)
      - copied from r1158327, incubator/empire-db/branches/EMPIREDB-99/empire-db/src/main/java/org/apache/empire/db/exceptions/
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/DatabaseNotOpenException.java
      - copied unchanged from r1158327, incubator/empire-db/branches/EMPIREDB-99/empire-db/src/main/java/org/apache/empire/db/exceptions/DatabaseNotOpenException.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/FieldIllegalValueException.java
      - copied unchanged from r1158327, incubator/empire-db/branches/EMPIREDB-99/empire-db/src/main/java/org/apache/empire/db/exceptions/FieldIllegalValueException.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/FieldIsReadOnlyException.java
      - copied unchanged from r1158327, incubator/empire-db/branches/EMPIREDB-99/empire-db/src/main/java/org/apache/empire/db/exceptions/FieldIsReadOnlyException.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/FieldNotNullException.java
      - copied unchanged from r1158327, incubator/empire-db/branches/EMPIREDB-99/empire-db/src/main/java/org/apache/empire/db/exceptions/FieldNotNullException.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/FieldValueException.java
      - copied unchanged from r1158327, incubator/empire-db/branches/EMPIREDB-99/empire-db/src/main/java/org/apache/empire/db/exceptions/FieldValueException.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/FieldValueTooLongException.java
      - copied unchanged from r1158327, incubator/empire-db/branches/EMPIREDB-99/empire-db/src/main/java/org/apache/empire/db/exceptions/FieldValueTooLongException.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/InternalSQLException.java
      - copied unchanged from r1158327, incubator/empire-db/branches/EMPIREDB-99/empire-db/src/main/java/org/apache/empire/db/exceptions/InternalSQLException.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/InvalidKeyException.java
      - copied unchanged from r1158327, incubator/empire-db/branches/EMPIREDB-99/empire-db/src/main/java/org/apache/empire/db/exceptions/InvalidKeyException.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/NoPrimaryKeyException.java
      - copied unchanged from r1158327, incubator/empire-db/branches/EMPIREDB-99/empire-db/src/main/java/org/apache/empire/db/exceptions/NoPrimaryKeyException.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/QueryFailedException.java
      - copied unchanged from r1158327, incubator/empire-db/branches/EMPIREDB-99/empire-db/src/main/java/org/apache/empire/db/exceptions/QueryFailedException.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/QueryNoResultException.java
      - copied unchanged from r1158327, incubator/empire-db/branches/EMPIREDB-99/empire-db/src/main/java/org/apache/empire/db/exceptions/QueryNoResultException.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/RecordDeleteFailedException.java
      - copied unchanged from r1158327, incubator/empire-db/branches/EMPIREDB-99/empire-db/src/main/java/org/apache/empire/db/exceptions/RecordDeleteFailedException.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/RecordNotFoundException.java
      - copied unchanged from r1158327, incubator/empire-db/branches/EMPIREDB-99/empire-db/src/main/java/org/apache/empire/db/exceptions/RecordNotFoundException.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/RecordUpdateFailedException.java
      - copied unchanged from r1158327, incubator/empire-db/branches/EMPIREDB-99/empire-db/src/main/java/org/apache/empire/db/exceptions/RecordUpdateFailedException.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/RecordUpdateInvalidException.java
      - copied unchanged from r1158327, incubator/empire-db/branches/EMPIREDB-99/empire-db/src/main/java/org/apache/empire/db/exceptions/RecordUpdateInvalidException.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/package.html
      - copied unchanged from r1158327, incubator/empire-db/branches/EMPIREDB-99/empire-db/src/main/java/org/apache/empire/db/exceptions/package.html
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/oracle/OracleDDLGenerator.java
      - copied unchanged from r1158327, incubator/empire-db/branches/EMPIREDB-99/empire-db/src/main/java/org/apache/empire/db/oracle/OracleDDLGenerator.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/   (props changed)
      - copied from r1158327, incubator/empire-db/branches/EMPIREDB-99/empire-db/src/main/java/org/apache/empire/exceptions/
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/BeanIncompatibleException.java
      - copied unchanged from r1158327, incubator/empire-db/branches/EMPIREDB-99/empire-db/src/main/java/org/apache/empire/exceptions/BeanIncompatibleException.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/BeanInstantiationException.java
      - copied unchanged from r1158327, incubator/empire-db/branches/EMPIREDB-99/empire-db/src/main/java/org/apache/empire/exceptions/BeanInstantiationException.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/BeanPropertyGetException.java
      - copied unchanged from r1158327, incubator/empire-db/branches/EMPIREDB-99/empire-db/src/main/java/org/apache/empire/exceptions/BeanPropertyGetException.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/BeanPropertySetException.java
      - copied unchanged from r1158327, incubator/empire-db/branches/EMPIREDB-99/empire-db/src/main/java/org/apache/empire/exceptions/BeanPropertySetException.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/EmpireException.java
      - copied unchanged from r1158327, incubator/empire-db/branches/EMPIREDB-99/empire-db/src/main/java/org/apache/empire/exceptions/EmpireException.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/EmpireFileException.java
      - copied unchanged from r1158327, incubator/empire-db/branches/EMPIREDB-99/empire-db/src/main/java/org/apache/empire/exceptions/EmpireFileException.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/FileParseException.java
      - copied unchanged from r1158327, incubator/empire-db/branches/EMPIREDB-99/empire-db/src/main/java/org/apache/empire/exceptions/FileParseException.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/FileReadException.java
      - copied unchanged from r1158327, incubator/empire-db/branches/EMPIREDB-99/empire-db/src/main/java/org/apache/empire/exceptions/FileReadException.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/FileWriteException.java
      - copied unchanged from r1158327, incubator/empire-db/branches/EMPIREDB-99/empire-db/src/main/java/org/apache/empire/exceptions/FileWriteException.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/InternalException.java
      - copied unchanged from r1158327, incubator/empire-db/branches/EMPIREDB-99/empire-db/src/main/java/org/apache/empire/exceptions/InternalException.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/InvalidArgumentException.java
      - copied unchanged from r1158327, incubator/empire-db/branches/EMPIREDB-99/empire-db/src/main/java/org/apache/empire/exceptions/InvalidArgumentException.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/InvalidPropertyException.java
      - copied unchanged from r1158327, incubator/empire-db/branches/EMPIREDB-99/empire-db/src/main/java/org/apache/empire/exceptions/InvalidPropertyException.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/ItemExistsException.java
      - copied unchanged from r1158327, incubator/empire-db/branches/EMPIREDB-99/empire-db/src/main/java/org/apache/empire/exceptions/ItemExistsException.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/ItemNotFoundException.java
      - copied unchanged from r1158327, incubator/empire-db/branches/EMPIREDB-99/empire-db/src/main/java/org/apache/empire/exceptions/ItemNotFoundException.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/MiscellaneousErrorException.java
      - copied unchanged from r1158327, incubator/empire-db/branches/EMPIREDB-99/empire-db/src/main/java/org/apache/empire/exceptions/MiscellaneousErrorException.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/NotImplementedException.java
      - copied unchanged from r1158327, incubator/empire-db/branches/EMPIREDB-99/empire-db/src/main/java/org/apache/empire/exceptions/NotImplementedException.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/NotSupportedException.java
      - copied unchanged from r1158327, incubator/empire-db/branches/EMPIREDB-99/empire-db/src/main/java/org/apache/empire/exceptions/NotSupportedException.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/ObjectNotValidException.java
      - copied unchanged from r1158327, incubator/empire-db/branches/EMPIREDB-99/empire-db/src/main/java/org/apache/empire/exceptions/ObjectNotValidException.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/PropertyReadOnlyException.java
      - copied unchanged from r1158327, incubator/empire-db/branches/EMPIREDB-99/empire-db/src/main/java/org/apache/empire/exceptions/PropertyReadOnlyException.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/UnexpectedReturnValueException.java
      - copied unchanged from r1158327, incubator/empire-db/branches/EMPIREDB-99/empire-db/src/main/java/org/apache/empire/exceptions/UnexpectedReturnValueException.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/package.html
      - copied unchanged from r1158327, incubator/empire-db/branches/EMPIREDB-99/empire-db/src/main/java/org/apache/empire/exceptions/package.html
Removed:
    incubator/empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/web/WebErrors.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/EmpireException.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/commons/ErrorInfo.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/commons/ErrorObject.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/commons/Errors.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBErrors.java
    incubator/empire-db/trunk/empire-db/src/test/java/org/apache/empire/EmpireExceptionTest.java
Modified:
    incubator/empire-db/trunk/   (props changed)
    incubator/empire-db/trunk/empire-db-codegen/src/main/java/org/apache/empire/db/codegen/CodeGenApp.java
    incubator/empire-db/trunk/empire-db-codegen/src/main/java/org/apache/empire/db/codegen/CodeGenConfig.java
    incubator/empire-db/trunk/empire-db-codegen/src/main/java/org/apache/empire/db/codegen/CodeGenParser.java
    incubator/empire-db/trunk/empire-db-codegen/src/main/java/org/apache/empire/db/codegen/CodeGenWriter.java
    incubator/empire-db/trunk/empire-db-examples/empire-db-example-advanced/src/main/java/org/apache/empire/samples/db/advanced/SampleAdvApp.java
    incubator/empire-db/trunk/empire-db-examples/empire-db-example-advanced/src/main/java/org/apache/empire/samples/db/advanced/SampleAdvConfig.java
    incubator/empire-db/trunk/empire-db-examples/empire-db-example-basic/src/main/java/org/apache/empire/samples/db/SampleApp.java
    incubator/empire-db/trunk/empire-db-examples/empire-db-example-basic/src/main/java/org/apache/empire/samples/db/SampleConfig.java
    incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/client/EmployeeServiceClient.java
    incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/common/EmployeeService.java
    incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/server/EmployeeServiceImpl.java
    incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/server/SampleConfig.java
    incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/server/ServerControl.java
    incubator/empire-db/trunk/empire-db-examples/empire-db-example-spring/src/main/java/org/apache/empire/samples/spring/SampleSpringApp.java
    incubator/empire-db/trunk/empire-db-examples/empire-db-example-spring/src/main/java/org/apache/empire/samples/spring/support/EmpireDBException.java
    incubator/empire-db/trunk/empire-db-examples/empire-db-example-spring/src/main/java/org/apache/empire/samples/spring/support/EmpireDaoSupport.java
    incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/java/org/apache/empire/struts2/websample/web/SampleConfig.java
    incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/java/org/apache/empire/struts2/websample/web/actions/LoginAction.java
    incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/java/org/apache/empire/struts2/websample/web/actiontypes/BeanDetailAction.java
    incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/db/SampleDB.java
    incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/db/SampleTable.java
    incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/db/records/EmployeeRecord.java
    incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/web/SampleApplication.java
    incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/web/SampleConfig.java
    incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/web/SampleSession.java
    incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/web/actions/EmployeeDetailAction.java
    incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/web/actions/EmployeeListAction.java
    incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/web/actions/LoginAction.java
    incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/web/actiontypes/BeanDetailAction.java
    incubator/empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/action/ActionErrorProvider.java
    incubator/empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/action/RequestParamProvider.java
    incubator/empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/action/WebAction.java
    incubator/empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/actionsupport/ActionBase.java
    incubator/empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/actionsupport/ActionError.java
    incubator/empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/actionsupport/BeanActionSupport.java
    incubator/empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/actionsupport/BeanListActionSupport.java
    incubator/empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/actionsupport/FormActionSupport.java
    incubator/empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/actionsupport/ListActionSupport.java
    incubator/empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/actionsupport/ReaderListActionSupport.java
    incubator/empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/actionsupport/RecordActionSupport.java
    incubator/empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/actionsupport/RecordFormActionSupport.java
    incubator/empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/actionsupport/TextProviderActionSupport.java
    incubator/empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/jsp/components/CalendarComponent.java
    incubator/empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/jsp/components/ControlComponent.java
    incubator/empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/jsp/components/InputControlComponent.java
    incubator/empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/jsp/controls/InputControl.java
    incubator/empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/jsp/controls/PasswordInputControl.java
    incubator/empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/jsp/controls/TextAreaInputControl.java
    incubator/empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/jsp/controls/TextInputControl.java
    incubator/empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/jsp/tags/ActionErrorsTag.java
    incubator/empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/jsp/tags/EmpireTagSupport.java
    incubator/empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/jsp/tags/EmpireValueTagSupport.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/commons/StringUtils.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/data/Record.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/data/RecordData.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/data/bean/BeanRecordProxy.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBColumn.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBCombinedCmd.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBCommand.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBCommandExpr.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBDatabase.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBDatabaseDriver.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBObject.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBQuery.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBReader.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBRecord.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBRecordData.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBRowSet.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBSQLScript.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBTable.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBTableColumn.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBView.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/derby/DBDatabaseDriverDerby.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/h2/DBDatabaseDriverH2.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/hsql/DBDatabaseDriverHSql.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/mysql/DBDatabaseDriverMySQL.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/oracle/DBCommandOracle.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/oracle/DBDatabaseDriverOracle.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/postgresql/DBDatabaseDriverPostgreSQL.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/sqlserver/DBDatabaseDriverMSSQL.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/xml/XMLConfiguration.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/xml/XMLWriter.java
    incubator/empire-db/trunk/empire-db/src/test/java/org/apache/empire/commons/ErrorsTest.java
    incubator/empire-db/trunk/empire-db/src/test/java/org/apache/empire/commons/StringUtilsTest.java
    incubator/empire-db/trunk/empire-db/src/test/java/org/apache/empire/db/DBCommandTest.java
    incubator/empire-db/trunk/empire-db/src/test/java/org/apache/empire/db/IntegerTest.java
    incubator/empire-db/trunk/empire-db/src/test/java/org/apache/empire/db/PreparedStatementTest.java
    incubator/empire-db/trunk/empire-db/src/test/java/org/apache/empire/db/hsql/DBDatabaseDriverHSqlTest.java

Propchange: incubator/empire-db/trunk/
------------------------------------------------------------------------------
    svn:mergeinfo = /incubator/empire-db/branches/EMPIREDB-99:1143342-1158327

Modified: incubator/empire-db/trunk/empire-db-codegen/src/main/java/org/apache/empire/db/codegen/CodeGenApp.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-codegen/src/main/java/org/apache/empire/db/codegen/CodeGenApp.java?rev=1158339&r1=1158338&r2=1158339&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db-codegen/src/main/java/org/apache/empire/db/codegen/CodeGenApp.java (original)
+++ incubator/empire-db/trunk/empire-db-codegen/src/main/java/org/apache/empire/db/codegen/CodeGenApp.java Tue Aug 16 15:56:41 2011
@@ -18,10 +18,9 @@
  */
 package org.apache.empire.db.codegen;
 
+import org.apache.empire.db.DBDatabase;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.apache.empire.commons.ErrorObject;
-import org.apache.empire.db.DBDatabase;
 
 /**
  * Console code generator application, takes the config file as first argument.
@@ -41,7 +40,6 @@ public class CodeGenApp {
 	 *            arguments
 	 */
 	public static void main(String[] args) {
-	    ErrorObject.setExceptionsEnabled(true);
 	    // Start code generator
 		CodeGenApp app = new CodeGenApp();
 		app.start((args.length > 0 ? args[0] : DEFAULT_CONFIG_FILE));
@@ -78,9 +76,6 @@ public class CodeGenApp {
 		CodeGenConfig config = new CodeGenConfig();
 		config.init(configFile);
 
-		// Enable Exceptions
-		ErrorObject.setExceptionsEnabled(true);
-
 		if (config.getTableClassPrefix() == null)
 			config.setTableClassPrefix("");
 

Modified: incubator/empire-db/trunk/empire-db-codegen/src/main/java/org/apache/empire/db/codegen/CodeGenConfig.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-codegen/src/main/java/org/apache/empire/db/codegen/CodeGenConfig.java?rev=1158339&r1=1158338&r2=1158339&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db-codegen/src/main/java/org/apache/empire/db/codegen/CodeGenConfig.java (original)
+++ incubator/empire-db/trunk/empire-db-codegen/src/main/java/org/apache/empire/db/codegen/CodeGenConfig.java Tue Aug 16 15:56:41 2011
@@ -18,7 +18,8 @@
  */
 package org.apache.empire.db.codegen;
 
-import org.apache.empire.commons.Errors;
+import org.apache.empire.exceptions.ItemNotFoundException;
+import org.apache.empire.exceptions.ObjectNotValidException;
 import org.apache.empire.xml.XMLConfiguration;
 import org.apache.empire.xml.XMLUtil;
 import org.apache.log4j.xml.DOMConfigurator;
@@ -202,41 +203,41 @@ public class CodeGenConfig extends XMLCo
 	 * 
 	 * @return true on success
 	 */
-	public boolean init(String filename) {
+	public void init(String filename) {
 		// Read the properties file
-		if (super.init(filename, false) == false)
-			return false;
+		super.init(filename, false);
+
         // Init Logging
         initLogging();
-		// Done
-		if (readProperties(this, "properties") == false)
-			return false;
+
 		// Reader Provider Properties
-		return true;
+		readProperties(this, "properties");
 	}
 
     /**
      * Init logging using Log4J's DOMConfigurator 
      * @return
      */
-    private boolean initLogging()
+    private void initLogging()
     {
         // Get configuration root node
         Element rootNode = getRootNode();
         if (rootNode == null)
-            return error(Errors.ObjectNotValid, getClass().getName());
+        {
+        	// TODO throw proper exception
+        	throw new ObjectNotValidException(getClass().getName());
+        }
         // Find log configuration node
         Element loggingNode = XMLUtil.findFirstChild(rootNode, loggingNodeName);
         if (loggingNode == null)
         {   // log configuration node not found
             log.error("Log configuration node {} has not been found. Logging has not been configured.", loggingNodeName);
-            return error(Errors.ItemNotFound, loggingNodeName);
+            throw new ItemNotFoundException(loggingNodeName);
         }
         // Init Log4J
         DOMConfigurator.configure(loggingNode);
         // done
         log.info("Logging sucessfully configured from node {}.", loggingNodeName);
-        return success();
     }
 
 	public String getJdbcClass() {

Modified: incubator/empire-db/trunk/empire-db-codegen/src/main/java/org/apache/empire/db/codegen/CodeGenParser.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-codegen/src/main/java/org/apache/empire/db/codegen/CodeGenParser.java?rev=1158339&r1=1158338&r2=1158339&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db-codegen/src/main/java/org/apache/empire/db/codegen/CodeGenParser.java (original)
+++ incubator/empire-db/trunk/empire-db-codegen/src/main/java/org/apache/empire/db/codegen/CodeGenParser.java Tue Aug 16 15:56:41 2011
@@ -18,8 +18,16 @@
  */
 package org.apache.empire.db.codegen;
 
-import org.apache.empire.commons.ErrorObject;
-import org.apache.empire.commons.Errors;
+import java.sql.Connection;
+import java.sql.DatabaseMetaData;
+import java.sql.DriverManager;
+import java.sql.ResultSet;
+import java.sql.ResultSetMetaData;
+import java.sql.SQLException;
+import java.sql.Types;
+import java.util.ArrayList;
+import java.util.List;
+
 import org.apache.empire.data.DataType;
 import org.apache.empire.db.DBColumn;
 import org.apache.empire.db.DBCommandExpr;
@@ -29,26 +37,17 @@ import org.apache.empire.db.DBTableColum
 import org.apache.empire.db.DBView;
 import org.apache.empire.db.DBView.DBViewColumn;
 import org.apache.empire.db.codegen.util.DBUtil;
+import org.apache.empire.exceptions.ItemNotFoundException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.sql.Connection;
-import java.sql.DatabaseMetaData;
-import java.sql.DriverManager;
-import java.sql.ResultSet;
-import java.sql.ResultSetMetaData;
-import java.sql.SQLException;
-import java.sql.Types;
-import java.util.ArrayList;
-import java.util.List;
-
 /**
  * This class is used to create a in memory DBDatabase of a given SQLConnection
  * and Configuration
  * 
  * @author Benjamin Venditti
  */
-public class CodeGenParser extends ErrorObject {
+public class CodeGenParser {
 
 	public static class InMemoryDatabase extends DBDatabase {
         private static final long serialVersionUID = 1L;
@@ -288,8 +287,9 @@ public class CodeGenParser extends Error
 			}
 	        // Check whether all key columns have been set
 	        for (i=0; i<keys.length; i++)
-	            if (keys[i]==null)
-	                error(Errors.ItemNotFound, pkCols.get(i));
+	            if (keys[i]==null){
+	            	throw new ItemNotFoundException(pkCols.get(i));
+	            }
 	        if(keys.length > 0){
 	        	t.setPrimaryKey(keys);
 	        }

Modified: incubator/empire-db/trunk/empire-db-codegen/src/main/java/org/apache/empire/db/codegen/CodeGenWriter.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-codegen/src/main/java/org/apache/empire/db/codegen/CodeGenWriter.java?rev=1158339&r1=1158338&r2=1158339&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db-codegen/src/main/java/org/apache/empire/db/codegen/CodeGenWriter.java (original)
+++ incubator/empire-db/trunk/empire-db-codegen/src/main/java/org/apache/empire/db/codegen/CodeGenWriter.java Tue Aug 16 15:56:41 2011
@@ -25,8 +25,6 @@ import java.io.Writer;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.apache.empire.db.DBDatabase;
 import org.apache.empire.db.DBTable;
 import org.apache.empire.db.DBView;
@@ -39,6 +37,8 @@ import org.apache.velocity.exception.Res
 import org.apache.velocity.runtime.RuntimeConstants;
 import org.apache.velocity.runtime.log.CommonsLogLogChute;
 import org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * This is the entry class for generating the java persistence model based on a

Modified: incubator/empire-db/trunk/empire-db-examples/empire-db-example-advanced/src/main/java/org/apache/empire/samples/db/advanced/SampleAdvApp.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-examples/empire-db-example-advanced/src/main/java/org/apache/empire/samples/db/advanced/SampleAdvApp.java?rev=1158339&r1=1158338&r2=1158339&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db-examples/empire-db-example-advanced/src/main/java/org/apache/empire/samples/db/advanced/SampleAdvApp.java (original)
+++ incubator/empire-db/trunk/empire-db-examples/empire-db-example-advanced/src/main/java/org/apache/empire/samples/db/advanced/SampleAdvApp.java Tue Aug 16 15:56:41 2011
@@ -24,7 +24,6 @@ import java.util.Date;
 import java.util.HashMap;
 
 import org.apache.empire.commons.DateUtils;
-import org.apache.empire.commons.ErrorObject;
 import org.apache.empire.commons.Options;
 import org.apache.empire.commons.StringUtils;
 import org.apache.empire.data.DataMode;
@@ -74,9 +73,6 @@ public class SampleAdvApp 
             // Init Configuration
             config.init((args.length > 0 ? args[0] : "config.xml" ));
 
-            // Enable Exceptions
-            ErrorObject.setExceptionsEnabled(true);
-
             System.out.println("Running DB Sample Advanced...");
 
             // STEP 1: Get a JDBC Connection
@@ -334,11 +330,7 @@ public class SampleAdvApp 
         rec.create(T_DEP);
         rec.setValue(T_DEP.C_NAME, departmentName);
         rec.setValue(T_DEP.C_BUSINESS_UNIT, businessUnit);
-        if (!rec.update(conn))
-        {
-            log.error(rec.getErrorMessage());
-            return 0;
-        }
+        rec.update(conn);
         // Return Department ID
         return rec.getInt(T_DEP.C_DEPARTMENT_ID);
     }
@@ -356,11 +348,7 @@ public class SampleAdvApp 
         rec.setValue(T_EMP.C_FIRSTNAME, firstName);
         rec.setValue(T_EMP.C_LASTNAME, lastName);
         rec.setValue(T_EMP.C_GENDER, gender);
-        if (!rec.update(conn))
-        {
-            log.error(rec.getErrorMessage());
-            return 0;
-        }
+        rec.update(conn);
         // Return Employee ID
         return rec.getInt(T_EMP.C_EMPLOYEE_ID);
     }
@@ -378,10 +366,7 @@ public class SampleAdvApp 
         rec.setValue(T_EDH.C_EMPLOYEE_ID, employeeId);
         rec.setValue(T_EDH.C_DEPARTMENT_ID, departmentId);
         rec.setValue(T_EDH.C_DATE_FROM, dateFrom);
-        if (!rec.update(conn))
-        {
-            log.error(rec.getErrorMessage());
-        }
+        rec.update(conn);
     }
 
     /* This procedure demonstrates the use of command parameter for prepared statements */
@@ -459,8 +444,7 @@ public class SampleAdvApp 
             // Open Reader
             System.out.println("Running Query:");
             System.out.println(cmd.getSelect());
-            if (reader.open(cmd, conn) == false)
-                throw new RuntimeException(reader.getErrorMessage());
+            reader.open(cmd, conn);
             // Print output
             DBRecord record = new DBRecord();
             while (reader.moveNext())
@@ -512,8 +496,7 @@ public class SampleAdvApp 
         {   // Open Reader
             System.out.println("Running Query:");
             System.out.println(cmd.getSelect());
-            if (reader.open(cmd, conn) == false)
-                throw new RuntimeException(reader.getErrorMessage());
+            reader.open(cmd, conn);
             // Print output
             HashMap<Integer, DBRecord> employeeMap = new HashMap<Integer, DBRecord>();
             while (reader.moveNext())
@@ -643,8 +626,7 @@ public class SampleAdvApp 
         {   // Open Reader
             System.out.println("Running Query:");
             System.out.println(cmd.getSelect());
-            if (reader.open(cmd, conn) == false)
-                throw new RuntimeException(reader.getErrorMessage());
+            reader.open(cmd, conn);
             // Print column titles 
             System.out.println("---------------------------------");
             int count = reader.getFieldCount();

Modified: incubator/empire-db/trunk/empire-db-examples/empire-db-example-advanced/src/main/java/org/apache/empire/samples/db/advanced/SampleAdvConfig.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-examples/empire-db-example-advanced/src/main/java/org/apache/empire/samples/db/advanced/SampleAdvConfig.java?rev=1158339&r1=1158338&r2=1158339&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db-examples/empire-db-example-advanced/src/main/java/org/apache/empire/samples/db/advanced/SampleAdvConfig.java (original)
+++ incubator/empire-db/trunk/empire-db-examples/empire-db-example-advanced/src/main/java/org/apache/empire/samples/db/advanced/SampleAdvConfig.java Tue Aug 16 15:56:41 2011
@@ -18,7 +18,8 @@
  */
 package org.apache.empire.samples.db.advanced;
 
-import org.apache.empire.commons.Errors;
+import org.apache.empire.exceptions.ItemNotFoundException;
+import org.apache.empire.exceptions.ObjectNotValidException;
 import org.apache.empire.xml.XMLConfiguration;
 import org.apache.empire.xml.XMLUtil;
 import org.apache.log4j.xml.DOMConfigurator;
@@ -58,42 +59,39 @@ public class SampleAdvConfig extends XML
      * 
      * @return true on success 
      */
-    public boolean init(String filename)
+    public void init(String filename)
     {
         // Read the properties file
-        if (super.init(filename, false) == false)
-            return false;
+        super.init(filename, false);
         // Init Logging
         initLogging();
         // Done
-        if (readProperties(this, "properties")==false)
-            return false;
+        readProperties(this, "properties");
         // Reader Provider Properties
-        return readProperties(this, "properties-" + databaseProvider);
+        readProperties(this, "properties-" + databaseProvider);
     }
 
     /**
      * Init logging using Log4J's DOMConfigurator 
      * @return
      */
-    private boolean initLogging()
+    private void initLogging()
     {
         // Get configuration root node
         Element rootNode = getRootNode();
         if (rootNode == null)
-            return error(Errors.ObjectNotValid, getClass().getName());
+            throw new ObjectNotValidException(this);
         // Find log configuration node
         Element loggingNode = XMLUtil.findFirstChild(rootNode, loggingNodeName);
         if (loggingNode == null)
         {   // log configuration node not found
             log.error("Log configuration node {} has not been found. Logging has not been configured.", loggingNodeName);
-            return error(Errors.ItemNotFound, loggingNodeName);
+            throw new ItemNotFoundException(loggingNodeName);
         }
         // Init Log4J
         DOMConfigurator.configure(loggingNode);
         // done
         log.info("Logging sucessfully configured from node {}.", loggingNodeName);
-        return success();
     }
 
     public String getDatabaseProvider()

Modified: incubator/empire-db/trunk/empire-db-examples/empire-db-example-basic/src/main/java/org/apache/empire/samples/db/SampleApp.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-examples/empire-db-example-basic/src/main/java/org/apache/empire/samples/db/SampleApp.java?rev=1158339&r1=1158338&r2=1158339&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db-examples/empire-db-example-basic/src/main/java/org/apache/empire/samples/db/SampleApp.java (original)
+++ incubator/empire-db/trunk/empire-db-examples/empire-db-example-basic/src/main/java/org/apache/empire/samples/db/SampleApp.java Tue Aug 16 15:56:41 2011
@@ -22,8 +22,8 @@ import java.sql.Connection;
 import java.sql.DriverManager;
 import java.util.List;
 
-import org.apache.empire.commons.ErrorObject;
 import org.apache.empire.commons.StringUtils;
+import org.apache.empire.data.bean.BeanResult;
 import org.apache.empire.db.DBColumnExpr;
 import org.apache.empire.db.DBCommand;
 import org.apache.empire.db.DBDatabaseDriver;
@@ -70,9 +70,6 @@ public class SampleApp 
 			// Init Configuration
 			config.init((args.length > 0 ? args[0] : "config.xml" ));
 
-			// Enable Exceptions
-            ErrorObject.setExceptionsEnabled(true);
-
 			System.out.println("Running DB Sample...");
 
 			// STEP 1: Get a JDBC Connection
@@ -145,6 +142,9 @@ public class SampleApp 
 			System.out.println("*** Step 8 Option 3: queryRecords() / XML-Output ***");
 			queryRecords(conn, QueryType.XmlDocument); // XML-Output
 
+			// STEP 9: Use Bean Result to query beans
+			queryBeans(conn);
+			
 			// Done
 			System.out.println("DB Sample finished successfully.");
 
@@ -160,7 +160,7 @@ public class SampleApp 
 	/**
      * <PRE>
 	 * Opens and returns a JDBC-Connection.
-	 * JDBC url, user and password for the connection are obained from the SampleConfig bean
+	 * JDBC url, user and password for the connection are obtained from the SampleConfig bean
 	 * Please use the config.xml file to change connection params.
      * </PRE>
 	 */
@@ -227,7 +227,7 @@ public class SampleApp 
 	 * Checks whether the database exists or not by executing
 	 *     select count(*) from DEPARTMENTS
 	 * If the Departments table does not exist the querySingleInt() function return -1 for failure.
-	 * Please note that in this case an error will appear in the log wich can be ingored.
+	 * Please note that in this case an error will appear in the log which can be ignored.
      * </PRE>
 	 */
 	private static boolean databaseExists(Connection conn)
@@ -243,7 +243,7 @@ public class SampleApp 
 	/**
      * <PRE>
 	 * Creates a DDL Script for entire SampleDB Database and executes it line by line.
-	 * Please make sure you uses the correct DatabaseDriver for your target dbms.
+	 * Please make sure you uses the correct DatabaseDriver for your target DBMS.
      * </PRE>
 	 */
 	private static void createDatabase(DBDatabaseDriver driver, Connection conn)
@@ -377,8 +377,7 @@ public class SampleApp 
 		// Select required columns
 		cmd.select(EMP.EMPLOYEE_ID, EMPLOYEE_FULLNAME);
 		if(db.getDriver() instanceof DBDatabaseDriverPostgreSQL)
-		{
-			// postgres does not support the substring expression
+		{	// postgres does not support the substring expression
 			cmd.select(EMP.GENDER, EMP.PHONE_NUMBER);
 		}else{
 			cmd.select(EMP.GENDER, EMP.PHONE_NUMBER, PHONE_EXT_NUMBER);
@@ -448,4 +447,20 @@ public class SampleApp 
 		}
 	}
 	
+	private static void queryBeans(Connection conn)
+	{
+        // Query all males
+	    BeanResult<SampleBean> result = new BeanResult<SampleBean>(SampleBean.class, db.EMPLOYEES);
+        result.getCommand().where(db.EMPLOYEES.GENDER.is("M"));
+	    result.fetch(conn);
+	    
+	    System.out.println("Number of male employees is: "+result.size());
+
+	    // And now, the females
+	    result.getCommand().where(db.EMPLOYEES.GENDER.is("F"));
+	    result.fetch(conn);
+	    
+        System.out.println("Number of female employees is: "+result.size());
+	}
+	
 }

Modified: incubator/empire-db/trunk/empire-db-examples/empire-db-example-basic/src/main/java/org/apache/empire/samples/db/SampleConfig.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-examples/empire-db-example-basic/src/main/java/org/apache/empire/samples/db/SampleConfig.java?rev=1158339&r1=1158338&r2=1158339&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db-examples/empire-db-example-basic/src/main/java/org/apache/empire/samples/db/SampleConfig.java (original)
+++ incubator/empire-db/trunk/empire-db-examples/empire-db-example-basic/src/main/java/org/apache/empire/samples/db/SampleConfig.java Tue Aug 16 15:56:41 2011
@@ -18,7 +18,8 @@
  */
 package org.apache.empire.samples.db;
 
-import org.apache.empire.commons.Errors;
+import org.apache.empire.exceptions.ItemNotFoundException;
+import org.apache.empire.exceptions.ObjectNotValidException;
 import org.apache.empire.xml.XMLConfiguration;
 import org.apache.empire.xml.XMLUtil;
 import org.apache.log4j.xml.DOMConfigurator;
@@ -57,42 +58,39 @@ public class SampleConfig extends XMLCon
      * 
      * @return true on success
      */
-    public boolean init(String filename)
+    public void init(String filename)
     {
         // Read the properties file
-        if (super.init(filename, false) == false)
-            return false;
+        super.init(filename, false);
         // Init Logging
         initLogging();
         // Done
-        if (readProperties(this, "properties")==false)
-            return false;
+        readProperties(this, "properties");
         // Reader Provider Properties
-        return readProperties(this, "properties-" + databaseProvider);
+        readProperties(this, "properties-" + databaseProvider);
     }
 
     /**
      * Init logging using Log4J's DOMConfigurator 
      * @return
      */
-    private boolean initLogging()
+    private void initLogging()
     {
         // Get configuration root node
         Element rootNode = getRootNode();
         if (rootNode == null)
-            return error(Errors.ObjectNotValid, getClass().getName());
+            throw new ObjectNotValidException(this);
         // Find log configuration node
         Element loggingNode = XMLUtil.findFirstChild(rootNode, loggingNodeName);
         if (loggingNode == null)
         {   // log configuration node not found
             log.error("Log configuration node {} has not been found. Logging has not been configured.", loggingNodeName);
-            return error(Errors.ItemNotFound, loggingNodeName);
+            throw new ItemNotFoundException(loggingNodeName);
         }
         // Init Log4J
         DOMConfigurator.configure(loggingNode);
         // done
         log.info("Logging sucessfully configured from node {}.", loggingNodeName);
-        return success();
     }
     
     public String getDatabaseProvider()

Modified: incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/client/EmployeeServiceClient.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/client/EmployeeServiceClient.java?rev=1158339&r1=1158338&r2=1158339&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/client/EmployeeServiceClient.java (original)
+++ incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/client/EmployeeServiceClient.java Tue Aug 16 15:56:41 2011
@@ -60,19 +60,18 @@ public class EmployeeServiceClient
         return service.getEmmployee(id);
     }
 
-    public boolean saveEmployee(Employee e)
+    public void saveEmployee(Employee e)
     {
         // Employee is here a INOUT parameter, and therfore has to be placed in a Holder.
         Holder<Employee> holder = new Holder<Employee>(e);
-        boolean retVal = service.saveEmmployee(holder);
+        service.saveEmmployee(holder);
         // In order to retrieve changes made by the webservice we copy the content to our local variable.
         e.set(holder.value);
-        return retVal;
     }
 
-    public boolean deleteEmployee(int id)
+    public void deleteEmployee(int id)
     {
-        return service.deleteEmmployee(id);
+        service.deleteEmmployee(id);
     }
 
     public List<Employee> searchEmployee(Integer id, String firstName, String lastName, Integer department)

Modified: incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/common/EmployeeService.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/common/EmployeeService.java?rev=1158339&r1=1158338&r2=1158339&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/common/EmployeeService.java (original)
+++ incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/common/EmployeeService.java Tue Aug 16 15:56:41 2011
@@ -23,9 +23,9 @@ import java.util.List;
 
 import javax.jws.WebMethod;
 import javax.jws.WebParam;
+import javax.jws.WebParam.Mode;
 import javax.jws.WebResult;
 import javax.jws.WebService;
-import javax.jws.WebParam.Mode;
 import javax.xml.ws.Holder;
 
 //specifies the the attribute wsdl:portType
@@ -50,11 +50,11 @@ public interface EmployeeService
 
     @WebMethod(operationName = "saveEmmployee")
     @WebResult(name = "saveResponse")
-    public boolean saveEmmployee(@WebParam(name = "employee", mode = Mode.INOUT) Holder<Employee> e);
+    public void saveEmmployee(@WebParam(name = "employee", mode = Mode.INOUT) Holder<Employee> e);
 
     @WebMethod(operationName = "deleteEmmployee")
     @WebResult(name = "deleteResponse")
-    public boolean deleteEmmployee(@WebParam(name = "id", mode = Mode.IN) int id);
+    public void deleteEmmployee(@WebParam(name = "id", mode = Mode.IN) int id);
 
     @WebMethod(operationName = "getDepartments")
     @WebResult(name = "allDepartments")

Modified: incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/server/EmployeeServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/server/EmployeeServiceImpl.java?rev=1158339&r1=1158338&r2=1158339&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/server/EmployeeServiceImpl.java (original)
+++ incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/server/EmployeeServiceImpl.java Tue Aug 16 15:56:41 2011
@@ -55,26 +55,22 @@ public class EmployeeServiceImpl impleme
         T_EMP = db.EMPLOYEES;
     }
 
-    public boolean saveEmmployee(javax.xml.ws.Holder<Employee> empHolder)
+    public void saveEmmployee(javax.xml.ws.Holder<Employee> empHolder)
     {
         DBRecord r = new DBRecord();
         Employee emp = empHolder.value;
         boolean init;
         if (emp.isNew())
-            init = r.create(T_EMP, conn);
+            r.create(T_EMP, conn);
         else
-            init = r.read(T_EMP, emp.getEmployeeId(), conn);
+            r.read(T_EMP, emp.getEmployeeId(), conn);
 
-        boolean fill = r.setBeanValues(emp);
-        boolean save = r.update(conn);
+        r.setBeanValues(emp);
+        r.update(conn);
 
-        if (init && fill && save)
-        {
-            r.getBeanProperties(emp);
-            emp.setNew(false);
-        }
 
-        return init && fill && save;
+        r.getBeanProperties(emp);
+        emp.setNew(false);
     }
 
     public List<Employee> searchEmmployee(Integer id, String firstName, String lastName, Integer department)
@@ -128,17 +124,17 @@ public class EmployeeServiceImpl impleme
         Employee emp = new Employee();
 
         // null, so that no IDs are wasted.
-        boolean create = r.create(T_EMP, null);
-        boolean fill = r.getBeanProperties(emp);
+        r.create(T_EMP, null);
+        r.getBeanProperties(emp);
 
         emp.setNew(true);
 
-        return (create && fill ? emp : null);
+        return emp;
     }
 
-    public boolean deleteEmmployee(int id)
+    public void deleteEmmployee(int id)
     {
-        return T_EMP.deleteRecord(id, conn);
+        T_EMP.deleteRecord(id, conn);
     }
 
     public Employee getEmmployee(int id)
@@ -146,10 +142,9 @@ public class EmployeeServiceImpl impleme
         DBRecord r = new DBRecord();
         Employee emp = new Employee();
 
-        boolean read = r.read(T_EMP, id, conn);
-        boolean fill = r.getBeanProperties(emp);
-
-        return (read && fill ? emp : null);
+        r.read(T_EMP, id, conn);
+        r.getBeanProperties(emp);
+        return emp;
     }
 
     public boolean ping()

Modified: incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/server/SampleConfig.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/server/SampleConfig.java?rev=1158339&r1=1158338&r2=1158339&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/server/SampleConfig.java (original)
+++ incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/server/SampleConfig.java Tue Aug 16 15:56:41 2011
@@ -41,15 +41,13 @@ public class SampleConfig extends XMLCon
 	 * 
 	 * @return true on success
 	 */
-	public boolean init(String filename) {
+	public void init(String filename) {
 		// Read the properties file
-		if (super.init(filename, false) == false)
-			return false;
+		super.init(filename, false);
 		// Done
-		if (readProperties(this, "properties")==false)
-			return false;
+		readProperties(this, "properties");
 		// Reader Provider Properties
-		return readProperties(this, "properties-" + databaseProvider);
+		readProperties(this, "properties-" + databaseProvider);
 	}
 
 	public String getDatabaseProvider() {

Modified: incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/server/ServerControl.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/server/ServerControl.java?rev=1158339&r1=1158338&r2=1158339&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/server/ServerControl.java (original)
+++ incubator/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/server/ServerControl.java Tue Aug 16 15:56:41 2011
@@ -117,7 +117,8 @@ public class ServerControl
 
         // Open Database (and create if not existing)
         log.info("*** open database ***");
-        if (!db.open(driver, conn) || !databaseExists(conn))
+        db.open(driver, conn);
+        if (!databaseExists(conn))
         {
             // STEP 4: Create Database
             log.info("*** create Database ***");
@@ -231,8 +232,8 @@ public class ServerControl
         script.run(driver, conn, false);
         db.commit(conn);
         // Open again
-        if (!db.isOpen() && !db.open(driver, conn)){
-            throw new RuntimeException(driver.getErrorMessage());
+        if (!db.isOpen()){
+    		db.open(driver, conn);
         }
         // Insert Sample Departments
         int idDevDep = insertDepartmentSampleRecord(conn, "Development", "ITTK");
@@ -255,11 +256,7 @@ public class ServerControl
         rec.create(db.DEPARTMENTS);
         rec.setValue(db.DEPARTMENTS.NAME, department_name);
         rec.setValue(db.DEPARTMENTS.BUSINESS_UNIT, businessUnit);
-        if (!rec.update(conn))
-        {
-            log.error(rec.getErrorMessage());
-            return 0;
-        }
+        rec.update(conn);
         // Return Department ID
         return rec.getInt(db.DEPARTMENTS.DEPARTMENT_ID);
     }
@@ -278,11 +275,7 @@ public class ServerControl
         rec.setValue(db.EMPLOYEES.LASTNAME, lastName);
         rec.setValue(db.EMPLOYEES.GENDER, gender);
         rec.setValue(db.EMPLOYEES.DEPARTMENT_ID, depID);
-        if (!rec.update(conn))
-        {
-            log.error(rec.getErrorMessage());
-            return 0;
-        }
+        rec.update(conn);
         // Return Employee ID
         return rec.getInt(db.EMPLOYEES.EMPLOYEE_ID);
     }

Modified: incubator/empire-db/trunk/empire-db-examples/empire-db-example-spring/src/main/java/org/apache/empire/samples/spring/SampleSpringApp.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-examples/empire-db-example-spring/src/main/java/org/apache/empire/samples/spring/SampleSpringApp.java?rev=1158339&r1=1158338&r2=1158339&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db-examples/empire-db-example-spring/src/main/java/org/apache/empire/samples/spring/SampleSpringApp.java (original)
+++ incubator/empire-db/trunk/empire-db-examples/empire-db-example-spring/src/main/java/org/apache/empire/samples/spring/SampleSpringApp.java Tue Aug 16 15:56:41 2011
@@ -20,7 +20,6 @@ package org.apache.empire.samples.spring
 
 import java.util.logging.Logger;
 
-import org.apache.empire.commons.ErrorObject;
 import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
 import org.springframework.context.ApplicationContext;
 import org.springframework.context.support.GenericApplicationContext;
@@ -31,9 +30,7 @@ import org.springframework.core.io.Class
  */
 public class SampleSpringApp {
     private static final Logger log = Logger.getLogger(SampleSpringApp.class.getName());
-    static {
-        ErrorObject.setExceptionsEnabled(true);
-    }
+
     //creates the application context
     //this is usually in some bootstrapping code; so your application will
     //just have one at runtime.

Modified: incubator/empire-db/trunk/empire-db-examples/empire-db-example-spring/src/main/java/org/apache/empire/samples/spring/support/EmpireDBException.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-examples/empire-db-example-spring/src/main/java/org/apache/empire/samples/spring/support/EmpireDBException.java?rev=1158339&r1=1158338&r2=1158339&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db-examples/empire-db-example-spring/src/main/java/org/apache/empire/samples/spring/support/EmpireDBException.java (original)
+++ incubator/empire-db/trunk/empire-db-examples/empire-db-example-spring/src/main/java/org/apache/empire/samples/spring/support/EmpireDBException.java Tue Aug 16 15:56:41 2011
@@ -18,13 +18,13 @@
  */
 package org.apache.empire.samples.spring.support;
 
-import org.apache.empire.EmpireException;
+import org.apache.empire.exceptions.EmpireException;
 import org.springframework.dao.UncategorizedDataAccessException;
 
 /**
  * Exception inside springs exception hierarchy. This may be good for client
  * code that catches any {@link org.springframework.dao.DataAccessException}
- * and doesn't want to look for implementation specific {@link org.apache.empire.EmpireException}.
+ * and doesn't want to look for implementation specific {@link org.apache.empire.exceptions.EmpireException}.
  */
 public class EmpireDBException extends UncategorizedDataAccessException {
 

Modified: incubator/empire-db/trunk/empire-db-examples/empire-db-example-spring/src/main/java/org/apache/empire/samples/spring/support/EmpireDaoSupport.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-examples/empire-db-example-spring/src/main/java/org/apache/empire/samples/spring/support/EmpireDaoSupport.java?rev=1158339&r1=1158338&r2=1158339&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db-examples/empire-db-example-spring/src/main/java/org/apache/empire/samples/spring/support/EmpireDaoSupport.java (original)
+++ incubator/empire-db/trunk/empire-db-examples/empire-db-example-spring/src/main/java/org/apache/empire/samples/spring/support/EmpireDaoSupport.java Tue Aug 16 15:56:41 2011
@@ -20,13 +20,13 @@ package org.apache.empire.samples.spring
 
 import java.sql.Connection;
 
-import org.apache.empire.EmpireException;
 import org.apache.empire.db.DBCommand;
 import org.apache.empire.db.DBDatabase;
 import org.apache.empire.db.DBDatabaseDriver;
 import org.apache.empire.db.DBReader;
 import org.apache.empire.db.DBSQLScript;
 import org.apache.empire.db.DBTable;
+import org.apache.empire.exceptions.EmpireException;
 import org.springframework.jdbc.core.support.JdbcDaoSupport;
 
 /**

Modified: incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/java/org/apache/empire/struts2/websample/web/SampleConfig.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/java/org/apache/empire/struts2/websample/web/SampleConfig.java?rev=1158339&r1=1158338&r2=1158339&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/java/org/apache/empire/struts2/websample/web/SampleConfig.java (original)
+++ incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/java/org/apache/empire/struts2/websample/web/SampleConfig.java Tue Aug 16 15:56:41 2011
@@ -34,15 +34,13 @@ public class SampleConfig extends XMLCon
 	/**
 	 * Initialize the configuration
 	 */
-	public boolean init(String filename) {
+	public void init(String filename) {
 		// Read the properties file
-		if (super.init(filename, false) == false)
-			return false;
+		super.init(filename, false);
 		// Done
-		if (readProperties(this, "properties") == false)
-			return false;
+		readProperties(this, "properties");
 		// Reader Provider Properties
-		return readProperties(this, "properties-" + databaseProvider);
+		readProperties(this, "properties-" + databaseProvider);
 	}
 
 	public String getDatabaseProvider() {

Modified: incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/java/org/apache/empire/struts2/websample/web/actions/LoginAction.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/java/org/apache/empire/struts2/websample/web/actions/LoginAction.java?rev=1158339&r1=1158338&r2=1158339&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/java/org/apache/empire/struts2/websample/web/actions/LoginAction.java (original)
+++ incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/java/org/apache/empire/struts2/websample/web/actions/LoginAction.java Tue Aug 16 15:56:41 2011
@@ -21,9 +21,9 @@ package org.apache.empire.struts2.websam
 import java.util.Locale;
 import java.util.Map;
 
-import org.apache.empire.commons.Errors;
 import org.apache.empire.commons.OptionEntry;
 import org.apache.empire.commons.Options;
+import org.apache.empire.struts2.websample.web.SampleErrors;
 import org.apache.empire.struts2.websample.web.SampleUser;
 import org.apache.empire.struts2.websample.web.actiontypes.SampleAction;
 
@@ -114,7 +114,7 @@ public class LoginAction extends SampleA
 
         if (userID == null || userID.length() == 0)
         {
-            setActionError(Errors.InvalidPassword);
+        	setActionError(SampleErrors.InvalidPassword);
             return INPUT;
         }
 

Modified: incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/java/org/apache/empire/struts2/websample/web/actiontypes/BeanDetailAction.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/java/org/apache/empire/struts2/websample/web/actiontypes/BeanDetailAction.java?rev=1158339&r1=1158338&r2=1158339&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/java/org/apache/empire/struts2/websample/web/actiontypes/BeanDetailAction.java (original)
+++ incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/java/org/apache/empire/struts2/websample/web/actiontypes/BeanDetailAction.java Tue Aug 16 15:56:41 2011
@@ -18,13 +18,14 @@
  */
 package org.apache.empire.struts2.websample.web.actiontypes;
 
-import org.apache.empire.commons.Errors;
 import org.apache.empire.data.Record;
 import org.apache.empire.data.bean.BeanClass;
 import org.apache.empire.data.bean.BeanRecordProxy;
+import org.apache.empire.exceptions.ItemNotFoundException;
+import org.apache.empire.exceptions.ObjectNotValidException;
 import org.apache.empire.struts2.actionsupport.BeanActionSupport;
 import org.apache.empire.struts2.actionsupport.SessionPersistence;
-import org.apache.empire.struts2.web.WebErrors;
+import org.apache.empire.struts2.exceptions.InvalidFormDataException;
 
 import com.opensymphony.xwork2.interceptor.NoParameters;
 
@@ -78,7 +79,7 @@ public abstract class BeanDetailAction<T
         if (bean==null)
         {   // Must have an action error set!
             if (!hasActionError())
-                setActionError(Errors.ObjectNotValid, beanSupport.getRecordPropertyName());
+                setActionError(new ObjectNotValidException(beanSupport.getRecordPropertyName()));
             return doCancel();
         }
         beanSupport.setData(bean);
@@ -96,7 +97,7 @@ public abstract class BeanDetailAction<T
             if (bean==null)
             {   // Must have an action error set!
                 if (!hasActionError())
-                    setActionError(Errors.ItemNotFound, beanSupport.getRecordKeyString());
+                    setActionError(new ItemNotFoundException(beanSupport.getRecordKeyString()));
                 return doCancel();
             }
             beanSupport.setData(bean);
@@ -104,7 +105,7 @@ public abstract class BeanDetailAction<T
         // Check if record is valid
         if (beanSupport.isValid()==false)
         {
-            setActionError(WebErrors.InvalidFormData);
+            setActionError(new InvalidFormDataException());
             return doCancel();
         }
         // Test
@@ -153,7 +154,7 @@ public abstract class BeanDetailAction<T
             if (bean==null)
             {   // Must have an action error set!
                 if (!hasActionError())
-                    setActionError(Errors.ItemNotFound, beanSupport.getRecordKeyString());
+                    setActionError(new ItemNotFoundException(beanSupport.getRecordKeyString()));
                 return doCancel();
             }
             beanSupport.setData(bean);
@@ -162,7 +163,7 @@ public abstract class BeanDetailAction<T
         {   // Check whether we have the right key
             if (!beanSupport.checkKey())
             {   // Record's don't match
-                setActionError(WebErrors.InvalidFormData);
+                setActionError(new InvalidFormDataException());
                 return doCancel();
             }
         }

Modified: incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/db/SampleDB.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/db/SampleDB.java?rev=1158339&r1=1158338&r2=1158339&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/db/SampleDB.java (original)
+++ incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/db/SampleDB.java Tue Aug 16 15:56:41 2011
@@ -19,8 +19,8 @@
 package org.apache.empire.struts2.websample.db;
 
 import org.apache.empire.commons.Options;
-import org.apache.empire.data.DataType;
 import org.apache.empire.data.DataMode;
+import org.apache.empire.data.DataType;
 import org.apache.empire.db.DBColumn;
 import org.apache.empire.db.DBDatabase;
 import org.apache.empire.db.DBTableColumn;
@@ -42,6 +42,8 @@ public class SampleDB extends DBDatabase
      */
     public static class Departments extends SampleTable
     {
+        private static final long serialVersionUID = 1L;
+        
         public final DBTableColumn C_DEPARTMENT_ID;
         public final DBTableColumn C_NAME;
         public final DBTableColumn C_HEAD;
@@ -73,6 +75,8 @@ public class SampleDB extends DBDatabase
      */
     public static class Employees extends SampleTable
     {
+        private static final long serialVersionUID = 1L;
+        
         public final DBTableColumn C_EMPLOYEE_ID;
         public final DBTableColumn C_SALUTATION;
         public final DBTableColumn C_FIRSTNAME;

Modified: incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/db/SampleTable.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/db/SampleTable.java?rev=1158339&r1=1158338&r2=1158339&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/db/SampleTable.java (original)
+++ incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/db/SampleTable.java Tue Aug 16 15:56:41 2011
@@ -40,7 +40,7 @@ public class SampleTable extends DBTable
     }
 
     @Override
-    protected boolean addColumn(DBTableColumn column)
+    protected void addColumn(DBTableColumn column)
     {
         // Set Translation Title
         String col = column.getBeanPropertyName();  
@@ -53,6 +53,6 @@ public class SampleTable extends DBTable
         column.setControlType((type==DataType.BOOL) ? "checkbox" : "text");
 
         // Add Column
-        return super.addColumn(column);
+        super.addColumn(column);
     }
 }

Modified: incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/db/records/EmployeeRecord.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/db/records/EmployeeRecord.java?rev=1158339&r1=1158338&r2=1158339&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/db/records/EmployeeRecord.java (original)
+++ incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/db/records/EmployeeRecord.java Tue Aug 16 15:56:41 2011
@@ -45,10 +45,7 @@ public class EmployeeRecord extends Samp
     {
         DepartmentRecord rec = new DepartmentRecord(context);
         SampleDB.Departments table = SampleDB.getInstance().T_DEPARTMENTS;
-        if (!rec.read(table, this.getInt(T.C_DEPARTMENT_ID), context.getConnection())) {
-            log.error("Unable to get department record. Message is " + rec.getErrorMessage());
-            return null;
-        }
+        rec.read(table, this.getInt(T.C_DEPARTMENT_ID), context.getConnection());
         return rec; 
     }
     

Modified: incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/web/SampleApplication.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/web/SampleApplication.java?rev=1158339&r1=1158338&r2=1158339&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/web/SampleApplication.java (original)
+++ incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/web/SampleApplication.java Tue Aug 16 15:56:41 2011
@@ -31,6 +31,7 @@ import org.apache.empire.db.DBSQLScript;
 import org.apache.empire.db.hsql.DBDatabaseDriverHSql;
 import org.apache.empire.db.mysql.DBDatabaseDriverMySQL;
 import org.apache.empire.db.oracle.DBDatabaseDriverOracle;
+import org.apache.empire.db.postgresql.DBDatabaseDriverPostgreSQL;
 import org.apache.empire.db.sqlserver.DBDatabaseDriverMSSQL;
 import org.apache.empire.struts2.actionsupport.TextProviderActionSupport;
 import org.apache.empire.struts2.html.HtmlTagDictionary;
@@ -86,14 +87,33 @@ public class SampleApplication implement
 			log.info("*** create DBDatabaseDriverOracle() ***");
 			DBDatabaseDriver driver = getDatabaseDriver(config.getDatabaseProvider());
 
-			// Open Database (and create if not existing)
-			log.info("*** open database ***");
-			if (!db.open(driver, conn) || !databaseExists(conn)) {
-				// STEP 4: Create Database
-				log.info("*** create Database ***");
-				createSampleDatabase(driver, conn);
-			}
-
+            // Open Database (and create if not existing)
+            log.info("*** open database ***");
+            try {
+                // Open the database
+                db.open(driver, conn);
+                // Check whether database exists
+                databaseExists(conn);
+                System.out.println("*** Database already exists. Skipping Step4 ***");
+                
+            } catch(Exception e) {
+                // STEP 4: Create Database
+                log.info("*** create Database ***");
+                // postgre does not support DDL in transaction
+                if(db.getDriver() instanceof DBDatabaseDriverPostgreSQL)
+                {
+                    conn.setAutoCommit(true);
+                }
+                createSampleDatabase(driver, conn);
+                if(db.getDriver() instanceof DBDatabaseDriverPostgreSQL)
+                {
+                    conn.setAutoCommit(false);
+                }
+                // Open again
+                if (db.isOpen()==false)
+                    db.open(driver, conn);
+            }
+			
 			/*
 			// Check Database Definition against Real Database(log differences)
 			log.info("*** driver.checkDatabase() ***");
@@ -191,11 +211,11 @@ public class SampleApplication implement
         }
     }
 
-	private boolean databaseExists(Connection conn) {
+	private void databaseExists(Connection conn) {
 		// Check wether DB exists
 		DBCommand cmd = db.createCommand();
 		cmd.select(db.T_DEPARTMENTS.count());
-		return (db.querySingleInt(cmd.getSelect(), -1, conn) >= 0);
+		db.querySingleInt(cmd.getSelect(), -1, conn);
 	}
 	
 	/*
@@ -215,10 +235,8 @@ public class SampleApplication implement
         script.run(driver, conn, false);
         db.commit(conn);
         // Open again
-        if (!db.isOpen() && !db.open(driver, conn))
-        {
-            throw new RuntimeException(driver.getErrorMessage());
-        }
+        if (db.isOpen()==false)
+            db.open(driver, conn);
 		// Insert Sample Departments
 		int idDevDep = insertDepartmentSampleRecord(conn, "Development", "ITTK");
 		int idSalDep = insertDepartmentSampleRecord(conn, "Sales", "ITTK");
@@ -239,10 +257,7 @@ public class SampleApplication implement
 			rec.create(db.T_DEPARTMENTS);
 			rec.setValue(db.T_DEPARTMENTS.C_NAME, department_name);
 			rec.setValue(db.T_DEPARTMENTS.C_BUSINESS_UNIT, businessUnit);
-			if (!rec.update(conn)) {
-				log.error(rec.getErrorMessage());
-				return 0;
-			}
+			rec.update(conn);
 			// Return Department ID
 			return rec.getInt(db.T_DEPARTMENTS.C_DEPARTMENT_ID);
 		}
@@ -259,10 +274,7 @@ public class SampleApplication implement
 		rec.setValue(db.T_EMPLOYEES.C_LASTNAME, lastName);
 		rec.setValue(db.T_EMPLOYEES.C_GENDER, gender);
 		rec.setValue(db.T_EMPLOYEES.C_DEPARTMENT_ID, depID);
-		if (!rec.update(conn)) {
-			log.error(rec.getErrorMessage());
-			return 0; 
-		}
+		rec.update(conn);
 		// Return Employee ID
 		return rec.getInt(db.T_EMPLOYEES.C_EMPLOYEE_ID);
 	}

Modified: incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/web/SampleConfig.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/web/SampleConfig.java?rev=1158339&r1=1158338&r2=1158339&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/web/SampleConfig.java (original)
+++ incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/web/SampleConfig.java Tue Aug 16 15:56:41 2011
@@ -41,15 +41,13 @@ public class SampleConfig extends XMLCon
 	 * 
 	 * @return true on success 
 	 */
-	public boolean init(String filename) {
+	public void init(String filename) {
 		// Read the properties file
-		if (super.init(filename, false) == false)
-			return false;
+		super.init(filename, false);
 		// Done
-		if (readProperties(this, "properties")==false)
-			return false;
+		readProperties(this, "properties");
 		// Reader Provider Properties
-		return readProperties(this, "properties-" + databaseProvider);
+		readProperties(this, "properties-" + databaseProvider);
 	}
 
 	public String getDatabaseProvider() {

Modified: incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/web/SampleSession.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/web/SampleSession.java?rev=1158339&r1=1158338&r2=1158339&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/web/SampleSession.java (original)
+++ incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/web/SampleSession.java Tue Aug 16 15:56:41 2011
@@ -67,7 +67,7 @@ public class SampleSession implements We
         return objectMap.get(name);
     }
     
-    public final Object getObject(Class objclass)
+    public final Object getObject(Class<?> objclass)
     {
         return getObject(objclass.getName());
     }
@@ -77,7 +77,7 @@ public class SampleSession implements We
         return objectMap.put(name, obj);
     }
     
-    public final Object setObject(Class objclass, Object obj)
+    public final Object setObject(Class<?> objclass, Object obj)
     {
         return setObject(objclass.getName(), obj);
     }

Modified: incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/web/actions/EmployeeDetailAction.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/web/actions/EmployeeDetailAction.java?rev=1158339&r1=1158338&r2=1158339&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/web/actions/EmployeeDetailAction.java (original)
+++ incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/web/actions/EmployeeDetailAction.java Tue Aug 16 15:56:41 2011
@@ -32,7 +32,7 @@ import org.apache.struts2.interceptor.No
  * This class provides form processing functions for an Employee record.<br>
  * The class uses a RecordActionSupport object which does most of the work.<br>
  * For multi-record forms it is possible to have several RecordActionSupport members.<br>
- * In this case each must be given a differnt property name however (see RecordActionSupport overloads).
+ * In this case each must be given a different property name however (see RecordActionSupport overloads).
  * </p>
  */
 public class EmployeeDetailAction extends DetailAction
@@ -67,7 +67,6 @@ public class EmployeeDetailAction extend
     public String doCreate() {
         // Create Record
         if (!recordSupport.createRecord()) {
-            setActionError(recordSupport);
             return RETURN;
         }
         // Done
@@ -78,7 +77,6 @@ public class EmployeeDetailAction extend
     public String doLoad() {
         // Load Record
         if (!recordSupport.loadRecord()) {
-            setActionError(recordSupport);
             return RETURN;
         }
         // Set Edit Mode
@@ -89,13 +87,10 @@ public class EmployeeDetailAction extend
     public String doSave() {
         // Load Form Data into record
         if (!recordSupport.loadFormData()) {
-            if (recordSupport.hasError())
-                setActionError(recordSupport);
             return INPUT;
         }
         // Now save the record
         if (!recordSupport.saveChanges()) {
-            setActionError(recordSupport);
             return INPUT;
         }
         // Erfolg
@@ -106,7 +101,6 @@ public class EmployeeDetailAction extend
     public String doDelete() {
         // Delete Record
         if (!recordSupport.deleteRecord()) {
-            setActionError(recordSupport);
             return INPUT;
         }
         // Erfolg

Modified: incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/web/actions/EmployeeListAction.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/web/actions/EmployeeListAction.java?rev=1158339&r1=1158338&r2=1158339&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/web/actions/EmployeeListAction.java (original)
+++ incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/web/actions/EmployeeListAction.java Tue Aug 16 15:56:41 2011
@@ -238,10 +238,10 @@ public class EmployeeListAction extends 
         SearchInfo si = getSearchInfo();
         if (si.getDepartmentId()!=null)
             cmd.where(EMP.C_DEPARTMENT_ID.is(si.getDepartmentId()));
-        if (StringUtils.isValid( si.getFirstName()) )
+        if (StringUtils.isNotEmpty( si.getFirstName()) )
             cmd.where(EMP.C_FIRSTNAME.likeUpper( si.getFirstName()+"%" )
                   .or(EMP.C_FIRSTNAME.is(null)));
-        if (StringUtils.isValid( si.getLastName()) )
+        if (StringUtils.isNotEmpty( si.getLastName()) )
             cmd.where(EMP.C_LASTNAME.likeUpper( si.getLastName()+"%" ));
         
         cmd.orderBy(EMP.C_LASTNAME);
@@ -249,8 +249,7 @@ public class EmployeeListAction extends 
         
         // Init BeanList
         if (!employeeBeanList.initBeanList(cmd))
-        {
-            setActionError(employeeBeanList);
+        {   // Error
             return LIST;
         }
         

Modified: incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/web/actions/LoginAction.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/web/actions/LoginAction.java?rev=1158339&r1=1158338&r2=1158339&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/web/actions/LoginAction.java (original)
+++ incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/web/actions/LoginAction.java Tue Aug 16 15:56:41 2011
@@ -20,7 +20,7 @@ package org.apache.empire.struts2.websam
 
 import java.util.Map;
 
-import org.apache.empire.commons.Errors;
+import org.apache.empire.struts2.websample.web.SampleErrors;
 import org.apache.empire.struts2.websample.web.SampleUser;
 import org.apache.empire.struts2.websample.web.actiontypes.Action;
 
@@ -92,7 +92,7 @@ public class LoginAction extends Action
         
         if (userID==null || userID.length()==0)
         {
-            setActionError(Errors.InvalidPassword);
+            setActionError(SampleErrors.InvalidPassword);
             return INPUT;
         }
         



Mime
View raw message