Reformatted source code
authorMartin Taal <martin.taal@openbravo.com>
Mon, 02 Feb 2009 06:26:05 +0000
changeset 2868 353de8982dab
parent 2867 9fc466272010
child 2869 ef6c9b5846ce
Reformatted source code
src/build.xml
src/buildAD.xml
src/org/openbravo/authentication/AuthenticationException.java
src/org/openbravo/authentication/AuthenticationManager.java
src/org/openbravo/authentication/basic/AutologonAuthenticationManager.java
src/org/openbravo/authentication/basic/DefaultAuthenticationManager.java
src/org/openbravo/authentication/lam/LamAuthenticationManager.java
src/org/openbravo/base/OBSchedulerInitializerListener.java
src/org/openbravo/base/exception/OBException.java
src/org/openbravo/base/exception/OBSecurityException.java
src/org/openbravo/base/expression/Evaluator.java
src/org/openbravo/base/gen/GenerateEntitiesTask.java
src/org/openbravo/base/gen/ModelProviderComponent.java
src/org/openbravo/base/gen/OBJavaBeautifier.java
src/org/openbravo/base/model/AccessLevel.java
src/org/openbravo/base/model/BaseOBObjectDef.java
src/org/openbravo/base/model/Column.java
src/org/openbravo/base/model/Entity.java
src/org/openbravo/base/model/ModelObject.java
src/org/openbravo/base/model/ModelProvider.java
src/org/openbravo/base/model/ModelSessionFactoryController.java
src/org/openbravo/base/model/Module.java
src/org/openbravo/base/model/NamingUtil.java
src/org/openbravo/base/model/Package.java
src/org/openbravo/base/model/Property.java
src/org/openbravo/base/model/RefList.java
src/org/openbravo/base/model/RefSearch.java
src/org/openbravo/base/model/RefTable.java
src/org/openbravo/base/model/Reference.java
src/org/openbravo/base/model/Table.java
src/org/openbravo/base/model/UniqueConstraint.java
src/org/openbravo/base/provider/OBConfigFileProvider.java
src/org/openbravo/base/provider/OBModulePrefixRequired.java
src/org/openbravo/base/provider/OBNotSingleton.java
src/org/openbravo/base/provider/OBProvider.java
src/org/openbravo/base/provider/OBProviderConfigReader.java
src/org/openbravo/base/provider/OBProviderException.java
src/org/openbravo/base/provider/OBSingleton.java
src/org/openbravo/base/secureApp/DefaultValidationException.java
src/org/openbravo/base/secureApp/DefaultValuesData.java
src/org/openbravo/base/secureApp/ErrorConnection.java
src/org/openbravo/base/secureApp/HttpSecureAppServlet.java
src/org/openbravo/base/secureApp/LoginHandler.java
src/org/openbravo/base/secureApp/LoginUtils.java
src/org/openbravo/base/secureApp/OrgTree.java
src/org/openbravo/base/secureApp/OrgTreeNode.java
src/org/openbravo/base/secureApp/ServletGoBack.java
src/org/openbravo/base/secureApp/VariablesHistory.java
src/org/openbravo/base/secureApp/VariablesSecureApp.java
src/org/openbravo/base/session/OBOracle10gDialect.java
src/org/openbravo/base/session/OBPropertiesProvider.java
src/org/openbravo/base/session/OBYesNoType.java
src/org/openbravo/base/session/SessionFactoryController.java
src/org/openbravo/base/session/UniqueConstraintColumn.java
src/org/openbravo/base/structure/ActiveEnabled.java
src/org/openbravo/base/structure/BaseOBObject.java
src/org/openbravo/base/structure/ClientEnabled.java
src/org/openbravo/base/structure/DynamicEnabled.java
src/org/openbravo/base/structure/DynamicOBObject.java
src/org/openbravo/base/structure/Identifiable.java
src/org/openbravo/base/structure/IdentifierProvider.java
src/org/openbravo/base/structure/OrganizationEnabled.java
src/org/openbravo/base/structure/Traceable.java
src/org/openbravo/base/util/ArgumentException.java
src/org/openbravo/base/util/Check.java
src/org/openbravo/base/util/CheckException.java
src/org/openbravo/base/util/OBClassLoader.java
src/org/openbravo/base/validation/AccessLevelChecker.java
src/org/openbravo/base/validation/BasePropertyValidator.java
src/org/openbravo/base/validation/EntityValidator.java
src/org/openbravo/base/validation/NumericPropertyValidator.java
src/org/openbravo/base/validation/PropertyValidator.java
src/org/openbravo/base/validation/StringPropertyValidator.java
src/org/openbravo/base/validation/ValidationException.java
src/org/openbravo/dal/core/DalContextListener.java
src/org/openbravo/dal/core/DalInitializingTask.java
src/org/openbravo/dal/core/DalLayerInitializer.java
src/org/openbravo/dal/core/DalMappingGenerator.java
src/org/openbravo/dal/core/DalRequestFilter.java
src/org/openbravo/dal/core/DalSessionFactoryController.java
src/org/openbravo/dal/core/DalThreadHandler.java
src/org/openbravo/dal/core/DalUUIDHexGenerator.java
src/org/openbravo/dal/core/DalUtil.java
src/org/openbravo/dal/core/OBContext.java
src/org/openbravo/dal/core/OBDynamicPropertyHandler.java
src/org/openbravo/dal/core/OBDynamicTuplizer.java
src/org/openbravo/dal/core/OBInstantiator.java
src/org/openbravo/dal/core/OBInterceptor.java
src/org/openbravo/dal/core/OBTuplizer.java
src/org/openbravo/dal/core/SessionHandler.java
src/org/openbravo/dal/core/ThreadHandler.java
src/org/openbravo/dal/core/TriggerHandler.java
src/org/openbravo/dal/security/EntityAccessChecker.java
src/org/openbravo/dal/security/OrganizationStructureProvider.java
src/org/openbravo/dal/security/SecurityChecker.java
src/org/openbravo/dal/security/SecurityConstants.java
src/org/openbravo/dal/service/OBCriteria.java
src/org/openbravo/dal/service/OBDal.java
src/org/openbravo/dal/service/OBQuery.java
src/org/openbravo/dal/xml/EntityNotFoundException.java
src/org/openbravo/dal/xml/EntityResolver.java
src/org/openbravo/dal/xml/EntityXMLConverter.java
src/org/openbravo/dal/xml/EntityXMLException.java
src/org/openbravo/dal/xml/EntityXMLProcessor.java
src/org/openbravo/dal/xml/ModelXMLConverter.java
src/org/openbravo/dal/xml/XMLConstants.java
src/org/openbravo/dal/xml/XMLEntityConverter.java
src/org/openbravo/dal/xml/XMLTypeConverter.java
src/org/openbravo/dal/xml/XMLUtil.java
src/org/openbravo/erpCommon/ad_actionButton/ActionButtonUtility.java
src/org/openbravo/erpCommon/ad_actionButton/CopyFromInvoice.java
src/org/openbravo/erpCommon/ad_actionButton/CopyFromOrder.java
src/org/openbravo/erpCommon/ad_actionButton/CopyFromPOOrder.java
src/org/openbravo/erpCommon/ad_actionButton/CopyFromSettlement.java
src/org/openbravo/erpCommon/ad_actionButton/CreateFile.java
src/org/openbravo/erpCommon/ad_actionButton/CreateFrom.java
src/org/openbravo/erpCommon/ad_actionButton/CreateFromMultiple.java
src/org/openbravo/erpCommon/ad_actionButton/CreateRegFactAcct.java
src/org/openbravo/erpCommon/ad_actionButton/CreateVatRegisters.java
src/org/openbravo/erpCommon/ad_actionButton/DropRegFactAcct.java
src/org/openbravo/erpCommon/ad_actionButton/EditCCPMeasureValues.java
src/org/openbravo/erpCommon/ad_actionButton/ExpenseSOrder.java
src/org/openbravo/erpCommon/ad_actionButton/ExportReferenceData.java
src/org/openbravo/erpCommon/ad_actionButton/Posted.java
src/org/openbravo/erpCommon/ad_actionButton/ProjectClose.java
src/org/openbravo/erpCommon/ad_actionButton/ProjectCopyFrom.java
src/org/openbravo/erpCommon/ad_actionButton/ProjectSetType.java
src/org/openbravo/erpCommon/ad_actionButton/RequestAction.java
src/org/openbravo/erpCommon/ad_actionButton/TestLine.java
src/org/openbravo/erpCommon/ad_actionButton/Test_In.java
src/org/openbravo/erpCommon/ad_actionButton/UpdateMaintenanceScheduled.java
src/org/openbravo/erpCommon/ad_callouts/Activation_Message.java
src/org/openbravo/erpCommon/ad_callouts/CalloutHelper.java
src/org/openbravo/erpCommon/ad_callouts/SE_Expense_Amount.java
src/org/openbravo/erpCommon/ad_callouts/SE_Expense_BP_Project.java
src/org/openbravo/erpCommon/ad_callouts/SE_Expense_Product.java
src/org/openbravo/erpCommon/ad_callouts/SE_ExternalPOS_BPartner.java
src/org/openbravo/erpCommon/ad_callouts/SE_InOut_DocType.java
src/org/openbravo/erpCommon/ad_callouts/SE_Invoice_BPartner.java
src/org/openbravo/erpCommon/ad_callouts/SE_Invoice_Project.java
src/org/openbravo/erpCommon/ad_callouts/SE_Order_BPartner.java
src/org/openbravo/erpCommon/ad_callouts/SE_Order_Project.java
src/org/openbravo/erpCommon/ad_callouts/SE_PeriodNo.java
src/org/openbravo/erpCommon/ad_callouts/SE_Period_Control.java
src/org/openbravo/erpCommon/ad_callouts/SE_Pricelist_Active.java
src/org/openbravo/erpCommon/ad_callouts/SE_ProjectLine_Value.java
src/org/openbravo/erpCommon/ad_callouts/SE_Project_BPartner.java
src/org/openbravo/erpCommon/ad_callouts/SE_Proposal_BPartner.java
src/org/openbravo/erpCommon/ad_callouts/SE_Request_CopyText.java
src/org/openbravo/erpCommon/ad_callouts/SE_Supplier_BPartner.java
src/org/openbravo/erpCommon/ad_callouts/SE_Taxes_Active.java
src/org/openbravo/erpCommon/ad_callouts/SE_Wh_SchedulePeriod.java
src/org/openbravo/erpCommon/ad_callouts/SL_AlertRule_SQL.java
src/org/openbravo/erpCommon/ad_callouts/SL_Assets.java
src/org/openbravo/erpCommon/ad_callouts/SL_BankDebt_Amount.java
src/org/openbravo/erpCommon/ad_callouts/SL_BankStmt_Amount.java
src/org/openbravo/erpCommon/ad_callouts/SL_Budget_Product.java
src/org/openbravo/erpCommon/ad_callouts/SL_CCPMeasure_Group.java
src/org/openbravo/erpCommon/ad_callouts/SL_CashJournal_Amounts.java
src/org/openbravo/erpCommon/ad_callouts/SL_Charge.java
src/org/openbravo/erpCommon/ad_callouts/SL_Command_ArgNumber.java
src/org/openbravo/erpCommon/ad_callouts/SL_Conversion_Rate.java
src/org/openbravo/erpCommon/ad_callouts/SL_CostcenterEmployee_SalaryCategory.java
src/org/openbravo/erpCommon/ad_callouts/SL_CreateFromMultiple_Conversion.java
src/org/openbravo/erpCommon/ad_callouts/SL_CreateFromMultiple_Product.java
src/org/openbravo/erpCommon/ad_callouts/SL_CreateFromMultiple_Warehouse.java
src/org/openbravo/erpCommon/ad_callouts/SL_CreateLines_Conversion_UOM.java
src/org/openbravo/erpCommon/ad_callouts/SL_GlobalUse_Conversion.java
src/org/openbravo/erpCommon/ad_callouts/SL_GlobalUse_Product.java
src/org/openbravo/erpCommon/ad_callouts/SL_InOutLine_Locator.java
src/org/openbravo/erpCommon/ad_callouts/SL_InOutLine_Product.java
src/org/openbravo/erpCommon/ad_callouts/SL_InOut_BPartner.java
src/org/openbravo/erpCommon/ad_callouts/SL_InOut_Conversion.java
src/org/openbravo/erpCommon/ad_callouts/SL_Internal_Consumption_Conversion.java
src/org/openbravo/erpCommon/ad_callouts/SL_Internal_Consumption_Product.java
src/org/openbravo/erpCommon/ad_callouts/SL_Inventory_Conversion.java
src/org/openbravo/erpCommon/ad_callouts/SL_Inventory_Locator.java
src/org/openbravo/erpCommon/ad_callouts/SL_Inventory_Product.java
src/org/openbravo/erpCommon/ad_callouts/SL_InvoiceTax_Amt.java
src/org/openbravo/erpCommon/ad_callouts/SL_Invoice_Amt.java
src/org/openbravo/erpCommon/ad_callouts/SL_Invoice_Charge_Tax.java
src/org/openbravo/erpCommon/ad_callouts/SL_Invoice_Conversion.java
src/org/openbravo/erpCommon/ad_callouts/SL_Invoice_DocType.java
src/org/openbravo/erpCommon/ad_callouts/SL_Invoice_PriceList.java
src/org/openbravo/erpCommon/ad_callouts/SL_Invoice_Product.java
src/org/openbravo/erpCommon/ad_callouts/SL_Invoice_Tax.java
src/org/openbravo/erpCommon/ad_callouts/SL_IsDefault.java
src/org/openbravo/erpCommon/ad_callouts/SL_JournalLineAmt.java
src/org/openbravo/erpCommon/ad_callouts/SL_Journal_Period.java
src/org/openbravo/erpCommon/ad_callouts/SL_MInOutTraceReports.java
src/org/openbravo/erpCommon/ad_callouts/SL_MachineCost.java
src/org/openbravo/erpCommon/ad_callouts/SL_Module_Minor_Version.java
src/org/openbravo/erpCommon/ad_callouts/SL_MovementAll_Locator.java
src/org/openbravo/erpCommon/ad_callouts/SL_Movement_Conversion.java
src/org/openbravo/erpCommon/ad_callouts/SL_Movement_Product.java
src/org/openbravo/erpCommon/ad_callouts/SL_Order_Amt.java
src/org/openbravo/erpCommon/ad_callouts/SL_Order_Charge_Tax.java
src/org/openbravo/erpCommon/ad_callouts/SL_Order_Conversion.java
src/org/openbravo/erpCommon/ad_callouts/SL_Order_DocType.java
src/org/openbravo/erpCommon/ad_callouts/SL_Order_PriceList.java
src/org/openbravo/erpCommon/ad_callouts/SL_Order_Product.java
src/org/openbravo/erpCommon/ad_callouts/SL_Order_Tax.java
src/org/openbravo/erpCommon/ad_callouts/SL_Payment_Amounts.java
src/org/openbravo/erpCommon/ad_callouts/SL_Payment_DocType.java
src/org/openbravo/erpCommon/ad_callouts/SL_Payment_No_Verify.java
src/org/openbravo/erpCommon/ad_callouts/SL_ProductionPlan_Conversion.java
src/org/openbravo/erpCommon/ad_callouts/SL_ProductionPlan_WRPhase.java
src/org/openbravo/erpCommon/ad_callouts/SL_Production_Conversion.java
src/org/openbravo/erpCommon/ad_callouts/SL_Production_Product.java
src/org/openbravo/erpCommon/ad_callouts/SL_Project_Margin.java
src/org/openbravo/erpCommon/ad_callouts/SL_Project_Planned.java
src/org/openbravo/erpCommon/ad_callouts/SL_Project_PriceList.java
src/org/openbravo/erpCommon/ad_callouts/SL_Proposal_Product.java
src/org/openbravo/erpCommon/ad_callouts/SL_Request_Action.java
src/org/openbravo/erpCommon/ad_callouts/SL_RequisitionLine_Amt.java
src/org/openbravo/erpCommon/ad_callouts/SL_RequisitionLine_Conversion.java
src/org/openbravo/erpCommon/ad_callouts/SL_RequisitionLine_Product.java
src/org/openbravo/erpCommon/ad_callouts/SL_RequisitionOrder_Order.java
src/org/openbravo/erpCommon/ad_callouts/SL_Requisition_BPartner.java
src/org/openbravo/erpCommon/ad_callouts/SL_ScheduledMaintenance_Maintenance.java
src/org/openbravo/erpCommon/ad_callouts/SL_SequenceProduct_Conversion.java
src/org/openbravo/erpCommon/ad_callouts/SL_SequenceProduct_Product.java
src/org/openbravo/erpCommon/ad_callouts/SL_User_Name.java
src/org/openbravo/erpCommon/ad_callouts/SL_WRPhaseProduct_Product.java
src/org/openbravo/erpCommon/ad_callouts/SL_WRPhase_Sequence.java
src/org/openbravo/erpCommon/ad_callouts/SL_WorkRequirement_Conversion.java
src/org/openbravo/erpCommon/ad_callouts/SL_WorkRequirement_ProcessPlan.java
src/org/openbravo/erpCommon/ad_callouts/SL_WorkRequirement_Sequence.java
src/org/openbravo/erpCommon/ad_callouts/SL_WorkRequirement_StartDate.java
src/org/openbravo/erpCommon/ad_callouts/SL_Year_Validation.java
src/org/openbravo/erpCommon/ad_forms/About.java
src/org/openbravo/erpCommon/ad_forms/Account.java
src/org/openbravo/erpCommon/ad_forms/AccountingValueData.java
src/org/openbravo/erpCommon/ad_forms/AcctSchema.java
src/org/openbravo/erpCommon/ad_forms/AcctSchemaElement.java
src/org/openbravo/erpCommon/ad_forms/AcctServer.java
src/org/openbravo/erpCommon/ad_forms/AlertManagement.java
src/org/openbravo/erpCommon/ad_forms/CallAcctServer.java
src/org/openbravo/erpCommon/ad_forms/DebtPaymentUnapply.java
src/org/openbravo/erpCommon/ad_forms/DocAmortization.java
src/org/openbravo/erpCommon/ad_forms/DocBank.java
src/org/openbravo/erpCommon/ad_forms/DocCash.java
src/org/openbravo/erpCommon/ad_forms/DocDPManagement.java
src/org/openbravo/erpCommon/ad_forms/DocGLJournal.java
src/org/openbravo/erpCommon/ad_forms/DocInOut.java
src/org/openbravo/erpCommon/ad_forms/DocInventory.java
src/org/openbravo/erpCommon/ad_forms/DocInvoice.java
src/org/openbravo/erpCommon/ad_forms/DocLine.java
src/org/openbravo/erpCommon/ad_forms/DocLine_Amortization.java
src/org/openbravo/erpCommon/ad_forms/DocLine_Bank.java
src/org/openbravo/erpCommon/ad_forms/DocLine_Cash.java
src/org/openbravo/erpCommon/ad_forms/DocLine_DPManagement.java
src/org/openbravo/erpCommon/ad_forms/DocLine_Invoice.java
src/org/openbravo/erpCommon/ad_forms/DocLine_Material.java
src/org/openbravo/erpCommon/ad_forms/DocLine_Payment.java
src/org/openbravo/erpCommon/ad_forms/DocMovement.java
src/org/openbravo/erpCommon/ad_forms/DocOrder.java
src/org/openbravo/erpCommon/ad_forms/DocPayment.java
src/org/openbravo/erpCommon/ad_forms/DocProduction.java
src/org/openbravo/erpCommon/ad_forms/DocTax.java
src/org/openbravo/erpCommon/ad_forms/EdiFileImport.java
src/org/openbravo/erpCommon/ad_forms/Fact.java
src/org/openbravo/erpCommon/ad_forms/FactLine.java
src/org/openbravo/erpCommon/ad_forms/FileImport.java
src/org/openbravo/erpCommon/ad_forms/FileLoadData.java
src/org/openbravo/erpCommon/ad_forms/GenerateInvoicesmanual.java
src/org/openbravo/erpCommon/ad_forms/GenerateShipmentsmanual.java
src/org/openbravo/erpCommon/ad_forms/Heartbeat.java
src/org/openbravo/erpCommon/ad_forms/HeartbeatConfirm.java
src/org/openbravo/erpCommon/ad_forms/InformeInOut.java
src/org/openbravo/erpCommon/ad_forms/InitialClientSetup.java
src/org/openbravo/erpCommon/ad_forms/InitialOrgSetup.java
src/org/openbravo/erpCommon/ad_forms/InvoiceVendorMultiline.java
src/org/openbravo/erpCommon/ad_forms/InvoiceVendorMultiline_Lines.java
src/org/openbravo/erpCommon/ad_forms/MaterialReceiptPending.java
src/org/openbravo/erpCommon/ad_forms/ProductInfo.java
src/org/openbravo/erpCommon/ad_forms/Registration.java
src/org/openbravo/erpCommon/ad_forms/RegistrationConfirm.java
src/org/openbravo/erpCommon/ad_forms/RemittanceCancel.java
src/org/openbravo/erpCommon/ad_forms/RequisitionToOrder.java
src/org/openbravo/erpCommon/ad_forms/RespuestaCS.java
src/org/openbravo/erpCommon/ad_forms/RespuestaCS_AcctServer.java
src/org/openbravo/erpCommon/ad_forms/Role.java
src/org/openbravo/erpCommon/ad_forms/SQLExecutor.java
src/org/openbravo/erpCommon/ad_forms/SQLExecutor_Query.java
src/org/openbravo/erpCommon/ad_forms/ShowSessionPreferences.java
src/org/openbravo/erpCommon/ad_forms/ShowSessionVariables.java
src/org/openbravo/erpCommon/ad_forms/ShowSessionVariablesStructureData.java
src/org/openbravo/erpCommon/ad_forms/Translation.java
src/org/openbravo/erpCommon/ad_forms/TranslationHandler.java
src/org/openbravo/erpCommon/ad_forms/UpdateReferenceData.java
src/org/openbravo/erpCommon/ad_help/DisplayHelp.java
src/org/openbravo/erpCommon/ad_help/HelpWindow.java
src/org/openbravo/erpCommon/ad_process/AcctServerProcess.java
src/org/openbravo/erpCommon/ad_process/AlertProcess.java
src/org/openbravo/erpCommon/ad_process/ApplyModules.java
src/org/openbravo/erpCommon/ad_process/CashBankOperations.java
src/org/openbravo/erpCommon/ad_process/ChangeOrderOrg.java
src/org/openbravo/erpCommon/ad_process/CopyFromGLJournal.java
src/org/openbravo/erpCommon/ad_process/CreateAccountingReport.java
src/org/openbravo/erpCommon/ad_process/CreateCashFlowStatement.java
src/org/openbravo/erpCommon/ad_process/CreateTaxReport.java
src/org/openbravo/erpCommon/ad_process/CreateTest.java
src/org/openbravo/erpCommon/ad_process/DeleteClient.java
src/org/openbravo/erpCommon/ad_process/DisplayJasper.java
src/org/openbravo/erpCommon/ad_process/ExpenseAPInvoice.java
src/org/openbravo/erpCommon/ad_process/GenerateHelp.java
src/org/openbravo/erpCommon/ad_process/HeartbeatProcess.java
src/org/openbravo/erpCommon/ad_process/ImportAccount.java
src/org/openbravo/erpCommon/ad_process/ImportAccountServlet.java
src/org/openbravo/erpCommon/ad_process/ImportBPartner.java
src/org/openbravo/erpCommon/ad_process/ImportBPartnerServlet.java
src/org/openbravo/erpCommon/ad_process/ImportBudget.java
src/org/openbravo/erpCommon/ad_process/ImportBudgetServlet.java
src/org/openbravo/erpCommon/ad_process/ImportOrder.java
src/org/openbravo/erpCommon/ad_process/ImportOrderServlet.java
src/org/openbravo/erpCommon/ad_process/ImportProcess.java
src/org/openbravo/erpCommon/ad_process/ImportProduct.java
src/org/openbravo/erpCommon/ad_process/ImportProductServlet.java
src/org/openbravo/erpCommon/ad_process/ImportTax.java
src/org/openbravo/erpCommon/ad_process/ImportTaxServlet.java
src/org/openbravo/erpCommon/ad_process/JasperProcess.java
src/org/openbravo/erpCommon/ad_process/PinstanceProcedure.java
src/org/openbravo/erpCommon/ad_process/PriceListCreateAll.java
src/org/openbravo/erpCommon/ad_process/PrintInvoices.java
src/org/openbravo/erpCommon/ad_process/ProcedureProcess.java
src/org/openbravo/erpCommon/ad_process/Register.java
src/org/openbravo/erpCommon/ad_process/RegisterModule.java
src/org/openbravo/erpCommon/ad_process/RequestReOpen.java
src/org/openbravo/erpCommon/ad_process/RescheduleProcess.java
src/org/openbravo/erpCommon/ad_process/RespuestaCS.java
src/org/openbravo/erpCommon/ad_process/RestartingContext.java
src/org/openbravo/erpCommon/ad_process/ScheduleProcess.java
src/org/openbravo/erpCommon/ad_process/SendMailText.java
src/org/openbravo/erpCommon/ad_process/TestHeartbeat.java
src/org/openbravo/erpCommon/ad_process/UnscheduleProcess.java
src/org/openbravo/erpCommon/ad_reports/GeneralAccountingReports.java
src/org/openbravo/erpCommon/ad_reports/GenerateModel347.java
src/org/openbravo/erpCommon/ad_reports/MInOutTraceReports.java
src/org/openbravo/erpCommon/ad_reports/ReportAccountingCountDimensionalAnalyses.java
src/org/openbravo/erpCommon/ad_reports/ReportAcctRedirectUtility.java
src/org/openbravo/erpCommon/ad_reports/ReportAgingBalance.java
src/org/openbravo/erpCommon/ad_reports/ReportAnnualCertification.java
src/org/openbravo/erpCommon/ad_reports/ReportBank.java
src/org/openbravo/erpCommon/ad_reports/ReportBankJR.java
src/org/openbravo/erpCommon/ad_reports/ReportBudgetExportExcel.java
src/org/openbravo/erpCommon/ad_reports/ReportBudgetGenerateExcel.java
src/org/openbravo/erpCommon/ad_reports/ReportCash.java
src/org/openbravo/erpCommon/ad_reports/ReportCashFlow.java
src/org/openbravo/erpCommon/ad_reports/ReportCashJR.java
src/org/openbravo/erpCommon/ad_reports/ReportCashflowForecast.java
src/org/openbravo/erpCommon/ad_reports/ReportDebtPayment.java
src/org/openbravo/erpCommon/ad_reports/ReportDebtPaymentTrack.java
src/org/openbravo/erpCommon/ad_reports/ReportDimensionalAnalysesPDF.java
src/org/openbravo/erpCommon/ad_reports/ReportExpense.java
src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedger.java
src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedgerJournal.java
src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedgerJournalDetail.java
src/org/openbravo/erpCommon/ad_reports/ReportGuaranteeDateJR.java
src/org/openbravo/erpCommon/ad_reports/ReportInventory.java
src/org/openbravo/erpCommon/ad_reports/ReportInvoiceCustomerDimensionalAnalyses.java
src/org/openbravo/erpCommon/ad_reports/ReportInvoiceCustomerDimensionalAnalysesJR.java
src/org/openbravo/erpCommon/ad_reports/ReportInvoiceCustomerDimensionalPDF.java
src/org/openbravo/erpCommon/ad_reports/ReportInvoiceCustomerEdition.java
src/org/openbravo/erpCommon/ad_reports/ReportInvoiceCustomerJR.java
src/org/openbravo/erpCommon/ad_reports/ReportInvoiceDiscount.java
src/org/openbravo/erpCommon/ad_reports/ReportInvoiceDiscountJR.java
src/org/openbravo/erpCommon/ad_reports/ReportInvoiceVendorDimensionalAnalysesJR.java
src/org/openbravo/erpCommon/ad_reports/ReportInvoiceVendorJR.java
src/org/openbravo/erpCommon/ad_reports/ReportInvoices.java
src/org/openbravo/erpCommon/ad_reports/ReportInvoicesJR.java
src/org/openbravo/erpCommon/ad_reports/ReportMaterialDimensionalAnalysesJR.java
src/org/openbravo/erpCommon/ad_reports/ReportMaterialTransactionEdition.java
src/org/openbravo/erpCommon/ad_reports/ReportMaterialTransactionEditionJR.java
src/org/openbravo/erpCommon/ad_reports/ReportNotPosted.java
src/org/openbravo/erpCommon/ad_reports/ReportOffer.java
src/org/openbravo/erpCommon/ad_reports/ReportOrderNotInvoiceJR.java
src/org/openbravo/erpCommon/ad_reports/ReportParetoProduct.java
src/org/openbravo/erpCommon/ad_reports/ReportPendingProductionJr.java
src/org/openbravo/erpCommon/ad_reports/ReportPricelist.java
src/org/openbravo/erpCommon/ad_reports/ReportProductMovement.java
src/org/openbravo/erpCommon/ad_reports/ReportProduction.java
src/org/openbravo/erpCommon/ad_reports/ReportProductionCost.java
src/org/openbravo/erpCommon/ad_reports/ReportProductionJR.java
src/org/openbravo/erpCommon/ad_reports/ReportProductionRunJR.java
src/org/openbravo/erpCommon/ad_reports/ReportProjectBuildingSite.java
src/org/openbravo/erpCommon/ad_reports/ReportProjectBuildingSiteJR.java
src/org/openbravo/erpCommon/ad_reports/ReportProjectProfitabilityJR.java
src/org/openbravo/erpCommon/ad_reports/ReportProjectProgress.java
src/org/openbravo/erpCommon/ad_reports/ReportPurchaseDimensionalAnalysesJR.java
src/org/openbravo/erpCommon/ad_reports/ReportRefundInvoiceCustomerDimensionalAnalyses.java
src/org/openbravo/erpCommon/ad_reports/ReportRefundSalesDimensionalAnalyses.java
src/org/openbravo/erpCommon/ad_reports/ReportRefundSalesDimensionalAnalysesPDF.java
src/org/openbravo/erpCommon/ad_reports/ReportSalesDimensionalAnalyzeJR.java
src/org/openbravo/erpCommon/ad_reports/ReportSalesOrderDimensionalPDF.java
src/org/openbravo/erpCommon/ad_reports/ReportSalesOrderInvoicedJasper.java
src/org/openbravo/erpCommon/ad_reports/ReportSalesOrderJR.java
src/org/openbravo/erpCommon/ad_reports/ReportSalesOrderOpenItem.java
src/org/openbravo/erpCommon/ad_reports/ReportSalesOrderOpenItemJR.java
src/org/openbravo/erpCommon/ad_reports/ReportSalesOrderProvidedJR.java
src/org/openbravo/erpCommon/ad_reports/ReportShipmentDimensionalAnalyzeJR.java
src/org/openbravo/erpCommon/ad_reports/ReportShipmentEditionJR.java
src/org/openbravo/erpCommon/ad_reports/ReportShipper.java
src/org/openbravo/erpCommon/ad_reports/ReportStandardCostJR.java
src/org/openbravo/erpCommon/ad_reports/ReportTaxInvoice.java
src/org/openbravo/erpCommon/ad_reports/ReportTaxInvoiceJR.java
src/org/openbravo/erpCommon/ad_reports/ReportToInvoiceConsignment.java
src/org/openbravo/erpCommon/ad_reports/ReportToInvoiceConsignmentJR.java
src/org/openbravo/erpCommon/ad_reports/ReportTotalProductTemplate.java
src/org/openbravo/erpCommon/ad_reports/ReportTrialBalance.java
src/org/openbravo/erpCommon/ad_reports/ReportTrialBalanceDataComparator.java
src/org/openbravo/erpCommon/ad_reports/ReportTrialBalanceDetail.java
src/org/openbravo/erpCommon/ad_reports/ReportValuationStock.java
src/org/openbravo/erpCommon/ad_reports/ReportWarehouseControl.java
src/org/openbravo/erpCommon/ad_reports/ReportWarehouseDetailInventoryJR.java
src/org/openbravo/erpCommon/ad_reports/ReportWarehousePartnerJR.java
src/org/openbravo/erpCommon/ad_reports/ReportWorkRequirementDaily.java
src/org/openbravo/erpCommon/ad_reports/ReportWorkRequirementDailyEnv.java
src/org/openbravo/erpCommon/ad_reports/ReportWorkRequirementJR.java
src/org/openbravo/erpCommon/ad_workflow/WorkflowControl.java
src/org/openbravo/erpCommon/businessUtility/AccountTree.java
src/org/openbravo/erpCommon/businessUtility/Buscador.java
src/org/openbravo/erpCommon/businessUtility/ByteArrayDataSource.java
src/org/openbravo/erpCommon/businessUtility/EMail.java
src/org/openbravo/erpCommon/businessUtility/EMailAuthenticator.java
src/org/openbravo/erpCommon/businessUtility/MessageJS.java
src/org/openbravo/erpCommon/businessUtility/PAttributeSet.java
src/org/openbravo/erpCommon/businessUtility/PrinterReports.java
src/org/openbravo/erpCommon/businessUtility/TabAttachments.java
src/org/openbravo/erpCommon/businessUtility/TabFilter.java
src/org/openbravo/erpCommon/businessUtility/Tax.java
src/org/openbravo/erpCommon/businessUtility/Tree.java
src/org/openbravo/erpCommon/businessUtility/WindowTabs.java
src/org/openbravo/erpCommon/info/Account.java
src/org/openbravo/erpCommon/info/AttributeSetInstance.java
src/org/openbravo/erpCommon/info/BusinessPartner.java
src/org/openbravo/erpCommon/info/BusinessPartnerMultiple.java
src/org/openbravo/erpCommon/info/DebtPayment.java
src/org/openbravo/erpCommon/info/ImageInfo.java
src/org/openbravo/erpCommon/info/Invoice.java
src/org/openbravo/erpCommon/info/InvoiceLine.java
src/org/openbravo/erpCommon/info/Location.java
src/org/openbravo/erpCommon/info/Locator.java
src/org/openbravo/erpCommon/info/Product.java
src/org/openbravo/erpCommon/info/ProductComplete.java
src/org/openbravo/erpCommon/info/ProductMultiple.java
src/org/openbravo/erpCommon/info/Project.java
src/org/openbravo/erpCommon/info/SalesOrder.java
src/org/openbravo/erpCommon/info/SalesOrderLine.java
src/org/openbravo/erpCommon/info/ShipmentReceipt.java
src/org/openbravo/erpCommon/info/ShipmentReceiptLine.java
src/org/openbravo/erpCommon/modules/ApplyModule.java
src/org/openbravo/erpCommon/modules/ApplyModuleTask.java
src/org/openbravo/erpCommon/modules/ExtractModule.java
src/org/openbravo/erpCommon/modules/ExtractModuleTask.java
src/org/openbravo/erpCommon/modules/ModuleReferenceDataClientTree.java
src/org/openbravo/erpCommon/modules/ModuleReferenceDataOrgTree.java
src/org/openbravo/erpCommon/modules/ModuleTree.java
src/org/openbravo/erpCommon/modules/ModuleUtiltiy.java
src/org/openbravo/erpCommon/modules/UninstallModule.java
src/org/openbravo/erpCommon/modules/VersionUtility.java
src/org/openbravo/erpCommon/security/Login.java
src/org/openbravo/erpCommon/security/Logout.java
src/org/openbravo/erpCommon/security/Menu.java
src/org/openbravo/erpCommon/security/SessionLogin.java
src/org/openbravo/erpCommon/utility/Alert.java
src/org/openbravo/erpCommon/utility/AntExecutor.java
src/org/openbravo/erpCommon/utility/BandStyleVO.java
src/org/openbravo/erpCommon/utility/CSResponse.java
src/org/openbravo/erpCommon/utility/ChangeAudit.java
src/org/openbravo/erpCommon/utility/ComboTableData.java
src/org/openbravo/erpCommon/utility/DataGrid.java
src/org/openbravo/erpCommon/utility/ErrorTextParser.java
src/org/openbravo/erpCommon/utility/ErrorTextParserORACLE.java
src/org/openbravo/erpCommon/utility/ErrorTextParserPOSTGRE.java
src/org/openbravo/erpCommon/utility/ExecuteQuery.java
src/org/openbravo/erpCommon/utility/ExecuteTask.java
src/org/openbravo/erpCommon/utility/ExportGrid.java
src/org/openbravo/erpCommon/utility/FieldProviderFactory.java
src/org/openbravo/erpCommon/utility/GenericTree.java
src/org/openbravo/erpCommon/utility/GenericTreeServlet.java
src/org/openbravo/erpCommon/utility/GridBO.java
src/org/openbravo/erpCommon/utility/GridColumnVO.java
src/org/openbravo/erpCommon/utility/GridReportVO.java
src/org/openbravo/erpCommon/utility/HTMLElement.java
src/org/openbravo/erpCommon/utility/Home.java
src/org/openbravo/erpCommon/utility/HttpsUtils.java
src/org/openbravo/erpCommon/utility/JRFieldProviderDataSource.java
src/org/openbravo/erpCommon/utility/JRFormatFactory.java
src/org/openbravo/erpCommon/utility/KeyMap.java
src/org/openbravo/erpCommon/utility/LeftTabsBar.java
src/org/openbravo/erpCommon/utility/Log.java
src/org/openbravo/erpCommon/utility/MessagesJS.java
src/org/openbravo/erpCommon/utility/ModelSQLGeneration.java
src/org/openbravo/erpCommon/utility/NavigationBar.java
src/org/openbravo/erpCommon/utility/OBError.java
src/org/openbravo/erpCommon/utility/OBPrintStream.java
src/org/openbravo/erpCommon/utility/OpenPentaho.java
src/org/openbravo/erpCommon/utility/PoolStatus.java
src/org/openbravo/erpCommon/utility/PopupLoading.java
src/org/openbravo/erpCommon/utility/PrintJR.java
src/org/openbravo/erpCommon/utility/QueryFieldStructure.java
src/org/openbravo/erpCommon/utility/QueryParameterStructure.java
src/org/openbravo/erpCommon/utility/ReferencedLink.java
src/org/openbravo/erpCommon/utility/ReferencedTables.java
src/org/openbravo/erpCommon/utility/ReportDesignBO.java
src/org/openbravo/erpCommon/utility/SQLReturnObject.java
src/org/openbravo/erpCommon/utility/SequenceIdData.java
src/org/openbravo/erpCommon/utility/ServletSetPriority.java
src/org/openbravo/erpCommon/utility/SetPriorityCategoryData.java
src/org/openbravo/erpCommon/utility/SystemInfo.java
src/org/openbravo/erpCommon/utility/TableSQLData.java
src/org/openbravo/erpCommon/utility/Task.java
src/org/openbravo/erpCommon/utility/ToolBar.java
src/org/openbravo/erpCommon/utility/ToolBar_Button.java
src/org/openbravo/erpCommon/utility/ToolBar_HR.java
src/org/openbravo/erpCommon/utility/ToolBar_Image.java
src/org/openbravo/erpCommon/utility/ToolBar_Link.java
src/org/openbravo/erpCommon/utility/ToolBar_Space.java
src/org/openbravo/erpCommon/utility/UsedByLink.java
src/org/openbravo/erpCommon/utility/Utility.java
src/org/openbravo/erpCommon/utility/VerticalMenu.java
src/org/openbravo/erpCommon/utility/WindowTree.java
src/org/openbravo/erpCommon/utility/WindowTreeChecks.java
src/org/openbravo/erpCommon/utility/WindowTreeChecksClient.java
src/org/openbravo/erpCommon/utility/WindowTreeUtility.java
src/org/openbravo/erpCommon/utility/WindowTreeUtilityClient.java
src/org/openbravo/erpCommon/utility/Zip.java
src/org/openbravo/erpCommon/utility/poc/ClientAuthenticator.java
src/org/openbravo/erpCommon/utility/poc/EmailAddressType.java
src/org/openbravo/erpCommon/utility/poc/EmailManager.java
src/org/openbravo/erpCommon/utility/poc/EmailType.java
src/org/openbravo/erpCommon/utility/poc/PocException.java
src/org/openbravo/erpCommon/utility/reporting/DocumentType.java
src/org/openbravo/erpCommon/utility/reporting/Report.java
src/org/openbravo/erpCommon/utility/reporting/ReportManager.java
src/org/openbravo/erpCommon/utility/reporting/ReportingException.java
src/org/openbravo/erpCommon/utility/reporting/TemplateInfo.java
src/org/openbravo/erpCommon/utility/reporting/printing/AttachContent.java
src/org/openbravo/erpCommon/utility/reporting/printing/PrintController.java
src/org/openbravo/erpCommon/utility/reporting/printing/PrintInvoices.java
src/org/openbravo/erpCommon/utility/reporting/printing/PrintOrders.java
src/org/openbravo/erpCommon/utility/reporting/printing/PrintQuotations.java
src/org/openbravo/erpCommon/utility/reporting/printing/PrintShipments.java
src/org/openbravo/erpCommon/ws/externalSales/BPartner.java
src/org/openbravo/erpCommon/ws/externalSales/Category.java
src/org/openbravo/erpCommon/ws/externalSales/ExternalSales.java
src/org/openbravo/erpCommon/ws/externalSales/ExternalSalesImpl.java
src/org/openbravo/erpCommon/ws/externalSales/Order.java
src/org/openbravo/erpCommon/ws/externalSales/OrderIdentifier.java
src/org/openbravo/erpCommon/ws/externalSales/OrderLine.java
src/org/openbravo/erpCommon/ws/externalSales/Payment.java
src/org/openbravo/erpCommon/ws/externalSales/Product.java
src/org/openbravo/erpCommon/ws/externalSales/ProductPlus.java
src/org/openbravo/erpCommon/ws/externalSales/Tax.java
src/org/openbravo/erpCommon/ws/services/BusinessPartner.java
src/org/openbravo/erpCommon/ws/services/Contact.java
src/org/openbravo/erpCommon/ws/services/Customer.java
src/org/openbravo/erpCommon/ws/services/Location.java
src/org/openbravo/erpCommon/ws/services/WebService.java
src/org/openbravo/erpCommon/ws/services/WebServiceImpl.java
src/org/openbravo/erpReports/ReportTaxPaymentJR.java
src/org/openbravo/erpReports/ReportVatRegisterJR.java
src/org/openbravo/erpReports/RptC_Bpartner.java
src/org/openbravo/erpReports/RptC_Invoice.java
src/org/openbravo/erpReports/RptC_Order.java
src/org/openbravo/erpReports/RptC_OrderPO.java
src/org/openbravo/erpReports/RptC_Proposal.java
src/org/openbravo/erpReports/RptC_ProposalJr.java
src/org/openbravo/erpReports/RptC_Remittance.java
src/org/openbravo/erpReports/RptC_RemittanceJR.java
src/org/openbravo/erpReports/RptC_Settlement.java
src/org/openbravo/erpReports/RptMA_CCP_Group.java
src/org/openbravo/erpReports/RptMA_CCP_Measures.java
src/org/openbravo/erpReports/RptMA_ProcessPlan.java
src/org/openbravo/erpReports/RptM_Inout.java
src/org/openbravo/erpReports/RptM_Movement.java
src/org/openbravo/erpReports/RptM_Requisition.java
src/org/openbravo/erpReports/RptPromissoryNote.java
src/org/openbravo/scheduling/DefaultJob.java
src/org/openbravo/scheduling/OBScheduler.java
src/org/openbravo/scheduling/Process.java
src/org/openbravo/scheduling/ProcessBundle.java
src/org/openbravo/scheduling/ProcessContext.java
src/org/openbravo/scheduling/ProcessLogger.java
src/org/openbravo/scheduling/ProcessMonitor.java
src/org/openbravo/scheduling/ProcessRunner.java
src/org/openbravo/service/OBServiceException.java
src/org/openbravo/service/db/ClientImportEntityResolver.java
src/org/openbravo/service/db/ClientImportProcessor.java
src/org/openbravo/service/db/DalBaseProcess.java
src/org/openbravo/service/db/DataExportService.java
src/org/openbravo/service/db/DataImportService.java
src/org/openbravo/service/db/DbUtility.java
src/org/openbravo/service/db/ExportClientProcess.java
src/org/openbravo/service/db/ExportReferenceDataTask.java
src/org/openbravo/service/db/ImportClientProcess.java
src/org/openbravo/service/db/ImportReferenceDataTask.java
src/org/openbravo/service/db/ImportResult.java
src/org/openbravo/service/db/ReferenceDataTask.java
src/org/openbravo/service/rest/DalWebService.java
src/org/openbravo/service/system/ApplicationDictionaryValidator.java
src/org/openbravo/service/system/DatabaseValidator.java
src/org/openbravo/service/system/ReloadContext.java
src/org/openbravo/service/system/RestartTomcat.java
src/org/openbravo/service/system/SystemService.java
src/org/openbravo/service/system/SystemValidationResult.java
src/org/openbravo/service/system/SystemValidator.java
src/org/openbravo/service/web/BaseWebServiceServlet.java
src/org/openbravo/service/web/InvalidContentException.java
src/org/openbravo/service/web/InvalidRequestException.java
src/org/openbravo/service/web/ResourceNotFoundException.java
src/org/openbravo/service/web/UserContextCache.java
src/org/openbravo/service/web/WebService.java
src/org/openbravo/service/web/WebServiceServlet.java
src/org/openbravo/service/web/WebServiceUtil.java
src/org/openbravo/services/webservice/BusinessPartner.java
src/org/openbravo/services/webservice/Contact.java
src/org/openbravo/services/webservice/Customer.java
src/org/openbravo/services/webservice/Location.java
src/org/openbravo/services/webservice/Module.java
src/org/openbravo/services/webservice/ModuleDependency.java
src/org/openbravo/services/webservice/ModuleInstallDetail.java
src/org/openbravo/services/webservice/SimpleModule.java
src/org/openbravo/services/webservice/WebServiceImpl.java
src/org/openbravo/services/webservice/WebServiceImplService.java
src/org/openbravo/services/webservice/WebServiceImplServiceLocator.java
src/org/openbravo/services/webservice/WebServiceSoapBindingImpl.java
src/org/openbravo/services/webservice/WebServiceSoapBindingStub.java
--- a/src/build.xml	Sun Feb 01 21:40:15 2009 +0000
+++ b/src/build.xml	Mon Feb 02 06:26:05 2009 +0000
@@ -55,609 +55,605 @@
 
 <project name="openbravo sources" default="compile" basedir=".">
 
-	<path id="yuicompressor.classpath">
-		<fileset dir="../lib/build">
-			<include name="**/yuicompressor-2.4.2.jar" />
-			<include name="**/YUIAnt.jar" />
-		</fileset>
-	</path>
-	<taskdef name="yuicompress" classname="com.yahoo.platform.yui.compressor.YUICompressTask">
-		<classpath refid="yuicompressor.classpath" />
-	</taskdef>
+  <path id="yuicompressor.classpath">
+    <fileset dir="../lib/build">
+      <include name="**/yuicompressor-2.4.2.jar" />
+      <include name="**/YUIAnt.jar" />
+    </fileset>
+  </path>
+  <taskdef name="yuicompress" classname="com.yahoo.platform.yui.compressor.YUICompressTask">
+    <classpath refid="yuicompressor.classpath" />
+  </taskdef>
 
-	<condition property="minimizeJSandCSSbool">
-		<istrue value="${minimizeJSandCSS}" />
-	</condition>
+  <condition property="minimizeJSandCSSbool">
+    <istrue value="${minimizeJSandCSS}" />
+  </condition>
 
-	<property name="webTab" value="all" />
-	<property name="tab" value="%" />
+  <property name="webTab" value="all" />
+  <property name="tab" value="%" />
 
-	<property name="base.translate.structure" value="org/openbravo/erpWindows" />
-	<property name="client.web.xml" value="${base.client.src}/web.xml" />
-	<property name="package" value="" />
-	<property name="extension" value="html" />
-	<property name="src" value="." />
-	<property name="tr" value="yes" />
-	<condition property="translation">
-		<not>
-			<equals arg1="no" arg2="${tr}" />
-		</not>
-	</condition>
-	<target name="init">
-		<mkdir dir="${build}" />
-		<mkdir dir="${base.design}/design" />
-		<mkdir dir="${build.sqlc}" />
-		<mkdir dir="${build.sqlc}/src" />
-		<mkdir dir="${build.sqlc}/srcAD" />
-		<mkdir dir="${build.AD}" />
-		<mkdir dir="${build.AD}/org/openbravo/erpWindows" />
-		<mkdir dir="${build.AD}/org/openbravo/erpCommon/ad_actionButton" />
-		<mkdir dir="${build.AD}/org/openbravo/erpCommon/ad_callouts" />
-		<mkdir dir="${build.AD}/org/openbravo/erpCommon/reference" />
-		<mkdir dir="${build.docs}" />
-	</target>
+  <property name="base.translate.structure" value="org/openbravo/erpWindows" />
+  <property name="client.web.xml" value="${base.client.src}/web.xml" />
+  <property name="package" value="" />
+  <property name="extension" value="html" />
+  <property name="src" value="." />
+  <property name="tr" value="yes" />
+  <condition property="translation">
+    <not>
+      <equals arg1="no" arg2="${tr}" />
+    </not>
+  </condition>
+  <target name="init">
+    <mkdir dir="${build}" />
+    <mkdir dir="${base.design}/design" />
+    <mkdir dir="${build.sqlc}" />
+    <mkdir dir="${build.sqlc}/src" />
+    <mkdir dir="${build.sqlc}/srcAD" />
+    <mkdir dir="${build.AD}" />
+    <mkdir dir="${build.AD}/org/openbravo/erpWindows" />
+    <mkdir dir="${build.AD}/org/openbravo/erpCommon/ad_actionButton" />
+    <mkdir dir="${build.AD}/org/openbravo/erpCommon/ad_callouts" />
+    <mkdir dir="${build.AD}/org/openbravo/erpCommon/reference" />
+    <mkdir dir="${build.docs}" />
+  </target>
 
-	<target name="validate.database">
-		<taskdef name="validateDatabase" classname="org.openbravo.service.system.SystemValidationTask">		
-			<classpath refid="project.class.path" />
-		</taskdef>
-		<validateDatabase userId="0" propertiesFile="${base.config}/Openbravo.properties" type="database"/>
-	</target>
-	
-	<target name="validate.modules">
-		<taskdef name="validateModules" classname="org.openbravo.service.system.SystemValidationTask">		
-			<classpath refid="project.class.path" />
-		</taskdef>
-		<validateModules userId="0" propertiesFile="${base.config}/Openbravo.properties" type="module"/>
-	</target>
-	
-	<target name="trl.clean" if="translation">
-		<java classname="org.openbravo.translate.Translate" jvm="${env.JAVA_HOME}/bin/java" fork="yes" maxmemory="${build.maxmemory}">
-			<arg line="clean ${base.config}/Openbravo.properties" />
-			<classpath refid="project.class.path" />
-		</java>
-	</target>
+  <target name="validate.database">
+    <taskdef name="validateDatabase" classname="org.openbravo.service.system.SystemValidationTask">
+      <classpath refid="project.class.path" />
+    </taskdef>
+    <validateDatabase userId="0" propertiesFile="${base.config}/Openbravo.properties" type="database" />
+  </target>
 
-	<target name="clean" depends="trl.clean">
-		<property name="complete" value="true" />
-		<delete includeEmptyDirs="true" failonerror="false">
-			<fileset dir="${base.design}" />
-			<fileset dir="${build}" />
-			<fileset dir="${build.docs}" />
-			<fileset dir="${build.AD}" />
-			<fileset dir="${build.sqlc}" />
-			<fileset dir="${base.context}">
-				<exclude name=".svn" />
-				<exclude name="META-INF/MANIFEST.MF" />
-			</fileset>
-		</delete>
-	</target>
+  <target name="validate.modules">
+    <taskdef name="validateModules" classname="org.openbravo.service.system.SystemValidationTask">
+      <classpath refid="project.class.path" />
+    </taskdef>
+    <validateModules userId="0" propertiesFile="${base.config}/Openbravo.properties" type="module" />
+  </target>
 
-	<target name="sqlc" depends="copy.srcClient">
-		<java classname="org.openbravo.data.Sqlc" fork="yes" jvm="${env.JAVA_HOME}/bin/java" maxmemory="${build.maxmemory}">
-			<arg line="'${base.config}'/Openbravo.properties .xsql . '${build.sqlc}'/src" />
-			<classpath refid="project.class.path" />
-		</java>
-		<java classname="org.openbravo.data.Sqlc" fork="yes" jvm="${env.JAVA_HOME}/bin/java" maxmemory="${build.maxmemory}">
-			<arg line="'${base.config}'/Openbravo.properties .xsql '${base.modules}' '${build.sqlc}'/src */src" />
-			<classpath refid="project.class.path" />
-		</java>
-		<copy file="${base.src}/buildAD.xml" tofile="${build.AD}/build.xml" />
-		<copy file="${base.src}/log4j.lcf" tofile="${build.AD}/log4j.lcf" />
-		<ant dir="${build.AD}" target="buildAD" inheritAll="true" inheritRefs="true" />
-	</target>
+  <target name="trl.clean" if="translation">
+    <java classname="org.openbravo.translate.Translate" jvm="${env.JAVA_HOME}/bin/java" fork="yes" maxmemory="${build.maxmemory}">
+      <arg line="clean ${base.config}/Openbravo.properties" />
+      <classpath refid="project.class.path" />
+    </java>
+  </target>
 
-	<target name="copy.srcClient">
-		<mkdir dir="${base.client.src}" />
-		<copy todir="${basedir}" overwrite="true" failonerror="false">
-			<fileset dir="${base.client.src}">
-				<exclude name="**/web.xml" />
-			</fileset>
-		</copy>
-	</target>
+  <target name="clean" depends="trl.clean">
+    <property name="complete" value="true" />
+    <delete includeEmptyDirs="true" failonerror="false">
+      <fileset dir="${base.design}" />
+      <fileset dir="${build}" />
+      <fileset dir="${build.docs}" />
+      <fileset dir="${build.AD}" />
+      <fileset dir="${build.sqlc}" />
+      <fileset dir="${base.context}">
+        <exclude name=".svn" />
+        <exclude name="META-INF/MANIFEST.MF" />
+      </fileset>
+    </delete>
+  </target>
 
-	<target name="clean.src.gen">
-		<delete includeEmptyDirs="true" failonerror="false">
-			<fileset dir="${base.src.gen}" />
-		</delete>
-	</target>
+  <target name="sqlc" depends="copy.srcClient">
+    <java classname="org.openbravo.data.Sqlc" fork="yes" jvm="${env.JAVA_HOME}/bin/java" maxmemory="${build.maxmemory}">
+      <arg line="'${base.config}'/Openbravo.properties .xsql . '${build.sqlc}'/src" />
+      <classpath refid="project.class.path" />
+    </java>
+    <java classname="org.openbravo.data.Sqlc" fork="yes" jvm="${env.JAVA_HOME}/bin/java" maxmemory="${build.maxmemory}">
+      <arg line="'${base.config}'/Openbravo.properties .xsql '${base.modules}' '${build.sqlc}'/src */src" />
+      <classpath refid="project.class.path" />
+    </java>
+    <copy file="${base.src}/buildAD.xml" tofile="${build.AD}/build.xml" />
+    <copy file="${base.src}/log4j.lcf" tofile="${build.AD}/log4j.lcf" />
+    <ant dir="${build.AD}" target="buildAD" inheritAll="true" inheritRefs="true" />
+  </target>
 
-	<target name="export.sample.data" description="Exports Sample Data">
-		<taskdef name="exportsampledata" classname="org.openbravo.service.db.ExportReferenceDataTask">
-			<classpath refid="project.class.path" />
-		</taskdef>
-		<echo message="Exporting sample reference data" />
-		<exportsampledata userId="0" propertiesFile="${base.config}/Openbravo.properties" clients="BigBazaar,Accounting Test" />
-	</target>
+  <target name="copy.srcClient">
+    <mkdir dir="${base.client.src}" />
+    <copy todir="${basedir}" overwrite="true" failonerror="false">
+      <fileset dir="${base.client.src}">
+        <exclude name="**/web.xml" />
+      </fileset>
+    </copy>
+  </target>
 
-	<target name="import.sample.data" description="Import Sample Data">
-		<taskdef name="importsampledata" classname="org.openbravo.service.db.ImportReferenceDataTask">
-			<classpath refid="project.class.path" />
-		</taskdef>
-		<echo message="Importing sample reference data" />
+  <target name="clean.src.gen">
+    <delete includeEmptyDirs="true" failonerror="false">
+      <fileset dir="${base.src.gen}" />
+    </delete>
+  </target>
+
+  <target name="export.sample.data" description="Exports Sample Data">
+    <taskdef name="exportsampledata" classname="org.openbravo.service.db.ExportReferenceDataTask">
+      <classpath refid="project.class.path" />
+    </taskdef>
+    <echo message="Exporting sample reference data" />
+    <exportsampledata userId="0" propertiesFile="${base.config}/Openbravo.properties" clients="BigBazaar,Accounting Test" />
+  </target>
+
+  <target name="import.sample.data" description="Import Sample Data">
+    <taskdef name="importsampledata" classname="org.openbravo.service.db.ImportReferenceDataTask">
+      <classpath refid="project.class.path" />
+    </taskdef>
+    <echo message="Importing sample reference data" />
     <importsampledata userId="0" propertiesFile="${base.config}/Openbravo.properties" />
-    <ant dir="${base.db}" target="database.postupdate.${bbdd.rdbms}" inheritAll="true" inheritRefs="true"/>
-	</target>
+    <ant dir="${base.db}" target="database.postupdate.${bbdd.rdbms}" inheritAll="true" inheritRefs="true" />
+  </target>
 
-	<target name="generate.entities" depends="compile.src.gen,clean.src.gen">
-		<taskdef name="workflow" classpathref="project.class.path" classname="org.openbravo.base.gen.GenerateEntitiesTask" />
-		<!-- debug="true" will perform the in-memory model initialization before generating entities
+  <target name="generate.entities" depends="compile.src.gen,clean.src.gen">
+    <taskdef name="workflow" classpathref="project.class.path" classname="org.openbravo.base.gen.GenerateEntitiesTask" />
+    <!-- debug="true" will perform the in-memory model initialization before generating entities
 	if an error occurs then, then a stacktrace is printed. -->
-		<workflow debug="false" srcGenPath="${base.src.gen}" propertiesFile="${base.config}/Openbravo.properties" file="${base.src}/org/openbravo/base/gen/gen_entity.oaw" fork="true" maxmemory="${build.maxmemory}">
-			<param name="ob.properties.location" value="${base.config}/Openbravo.properties" />
-			<param name="base.src.gen" value="${base.src.gen}" />
-			<classpath>
-				<path refid="project.class.path" />
-			</classpath>
-		</workflow>
-		<javac srcdir="${base.src.gen}:${base.src}/org/openbravo/base/model:${base.src}/org/openbravo/dal:${base.src}/org/openbravo/base/structure:${base.src}/org/openbravo/service/dataset" destdir="${build}" encoding="UTF-8" fork="true" memorymaximumsize="${build.maxmemory}" debug="true" debuglevel="lines,vars,source" deprecation="on">
-			<classpath refid="project.class.path" />
-		</javac>
-	</target>
+    <workflow debug="false" srcGenPath="${base.src.gen}" propertiesFile="${base.config}/Openbravo.properties" file="${base.src}/org/openbravo/base/gen/gen_entity.oaw" fork="true" maxmemory="${build.maxmemory}">
+      <param name="ob.properties.location" value="${base.config}/Openbravo.properties" />
+      <param name="base.src.gen" value="${base.src.gen}" />
+      <classpath>
+        <path refid="project.class.path" />
+      </classpath>
+    </workflow>
+    <javac srcdir="${base.src.gen}:${base.src}/org/openbravo/base/model:${base.src}/org/openbravo/dal:${base.src}/org/openbravo/base/structure:${base.src}/org/openbravo/service/dataset" destdir="${build}" encoding="UTF-8" fork="true" memorymaximumsize="${build.maxmemory}" debug="true" debuglevel="lines,vars,source" deprecation="on">
+      <classpath refid="project.class.path" />
+    </javac>
+  </target>
 
-	<!-- 
+  <!-- 
 		Generates entities only when the application dictionary has changed.
 		Difference with the generate.entities is that it does not clean the src-gen directory. The standard
 		GenerateEntitiesTask always checks if the AD was changed before regenerating. The check is to compare
 		the modified time of the generated sources with the updated time of the Application Dictionary. If there
 		is a source older than the last updated time of the Application Dictionary then the sources need to be regenerated.		
 	-->
-	<target name="generate.entities.quick" depends="compile.src.gen">
+  <target name="generate.entities.quick" depends="compile.src.gen">
 
-		<taskdef name="workflow" classpathref="project.class.path" classname="org.openbravo.base.gen.GenerateEntitiesTask" />
-		<!-- debug="true" will perform the in-memory model initialization before generating entities
+    <taskdef name="workflow" classpathref="project.class.path" classname="org.openbravo.base.gen.GenerateEntitiesTask" />
+    <!-- debug="true" will perform the in-memory model initialization before generating entities
 	if an error occurs then, then a stacktrace is printed. -->
-		<workflow debug="false" srcGenPath="${base.src.gen}" propertiesFile="${base.config}/Openbravo.properties" file="${base.src}/org/openbravo/base/gen/gen_entity.oaw" fork="true" maxmemory="${build.maxmemory}">
-			<param name="ob.properties.location" value="${base.config}/Openbravo.properties" />
-			<param name="base.src.gen" value="${base.src.gen}" />
-			<classpath>
-				<path refid="project.class.path" />
-			</classpath>
-		</workflow>
-		<javac srcdir="${base.src.gen}:${base.src}/org/openbravo/base/model:${base.src}/org/openbravo/dal:${base.src}/org/openbravo/base/structure:${base.src}/org/openbravo/service/dataset" destdir="${build}" encoding="UTF-8" fork="true" memorymaximumsize="${build.maxmemory}" debug="true" debuglevel="lines,vars,source" deprecation="on">
-			<classpath refid="project.class.path" />
-		</javac>
-	</target>
+    <workflow debug="false" srcGenPath="${base.src.gen}" propertiesFile="${base.config}/Openbravo.properties" file="${base.src}/org/openbravo/base/gen/gen_entity.oaw" fork="true" maxmemory="${build.maxmemory}">
+      <param name="ob.properties.location" value="${base.config}/Openbravo.properties" />
+      <param name="base.src.gen" value="${base.src.gen}" />
+      <classpath>
+        <path refid="project.class.path" />
+      </classpath>
+    </workflow>
+    <javac srcdir="${base.src.gen}:${base.src}/org/openbravo/base/model:${base.src}/org/openbravo/dal:${base.src}/org/openbravo/base/structure:${base.src}/org/openbravo/service/dataset" destdir="${build}" encoding="UTF-8" fork="true" memorymaximumsize="${build.maxmemory}" debug="true" debuglevel="lines,vars,source" deprecation="on">
+      <classpath refid="project.class.path" />
+    </javac>
+  </target>
 
-	<target name="compileSqlc" depends="sqlc">
-		<javac srcdir="${build.sqlc}/src:${basedir}:${build.sqlc}/srcAD/org/openbravo/erpCommon/reference:${base.modules}" destdir="${build}" encoding="UTF-8" fork="true" memorymaximumsize="${build.maxmemory}" debug="true" debuglevel="lines,vars,source" deprecation="on">
-			<classpath refid="project.class.path" />
-		</javac>
-		<javac srcdir="${build.sqlc}/srcAD" destdir="${build}" encoding="UTF-8" fork="true" memorymaximumsize="${build.maxmemory}" debug="true" debuglevel="lines,vars,source" deprecation="on">
-			<classpath refid="project.class.path" />
-		</javac>
-		<javac srcdir="${build.AD}" destdir="${build}" encoding="UTF-8" fork="true" memorymaximumsize="${build.maxmemory}" debug="true" debuglevel="lines,vars,source" deprecation="on">
-			<classpath refid="project.class.path" />
-		</javac>
-	</target>
+  <target name="compileSqlc" depends="sqlc">
+    <javac srcdir="${build.sqlc}/src:${basedir}:${build.sqlc}/srcAD/org/openbravo/erpCommon/reference:${base.modules}" destdir="${build}" encoding="UTF-8" fork="true" memorymaximumsize="${build.maxmemory}" debug="true" debuglevel="lines,vars,source" deprecation="on">
+      <classpath refid="project.class.path" />
+    </javac>
+    <javac srcdir="${build.sqlc}/srcAD" destdir="${build}" encoding="UTF-8" fork="true" memorymaximumsize="${build.maxmemory}" debug="true" debuglevel="lines,vars,source" deprecation="on">
+      <classpath refid="project.class.path" />
+    </javac>
+    <javac srcdir="${build.AD}" destdir="${build}" encoding="UTF-8" fork="true" memorymaximumsize="${build.maxmemory}" debug="true" debuglevel="lines,vars,source" deprecation="on">
+      <classpath refid="project.class.path" />
+    </javac>
+  </target>
 
-	<target name="compile.src.gen" depends="init">
-		<javac srcdir="${base.src}/org/openbravo/base/exception:${base.src}/org/openbravo/base/gen:${base.src}/org/openbravo/base/expression:${base.src}/org/openbravo/base/provider:${base.src}/org/openbravo/base/model:${base.src}/org/openbravo/base/session::${base.src}/org/openbravo/base/validation:${base.src}/org/openbravo/base/util" destdir="${build}" encoding="UTF-8" fork="true" memorymaximumsize="${build.maxmemory}" debug="true" debuglevel="lines,vars,source" deprecation="on">
-			<classpath refid="project.class.path" />
-		</javac>
-		<copy todir="${build}">
-			<fileset dir="${basedir}" includes="**/*.hbm.xml" />
-		</copy>
-		<copy todir="${build}">
-			<fileset dir="${basedir}" includes="**/*.properties" />
-		</copy>
-	</target>
+  <target name="compile.src.gen" depends="init">
+    <javac srcdir="${base.src}/org/openbravo/base/exception:${base.src}/org/openbravo/base/gen:${base.src}/org/openbravo/base/expression:${base.src}/org/openbravo/base/provider:${base.src}/org/openbravo/base/model:${base.src}/org/openbravo/base/session::${base.src}/org/openbravo/base/validation:${base.src}/org/openbravo/base/util" destdir="${build}" encoding="UTF-8" fork="true" memorymaximumsize="${build.maxmemory}" debug="true" debuglevel="lines,vars,source" deprecation="on">
+      <classpath refid="project.class.path" />
+    </javac>
+    <copy todir="${build}">
+      <fileset dir="${basedir}" includes="**/*.hbm.xml" />
+    </copy>
+    <copy todir="${build}">
+      <fileset dir="${basedir}" includes="**/*.properties" />
+    </copy>
+  </target>
 
-	<target name="wad" depends="init">
-		<java classname="org.openbravo.wad.Wad" jvm="${env.JAVA_HOME}/bin/java" fork="yes" maxmemory="${build.maxmemory}">
-			<arg line="'${base.config}' '${tab}' '${build.AD}/org/openbravo/erpWindows' '${build.AD}/org/openbravo/erpCommon' '${build.sqlc}/src' '${webTab}' '${build.AD}/org/openbravo/erpCommon/ad_actionButton' '${base.design}' '${base.translate.structure}' '${client.web.xml}' '..' '${attach.path}' '${web.url}' '${base.src}' '${complete}' '${module}'" />
-			<classpath refid="project.class.path" />
-		</java>
-		<antcall target="postwad" inheritall="true" inheritrefs="true" />
-	</target>
-	
-	<target name="wad.quick" depends="init">
-		
-		
-		<java classname="org.openbravo.wad.Wad" jvm="${env.JAVA_HOME}/bin/java" fork="yes" maxmemory="${build.maxmemory}">
-		      <arg line="'${base.config}' '${tab}' '${build.AD}/org/openbravo/erpWindows' '${build.AD}/org/openbravo/erpCommon' '${build.sqlc}/src' '${webTab}' '${build.AD}/org/openbravo/erpCommon/ad_actionButton' '${base.design}' '${base.translate.structure}' '${client.web.xml}' '..' '${attach.path}' '${web.url}' '${base.src}' '${complete}' '${module}' 'quick'" />
-		      <classpath refid="project.class.path" />
-		    </java>
-		    <antcall target="postwad" inheritall="true" inheritrefs="true" />
-	</target>
+  <target name="wad" depends="init">
+    <java classname="org.openbravo.wad.Wad" jvm="${env.JAVA_HOME}/bin/java" fork="yes" maxmemory="${build.maxmemory}">
+      <arg line="'${base.config}' '${tab}' '${build.AD}/org/openbravo/erpWindows' '${build.AD}/org/openbravo/erpCommon' '${build.sqlc}/src' '${webTab}' '${build.AD}/org/openbravo/erpCommon/ad_actionButton' '${base.design}' '${base.translate.structure}' '${client.web.xml}' '..' '${attach.path}' '${web.url}' '${base.src}' '${complete}' '${module}'" />
+      <classpath refid="project.class.path" />
+    </java>
+    <antcall target="postwad" inheritall="true" inheritrefs="true" />
+  </target>
 
-	<target name="postsrc" depends="postsrc.modules">
-		<copy todir="${build}">
-			<fileset dir="${basedir}" includes="**/*.properties" />
-		</copy>
-		<copy todir="${build}">
-			<fileset dir="${basedir}" includes="**/*.xslt" />
-		</copy>
-		<copy todir="${build}">
-			<fileset dir="${basedir}" includes="**/*.hbm.xml" />
-		</copy>
-		<copy todir="${base.design}/design">
-			<fileset dir="${basedir}" includes="**/*.xml" />
-		</copy>
-		<copy todir="${base.design}/design">
-			<fileset dir="${basedir}" includes="**/*.fo" />
-		</copy>
-		<copy todir="${base.design}/design">
-			<fileset dir="${basedir}" includes="**/*.html" />
-		</copy>
-		<copy todir="${base.design}/design">
-			<fileset dir="${basedir}" includes="**/*.srpt" />
-		</copy>
-		<copy todir="${base.design}/design">
-			<fileset dir="${basedir}" includes="**/*.jrxml" />
-		</copy>
-		<copy todir="${base.design}/design">
-			<fileset dir="${basedir}" includes="**/*.jasper" />
-		</copy>
-		<copy todir="${build}">
-			<fileset file="${base.config}/quartz.properties" />
-		</copy>
-		<antcall target="build.local.context" inheritAll="true" inheritrefs="true" />
-	</target>
+  <target name="wad.quick" depends="init">
 
-	<target name="postsrc.modules">
-		<copy todir="${base.design}/design">
-			<fileset dir="${base.modules}">
-				<include name="*/src/**/*.xml" />
-				<include name="*/src/**/*.fo" />
-				<include name="*/src/**/*.html" />
-				<include name="*/src/**/*.srpt" />
-				<include name="*/src/**/*.jrxml" />
-				<include name="*/src/**/*.jasper" />
-			</fileset>
-			<mapper type="regexp" from="(.*\${file.separator}src)(.*)" to="\2" />
-		</copy>
-	</target>
 
-	<!-- FIXME: These tasks is only for development and testing purposes, remove it afterwards-->
-	<target name="sqlcmod" depends="copy.srcClient">
-		<java classname="org.openbravo.data.Sqlc" fork="yes" jvm="${env.JAVA_HOME}/bin/java" maxmemory="${build.maxmemory}">
-			<arg line="'${base.config}'/Openbravo.properties .xsql '${base.modules}' '${build.sqlc}'/src */src" />
-			<classpath refid="project.class.path" />
-		</java>
-	</target>
+    <java classname="org.openbravo.wad.Wad" jvm="${env.JAVA_HOME}/bin/java" fork="yes" maxmemory="${build.maxmemory}">
+      <arg line="'${base.config}' '${tab}' '${build.AD}/org/openbravo/erpWindows' '${build.AD}/org/openbravo/erpCommon' '${build.sqlc}/src' '${webTab}' '${build.AD}/org/openbravo/erpCommon/ad_actionButton' '${base.design}' '${base.translate.structure}' '${client.web.xml}' '..' '${attach.path}' '${web.url}' '${base.src}' '${complete}' '${module}' 'quick'" />
+      <classpath refid="project.class.path" />
+    </java>
+    <antcall target="postwad" inheritall="true" inheritrefs="true" />
+  </target>
 
-	<target name="compileSqlcmod" depends="sqlcmod">
-		<javac srcdir="${build.sqlc}/src:${base.modules}" destdir="${build}" encoding="UTF-8" fork="true" memorymaximumsize="${build.maxmemory}" debug="true" debuglevel="lines,vars,source" deprecation="on">
-			<classpath refid="project.class.path" />
-		</javac>
-	</target>
-	<target name="postsrcmod">
-		<copy todir="${base.design}/design">
-			<fileset dir="${base.modules}" includes="*/src/**/*.html" />
-			<mapper type="regexp" from="(.*\${file.separator}src)(.*)" to="\2" />
-		</copy>
-	</target>
+  <target name="postsrc" depends="postsrc.modules">
+    <copy todir="${build}">
+      <fileset dir="${basedir}" includes="**/*.properties" />
+    </copy>
+    <copy todir="${build}">
+      <fileset dir="${basedir}" includes="**/*.xslt" />
+    </copy>
+    <copy todir="${build}">
+      <fileset dir="${basedir}" includes="**/*.hbm.xml" />
+    </copy>
+    <copy todir="${base.design}/design">
+      <fileset dir="${basedir}" includes="**/*.xml" />
+    </copy>
+    <copy todir="${base.design}/design">
+      <fileset dir="${basedir}" includes="**/*.fo" />
+    </copy>
+    <copy todir="${base.design}/design">
+      <fileset dir="${basedir}" includes="**/*.html" />
+    </copy>
+    <copy todir="${base.design}/design">
+      <fileset dir="${basedir}" includes="**/*.srpt" />
+    </copy>
+    <copy todir="${base.design}/design">
+      <fileset dir="${basedir}" includes="**/*.jrxml" />
+    </copy>
+    <copy todir="${base.design}/design">
+      <fileset dir="${basedir}" includes="**/*.jasper" />
+    </copy>
+    <copy todir="${build}">
+      <fileset file="${base.config}/quartz.properties" />
+    </copy>
+    <antcall target="build.local.context" inheritAll="true" inheritrefs="true" />
+  </target>
 
-	<!-- end of auxiliar tasks-->
+  <target name="postsrc.modules">
+    <copy todir="${base.design}/design">
+      <fileset dir="${base.modules}">
+        <include name="*/src/**/*.xml" />
+        <include name="*/src/**/*.fo" />
+        <include name="*/src/**/*.html" />
+        <include name="*/src/**/*.srpt" />
+        <include name="*/src/**/*.jrxml" />
+        <include name="*/src/**/*.jasper" />
+      </fileset>
+      <mapper type="regexp" from="(.*\${file.separator}src)(.*)" to="\2" />
+    </copy>
+  </target>
 
-	<target name="build.local.context">
-		<copy todir="${base.context}" encoding="UTF-8">
-			<fileset file="${basedir}/index.html" />
-		</copy>
-		<copy todir="${base.context}/WEB-INF" encoding="UTF-8">
-			<fileset file="${build.sqlc}/src/web.xml" />
-			<fileset dir="${base.config}">
-				<exclude name="**/eclipse/**" />
-                <exclude name="**/setup-properties**" />
-				<exclude name="*.template" />
-			</fileset>
-		</copy>
-		<copy todir="${base.context}/WEB-INF" encoding="UTF-8">
-			<fileset dir="${base.modules}">
-				<include name="*/config/**" />
-				<exclude name="*.template" />
-			</fileset>
-			<mapper type="regexp" from="(.*\${file.separator}config)(.*)" to="\2" />
-		</copy>
-		<copy todir="${base.context}/WEB-INF/lib" encoding="UTF-8">
-			<fileset dir="${base.lib}/runtime">
-				<exclude name="openbravo-wad.jar" />
-				<exclude name="openbravo-trl.jar" />
-				<exclude name="servlet-api.jar" />
-				<exclude name="*.war" />
-			</fileset>
-			<fileset dir="${base.db}/lib">
-				<include name="*" />
-			</fileset>
-		</copy>
+  <!-- FIXME: These tasks is only for development and testing purposes, remove it afterwards-->
+  <target name="sqlcmod" depends="copy.srcClient">
+    <java classname="org.openbravo.data.Sqlc" fork="yes" jvm="${env.JAVA_HOME}/bin/java" maxmemory="${build.maxmemory}">
+      <arg line="'${base.config}'/Openbravo.properties .xsql '${base.modules}' '${build.sqlc}'/src */src" />
+      <classpath refid="project.class.path" />
+    </java>
+  </target>
 
-		<copy todir="${base.context}/WEB-INF/lib" encoding="UTF-8">
-			<fileset dir="${base.modules}">
-				<include name="*/lib/runtime/**" />
-			</fileset>
-			<mapper type="regexp" from="(.*\${file.separator}lib\${file.separator}runtime)(.*)" to="\2" />
-		</copy>
-		<antcall target="build.web.folder" inheritAll="true" inheritrefs="true" />
-	</target>
+  <target name="compileSqlcmod" depends="sqlcmod">
+    <javac srcdir="${build.sqlc}/src:${base.modules}" destdir="${build}" encoding="UTF-8" fork="true" memorymaximumsize="${build.maxmemory}" debug="true" debuglevel="lines,vars,source" deprecation="on">
+      <classpath refid="project.class.path" />
+    </javac>
+  </target>
+  <target name="postsrcmod">
+    <copy todir="${base.design}/design">
+      <fileset dir="${base.modules}" includes="*/src/**/*.html" />
+      <mapper type="regexp" from="(.*\${file.separator}src)(.*)" to="\2" />
+    </copy>
+  </target>
 
-	<target name="build.web.folder">
-		<delete includeEmptyDirs="true" dir="${base.context}/web/skins" quiet="yes" />
-		<mkdir dir="${base.context}/web" />
+  <!-- end of auxiliar tasks-->
 
-		<copy todir="${base.context}/web" encoding="UTF-8">
-			<fileset dir="${base.web}">
-				<include name="*/**" />
-				<exclude name="skins/**" />
-			</fileset>
-		</copy>
+  <target name="build.local.context">
+    <copy todir="${base.context}" encoding="UTF-8">
+      <fileset file="${basedir}/index.html" />
+    </copy>
+    <copy todir="${base.context}/WEB-INF" encoding="UTF-8">
+      <fileset file="${build.sqlc}/src/web.xml" />
+      <fileset dir="${base.config}">
+        <exclude name="**/eclipse/**" />
+        <exclude name="**/setup-properties**" />
+        <exclude name="*.template" />
+      </fileset>
+    </copy>
+    <copy todir="${base.context}/WEB-INF" encoding="UTF-8">
+      <fileset dir="${base.modules}">
+        <include name="*/config/**" />
+        <exclude name="*.template" />
+      </fileset>
+      <mapper type="regexp" from="(.*\${file.separator}config)(.*)" to="\2" />
+    </copy>
+    <copy todir="${base.context}/WEB-INF/lib" encoding="UTF-8">
+      <fileset dir="${base.lib}/runtime">
+        <exclude name="openbravo-wad.jar" />
+        <exclude name="openbravo-trl.jar" />
+        <exclude name="servlet-api.jar" />
+        <exclude name="*.war" />
+      </fileset>
+      <fileset dir="${base.db}/lib">
+        <include name="*" />
+      </fileset>
+    </copy>
 
-		<mkdir dir="${base.context}/web/skins" />
-		<mkdir dir="${base.context}/web/skins/ltr" />
-		<copy todir="${base.context}/web/skins/ltr" encoding="UTF-8">
-			<fileset dir="${base.web}/skins" />
-		</copy>
-		<mkdir dir="${base.context}/web/skins/rtl" />
-		<copy todir="${base.context}/web/skins/rtl" encoding="UTF-8">
-			<fileset dir="${base.web}/skins" />
-		</copy>
+    <copy todir="${base.context}/WEB-INF/lib" encoding="UTF-8">
+      <fileset dir="${base.modules}">
+        <include name="*/lib/runtime/**" />
+      </fileset>
+      <mapper type="regexp" from="(.*\${file.separator}lib\${file.separator}runtime)(.*)" to="\2" />
+    </copy>
+    <antcall target="build.web.folder" inheritAll="true" inheritrefs="true" />
+  </target>
 
-		<copy todir="${base.context}/web" encoding="UTF-8">
-			<fileset dir="${base.modules}">
-				<include name="*/web/*/**" />
-				<exclude name="*/web/**/skins/**" />
-			</fileset>
-			<mapper type="regexp" from="(.*)(\${file.separator}web)(.*)" to="\3" />
-		</copy>
+  <target name="build.web.folder">
+    <delete includeEmptyDirs="true" dir="${base.context}/web/skins" quiet="yes" />
+    <mkdir dir="${base.context}/web" />
 
-		<copy todir="${base.context}/web/skins/ltr" encoding="UTF-8">
-			<fileset dir="${base.modules}">
-				<include name="*/web/*/**/skins/**" />
-			</fileset>
-			<mapper type="regexp" from="(.*)(\${file.separator}web)(.*)" to="\3" />
-		</copy>
+    <copy todir="${base.context}/web" encoding="UTF-8">
+      <fileset dir="${base.web}">
+        <include name="*/**" />
+        <exclude name="skins/**" />
+      </fileset>
+    </copy>
 
-		<copy todir="${base.context}/web/skins/rtl" encoding="UTF-8">
-			<fileset dir="${base.modules}">
-				<include name="*/web/*/**/skins/**" />
-			</fileset>
-			<mapper type="regexp" from="(.*)(\${file.separator}web)(.*)" to="\3" />
-		</copy>
+    <mkdir dir="${base.context}/web/skins" />
+    <mkdir dir="${base.context}/web/skins/ltr" />
+    <copy todir="${base.context}/web/skins/ltr" encoding="UTF-8">
+      <fileset dir="${base.web}/skins" />
+    </copy>
+    <mkdir dir="${base.context}/web/skins/rtl" />
+    <copy todir="${base.context}/web/skins/rtl" encoding="UTF-8">
+      <fileset dir="${base.web}/skins" />
+    </copy>
 
-		<java classname="org.openbravo.translate.RTLSkin" jvm="${env.JAVA_HOME}/bin/java" fork="yes" maxmemory="${build.maxmemory}">
-			<arg line="${base.context}/web/skins/rtl ${base.context}/web/skins/ltr ${base.web}/skins" />
-			<classpath refid="project.class.path" />
-		</java>
-		<condition property="generateSpritesBool">
-			<istrue value="${generateSprites}" />
-		</condition>
-		<antcall target="generate.sprites" inheritAll="true" inheritrefs="true" />
-		<antcall target="minimizeJSandCSS" inheritAll="true" inheritrefs="true" />
-	</target>
+    <copy todir="${base.context}/web" encoding="UTF-8">
+      <fileset dir="${base.modules}">
+        <include name="*/web/*/**" />
+        <exclude name="*/web/**/skins/**" />
+      </fileset>
+      <mapper type="regexp" from="(.*)(\${file.separator}web)(.*)" to="\3" />
+    </copy>
 
-	<target name="generate.sprites" description="Performs CSS sprite processing" if="generateSpritesBool">
-		<property name="skins.location" location="${base.context}/web/skins/" />
-		<taskdef name="smartsprites" classname="org.carrot2.labs.smartsprites.ant.SmartSpritesTask">
-			<classpath refid="project.class.path" />
-		</taskdef>
-		<smartsprites rootdir="${skins.location}" documentrootdir="${skins.location}" outputdir="${skins.location}" cssfilesuffix="-sprite" csspropertyindent="  " loglevel="WARN" spritepngdepth="DIRECT" spritepngie6="false" />
-		<move todir="${skins.location}">
-			<fileset dir="${skins.location}">
-				<include name="*/*-sprite.css" />
-				<include name="*/*/*-sprite.css" />
-			</fileset>
-			<mapper type="glob" from="*-sprite.css" to="*.css" />
-		</move>
-	</target>
+    <copy todir="${base.context}/web/skins/ltr" encoding="UTF-8">
+      <fileset dir="${base.modules}">
+        <include name="*/web/*/**/skins/**" />
+      </fileset>
+      <mapper type="regexp" from="(.*)(\${file.separator}web)(.*)" to="\3" />
+    </copy>
 
-	<target name="minimizeJSandCSS" description="minimize JS and CSS files" if="minimizeJSandCSSbool">
-		<yuicompress linebreak="300" warn="false" munge="yes" preserveallsemicolons="true" outputfolder="${base.context}/web" charset="UTF-8">
-			<fileset dir="${base.web}">
-				<include name="**/*.js" />
-				<include name="**/*.css" />
-				<!-- The following scripts break in minification process -->
-				<exclude name="**/js/dojo/src/docs.js" />
-				<exclude name="**/js/dojo/src/hostenv_jsc.js" />
-				<exclude name="**/js/jscalendar/lang/calendar-al.js" />
-				<exclude name="**/js/jscalendar/lang/calendar-he-utf8.js" />
-				<exclude name="**/js/jscalendar/lang/calendar-hr.js" />
-				<exclude name="**/js/xinha/lang/**" />
-				<exclude name="**/js/xinha/plugins/**" />
-				<!-- dojotoolkit files are already compressd -->
-				<exclude name="**/dojotoolkit/**" />
-				<!-- from old dojo, only compress main file -->
-				<exclude name="**/dojo/**" />
-				<include name="js/dojo/dojo.js" />
-			</fileset>
-		</yuicompress>
-	</target>
+    <copy todir="${base.context}/web/skins/rtl" encoding="UTF-8">
+      <fileset dir="${base.modules}">
+        <include name="*/web/*/**/skins/**" />
+      </fileset>
+      <mapper type="regexp" from="(.*)(\${file.separator}web)(.*)" to="\3" />
+    </copy>
 
-	<target name="postwad">
-		<copy todir="${base.design}/design">
-			<fileset dir="${build.AD}" includes="**/*.xml" />
-		</copy>
-		<copy todir="${base.design}/design">
-			<fileset dir="${build.AD}" includes="**/*.fo" />
-		</copy>
-		<copy todir="${base.design}/design">
-			<fileset dir="${build.AD}" includes="**/*.html" />
-		</copy>
-		<copy todir="${base.design}/design">
-			<fileset dir="${build.AD}" includes="**/*.srpt" />
-		</copy>
-		<copy todir="${base.design}/design">
-			<fileset dir="${build.AD}" includes="**/*.jrxml" />
-		</copy>
-		<copy todir="${base.design}/design">
-			<fileset dir="${build.AD}" includes="**/*.jasper" />
-		</copy>
-	</target>
+    <java classname="org.openbravo.translate.RTLSkin" jvm="${env.JAVA_HOME}/bin/java" fork="yes" maxmemory="${build.maxmemory}">
+      <arg line="${base.context}/web/skins/rtl ${base.context}/web/skins/ltr ${base.web}/skins" />
+      <classpath refid="project.class.path" />
+    </java>
+    <condition property="generateSpritesBool">
+      <istrue value="${generateSprites}" />
+    </condition>
+    <antcall target="generate.sprites" inheritAll="true" inheritrefs="true" />
+    <antcall target="minimizeJSandCSS" inheritAll="true" inheritrefs="true" />
+  </target>
 
+  <target name="generate.sprites" description="Performs CSS sprite processing" if="generateSpritesBool">
+    <property name="skins.location" location="${base.context}/web/skins/" />
+    <taskdef name="smartsprites" classname="org.carrot2.labs.smartsprites.ant.SmartSpritesTask">
+      <classpath refid="project.class.path" />
+    </taskdef>
+    <smartsprites rootdir="${skins.location}" documentrootdir="${skins.location}" outputdir="${skins.location}" cssfilesuffix="-sprite" csspropertyindent="  " loglevel="WARN" spritepngdepth="DIRECT" spritepngie6="false" />
+    <move todir="${skins.location}">
+      <fileset dir="${skins.location}">
+        <include name="*/*-sprite.css" />
+        <include name="*/*/*-sprite.css" />
+      </fileset>
+      <mapper type="glob" from="*-sprite.css" to="*.css" />
+    </move>
+  </target>
 
-	<target name="eclipse.compile.complete" depends="clean,generate.entities,wad,sqlc,postsrc,translate">
-		<antcall target="update.build.timestamp"/>
-	</target>
+  <target name="minimizeJSandCSS" description="minimize JS and CSS files" if="minimizeJSandCSSbool">
+    <yuicompress linebreak="300" warn="false" munge="yes" preserveallsemicolons="true" outputfolder="${base.context}/web" charset="UTF-8">
+      <fileset dir="${base.web}">
+        <include name="**/*.js" />
+        <include name="**/*.css" />
+        <!-- The following scripts break in minification process -->
+        <exclude name="**/js/dojo/src/docs.js" />
+        <exclude name="**/js/dojo/src/hostenv_jsc.js" />
+        <exclude name="**/js/jscalendar/lang/calendar-al.js" />
+        <exclude name="**/js/jscalendar/lang/calendar-he-utf8.js" />
+        <exclude name="**/js/jscalendar/lang/calendar-hr.js" />
+        <exclude name="**/js/xinha/lang/**" />
+        <exclude name="**/js/xinha/plugins/**" />
+        <!-- dojotoolkit files are already compressd -->
+        <exclude name="**/dojotoolkit/**" />
+        <!-- from old dojo, only compress main file -->
+        <exclude name="**/dojo/**" />
+        <include name="js/dojo/dojo.js" />
+      </fileset>
+    </yuicompress>
+  </target>
 
-	<target name="eclipse.compile" depends="wad,sqlc, postsrc, translate">
-	</target>
+  <target name="postwad">
+    <copy todir="${base.design}/design">
+      <fileset dir="${build.AD}" includes="**/*.xml" />
+    </copy>
+    <copy todir="${base.design}/design">
+      <fileset dir="${build.AD}" includes="**/*.fo" />
+    </copy>
+    <copy todir="${base.design}/design">
+      <fileset dir="${build.AD}" includes="**/*.html" />
+    </copy>
+    <copy todir="${base.design}/design">
+      <fileset dir="${build.AD}" includes="**/*.srpt" />
+    </copy>
+    <copy todir="${base.design}/design">
+      <fileset dir="${build.AD}" includes="**/*.jrxml" />
+    </copy>
+    <copy todir="${base.design}/design">
+      <fileset dir="${build.AD}" includes="**/*.jasper" />
+    </copy>
+  </target>
 
-	<target name="compile.src" depends="compileSqlc, postsrc, copy.files">
-	</target>
 
-	<target name="compile.complete" depends="clean,generate.entities,wad,compileSqlc,postsrc,translate">
-		<antcall target="update.build.timestamp"/>
-	</target>
-	
-	
-	<target name="build.quick.new.wad" if="new.wad">
-		<antcall inheritall="true" inheritrefs="true" target="generate.entities.quick"/>
-		<antcall inheritall="true" inheritrefs="true" target="wad"/>
-		<antcall inheritall="true" inheritrefs="true" target="compileSqlc"/>
-		<antcall inheritall="true" inheritrefs="true" target="postsrc"/>
-		<antcall inheritall="true" inheritrefs="true" target="translate"/>
+  <target name="eclipse.compile.complete" depends="clean,generate.entities,wad,sqlc,postsrc,translate">
+    <antcall target="update.build.timestamp" />
+  </target>
+
+  <target name="eclipse.compile" depends="wad,sqlc, postsrc, translate">
+  </target>
+
+  <target name="compile.src" depends="compileSqlc, postsrc, copy.files">
+  </target>
+
+  <target name="compile.complete" depends="clean,generate.entities,wad,compileSqlc,postsrc,translate">
+    <antcall target="update.build.timestamp" />
+  </target>
+
+
+  <target name="build.quick.new.wad" if="new.wad">
+    <antcall inheritall="true" inheritrefs="true" target="generate.entities.quick" />
+    <antcall inheritall="true" inheritrefs="true" target="wad" />
+    <antcall inheritall="true" inheritrefs="true" target="compileSqlc" />
+    <antcall inheritall="true" inheritrefs="true" target="postsrc" />
+    <antcall inheritall="true" inheritrefs="true" target="translate" />
     <taskdef name="updateWADmd5" classname="org.openbravo.utils.WADCheckSumTask">
       <classpath refid="project.class.path" />
     </taskdef>
-    <updateWADmd5 obDir="${basedir}/.."/>
-	</target>
-	
-	<target name="build.quick.no.new.wad" unless="new.wad">
-    <antcall inheritall="true" inheritrefs="true" target="generate.entities.quick"/>
-    <antcall inheritall="true" inheritrefs="true" target="wad.quick"/>
-    <antcall inheritall="true" inheritrefs="true" target="compileSqlc"/>
-    <antcall inheritall="true" inheritrefs="true" target="postsrc"/>
-    <antcall inheritall="true" inheritrefs="true" target="translate"/>
-	</target>
-	
-	<target name="build.quick">
+    <updateWADmd5 obDir="${basedir}/.." />
+  </target>
 
-		<antcall inheritall="true" inheritrefs="true" target="build.quick.new.wad"/>
-		<antcall inheritall="true" inheritrefs="true" target="build.quick.no.new.wad"/>
-		<antcall inheritall="true" inheritrefs="true" target="update.build.timestamp"/>
-	</target>
+  <target name="build.quick.no.new.wad" unless="new.wad">
+    <antcall inheritall="true" inheritrefs="true" target="generate.entities.quick" />
+    <antcall inheritall="true" inheritrefs="true" target="wad.quick" />
+    <antcall inheritall="true" inheritrefs="true" target="compileSqlc" />
+    <antcall inheritall="true" inheritrefs="true" target="postsrc" />
+    <antcall inheritall="true" inheritrefs="true" target="translate" />
+  </target>
 
-	<target name="translate" if="translation">
-		<antcall inheritall="true" inheritrefs="true" target="compile.translate">
-			<param name="extension" value="html" />
-		</antcall>
-		<antcall inheritall="true" inheritrefs="true" target="compile.translate">
-			<param name="extension" value="fo" />
-		</antcall>
-		<antcall inheritall="true" inheritrefs="true" target="compile.translate">
-			<param name="extension" value="srpt" />
-		</antcall>
-		<antcall inheritall="true" inheritrefs="true" target="compile.translate">
-			<param name="extension" value="jrxml" />
-		</antcall>
-		<antcall inheritall="true" inheritrefs="true" target="translate.modules" />
-	</target>
+  <target name="build.quick">
 
-	<target name="compile" depends="wad,compileSqlc, postsrc, translate">
-	</target>
+    <antcall inheritall="true" inheritrefs="true" target="build.quick.new.wad" />
+    <antcall inheritall="true" inheritrefs="true" target="build.quick.no.new.wad" />
+    <antcall inheritall="true" inheritrefs="true" target="update.build.timestamp" />
+  </target>
 
-	<target name="translate.modules" if="translation">
-		<antcall inheritall="true" inheritrefs="true" target="compile.translate.modules">
-			<param name="extension" value="html" />
-		</antcall>
-		<antcall inheritall="true" inheritrefs="true" target="compile.translate.modules">
-			<param name="extension" value="fo" />
-		</antcall>
-		<antcall inheritall="true" inheritrefs="true" target="compile.translate.modules">
-			<param name="extension" value="srpt" />
-		</antcall>
-		<antcall inheritall="true" inheritrefs="true" target="compile.translate.modules">
-			<param name="extension" value="jrxml" />
-		</antcall>
-	</target>
+  <target name="translate" if="translation">
+    <antcall inheritall="true" inheritrefs="true" target="compile.translate">
+      <param name="extension" value="html" />
+    </antcall>
+    <antcall inheritall="true" inheritrefs="true" target="compile.translate">
+      <param name="extension" value="fo" />
+    </antcall>
+    <antcall inheritall="true" inheritrefs="true" target="compile.translate">
+      <param name="extension" value="srpt" />
+    </antcall>
+    <antcall inheritall="true" inheritrefs="true" target="compile.translate">
+      <param name="extension" value="jrxml" />
+    </antcall>
+    <antcall inheritall="true" inheritrefs="true" target="translate.modules" />
+  </target>
 
-	<target name="compile.translate.modules">
-		<java classname="org.openbravo.translate.Translate" jvm="${env.JAVA_HOME}/bin/java" fork="yes" maxmemory="${build.maxmemory}">
-			<arg line="'${base.config}'/Openbravo.properties ${extension} ${base.modules} '${package}' '*/src'" />
-			<classpath refid="project.class.path" />
-		</java>
-	</target>
+  <target name="compile" depends="wad,compileSqlc, postsrc, translate">
+  </target>
 
-	<target name="installWebService" depends="init" if="wsdd">
-		<java classname="org.apache.axis.client.AdminClient" fork="yes" jvm="${env.JAVA_HOME}/bin/java" maxmemory="${build.maxmemory}">
-			<arg line="-l${context.url}/servlet/AxisServlet ${src}/deploy.wsdd" />
-			<classpath refid="project.class.path" />
-		</java>
-	</target>
+  <target name="translate.modules" if="translation">
+    <antcall inheritall="true" inheritrefs="true" target="compile.translate.modules">
+      <param name="extension" value="html" />
+    </antcall>
+    <antcall inheritall="true" inheritrefs="true" target="compile.translate.modules">
+      <param name="extension" value="fo" />
+    </antcall>
+    <antcall inheritall="true" inheritrefs="true" target="compile.translate.modules">
+      <param name="extension" value="srpt" />
+    </antcall>
+    <antcall inheritall="true" inheritrefs="true" target="compile.translate.modules">
+      <param name="extension" value="jrxml" />
+    </antcall>
+  </target>
 
+  <target name="compile.translate.modules">
+    <java classname="org.openbravo.translate.Translate" jvm="${env.JAVA_HOME}/bin/java" fork="yes" maxmemory="${build.maxmemory}">
+      <arg line="'${base.config}'/Openbravo.properties ${extension} ${base.modules} '${package}' '*/src'" />
+      <classpath refid="project.class.path" />
+    </java>
+  </target>
 
-	<target name="compile.translate">
-		<java classname="org.openbravo.translate.Translate" jvm="${env.JAVA_HOME}/bin/java" fork="yes" maxmemory="${build.maxmemory}">
-			<arg line="'${base.config}'/Openbravo.properties ${extension} ${basedir} ${package}" />
-			<classpath refid="project.class.path" />
-		</java>
-	</target>
+  <target name="installWebService" depends="init" if="wsdd">
+    <java classname="org.apache.axis.client.AdminClient" fork="yes" jvm="${env.JAVA_HOME}/bin/java" maxmemory="${build.maxmemory}">
+      <arg line="-l${context.url}/servlet/AxisServlet ${src}/deploy.wsdd" />
+      <classpath refid="project.class.path" />
+    </java>
+  </target>
 
 
-	<target name="uninstallWebService" depends="init">
-		<java classname="org.apache.axis.client.AdminClient" fork="yes" jvm="${env.JAVA_HOME}/bin/java" maxmemory="${build.maxmemory}">
-			<arg line="-l${context.url}/servlet/AxisServlet ${src}/undeploy.wsdd" />
-			<classpath refid="project.class.path" />
-		</java>
-	</target>
+  <target name="compile.translate">
+    <java classname="org.openbravo.translate.Translate" jvm="${env.JAVA_HOME}/bin/java" fork="yes" maxmemory="${build.maxmemory}">
+      <arg line="'${base.config}'/Openbravo.properties ${extension} ${basedir} ${package}" />
+      <classpath refid="project.class.path" />
+    </java>
+  </target>
 
-	<target name="copy.files">
-		<mkdir dir="${jakarta.base}/webapps/${context.name}" />
-		<copy todir="${jakarta.base}/webapps/${context.name}" encoding="UTF-8">
-			<fileset dir="${base.context}" />
-		</copy>
-		<mkdir dir="${jakarta.base}/webapps/${context.name}/WEB-INF/classes" />
-		<copy todir="${jakarta.base}/webapps/${context.name}/WEB-INF/classes" encoding="UTF-8">
-			<fileset dir="${build}" />
-		</copy>
-	</target>
 
-	<target name="compile.development" depends="generate.entities, compile, copy.files">
-		<mkdir dir="${jakarta.base}/webapps/${context.name}/WEB-INF/lib" />
-		<copy todir="${jakarta.base}/webapps/${context.name}/WEB-INF/lib" file="${build.core.lib}/openbravo-core.jar" encoding="UTF-8">
-		</copy>
-	</target>
+  <target name="uninstallWebService" depends="init">
+    <java classname="org.apache.axis.client.AdminClient" fork="yes" jvm="${env.JAVA_HOME}/bin/java" maxmemory="${build.maxmemory}">
+      <arg line="-l${context.url}/servlet/AxisServlet ${src}/undeploy.wsdd" />
+      <classpath refid="project.class.path" />
+    </java>
+  </target>
 
-	<target name="compile.complete.development" depends="compile.complete, copy.files">
-		<mkdir dir="${jakarta.base}/webapps/${context.name}/WEB-INF/lib" />
-		<copy todir="${jakarta.base}/webapps/${context.name}/WEB-INF/lib" file="${build.core.lib}/openbravo-core.jar" encoding="UTF-8">
-		</copy>
-	</target>
+  <target name="copy.files">
+    <mkdir dir="${jakarta.base}/webapps/${context.name}" />
+    <copy todir="${jakarta.base}/webapps/${context.name}" encoding="UTF-8">
+      <fileset dir="${base.context}" />
+    </copy>
+    <mkdir dir="${jakarta.base}/webapps/${context.name}/WEB-INF/classes" />
+    <copy todir="${jakarta.base}/webapps/${context.name}/WEB-INF/classes" encoding="UTF-8">
+      <fileset dir="${build}" />
+    </copy>
+  </target>
 
-	<target name="compile.web" depends="build.web.folder">
-	</target>
+  <target name="compile.development" depends="generate.entities, compile, copy.files">
+    <mkdir dir="${jakarta.base}/webapps/${context.name}/WEB-INF/lib" />
+    <copy todir="${jakarta.base}/webapps/${context.name}/WEB-INF/lib" file="${build.core.lib}/openbravo-core.jar" encoding="UTF-8">
+    </copy>
+  </target>
 
-	<target name="compile.web.development" depends="build.web.folder, copy.files">
-	</target>
+  <target name="compile.complete.development" depends="compile.complete, copy.files">
+    <mkdir dir="${jakarta.base}/webapps/${context.name}/WEB-INF/lib" />
+    <copy todir="${jakarta.base}/webapps/${context.name}/WEB-INF/lib" file="${build.core.lib}/openbravo-core.jar" encoding="UTF-8">
+    </copy>
+  </target>
 
-	<target name="build.war">
-		<delete failonerror="false" file="${base.lib}/${context.name}.war" />
-		<war compress="true" destfile="${base.lib}/${context.name}.war" encoding="UTF-8" webxml="${base.context}/WEB-INF/web.xml">
-			<zipfileset dir="${base.context}">
-				<exclude name="**/WEB-INF/web.xml" />
-				<exclude name="**/WEB-INF/lib/servlet-api.jar" />
-			</zipfileset>
-			<classes dir="${build}" />
-		</war>
-	</target>
+  <target name="compile.web" depends="build.web.folder">
+  </target>
 
-	<target name="generate-wsdd">
-		<delete failonerror="false">
-			<fileset dir="${base.src}/org/openbravo/services/webservice" includes="**/*" />
-		</delete>
+  <target name="compile.web.development" depends="build.web.folder, copy.files">
+  </target>
 
-		<mkdir dir="${build}" />
-		<axis-wsdl2java output="${base.src}" verbose="false" url="http://67.202.45.105/openbravo/services/WebService?wsdl" serverside="true" debug="false">
-			<mapping namespace="http://67.202.45.105/openbravo/services/WebService" package="org.openbravo.services.webservice" />
-			<mapping namespace="/services/WebService" package="org.openbravo.services.webservice" />
-		</axis-wsdl2java>
-	</target>
-	
-	<target name="update.build.timestamp">
-	    <sql driver="${bbdd.driver}"
-	         url="${bbdd.owner.url}"
-	    	   userid="${bbdd.user}"
-	    	   password="${bbdd.password}"
-	         delimiter="/">
-	      <classpath>
-	        <fileset dir="${base.lib}">
-	          <include name="**/*.jar">
-	          </include>
-	        </fileset>
-	      </classpath>
-	      <transaction>
+  <target name="build.war">
+    <delete failonerror="false" file="${base.lib}/${context.name}.war" />
+    <war compress="true" destfile="${base.lib}/${context.name}.war" encoding="UTF-8" webxml="${base.context}/WEB-INF/web.xml">
+      <zipfileset dir="${base.context}">
+        <exclude name="**/WEB-INF/web.xml" />
+        <exclude name="**/WEB-INF/lib/servlet-api.jar" />
+      </zipfileset>
+      <classes dir="${build}" />
+    </war>
+  </target>
+
+  <target name="generate-wsdd">
+    <delete failonerror="false">
+      <fileset dir="${base.src}/org/openbravo/services/webservice" includes="**/*" />
+    </delete>
+
+    <mkdir dir="${build}" />
+    <axis-wsdl2java output="${base.src}" verbose="false" url="http://67.202.45.105/openbravo/services/WebService?wsdl" serverside="true" debug="false">
+      <mapping namespace="http://67.202.45.105/openbravo/services/WebService" package="org.openbravo.services.webservice" />
+      <mapping namespace="/services/WebService" package="org.openbravo.services.webservice" />
+    </axis-wsdl2java>
+  </target>
+
+  <target name="update.build.timestamp">
+    <sql driver="${bbdd.driver}" url="${bbdd.owner.url}" userid="${bbdd.user}" password="${bbdd.password}" delimiter="/">
+      <classpath>
+        <fileset dir="${base.lib}">
+          <include name="**/*.jar">
+          </include>
+        </fileset>
+      </classpath>
+      <transaction>
 	        UPDATE AD_SYSTEM_INFO SET LAST_BUILD=NOW()
 	      </transaction>
-	    </sql>
-	  </target>
+    </sql>
+  </target>
 
 </project>
--- a/src/buildAD.xml	Sun Feb 01 21:40:15 2009 +0000
+++ b/src/buildAD.xml	Mon Feb 02 06:26:05 2009 +0000
@@ -19,13 +19,13 @@
 -->
 
 <project name="openbravo" default="buildAD" basedir=".">
-  <property environment="env"/>
-  <property name="separator" value="/"/>
-  
+  <property environment="env" />
+  <property name="separator" value="/" />
+
   <target name="buildAD">
-	<java classname="org.openbravo.data.Sqlc" fork="yes" jvm="${env.JAVA_HOME}/bin/java" maxmemory="${build.maxmemory}">
-      <arg line="'${base.config}'/Openbravo.properties .xsql ../srcAD '${build.sqlc}'/src"/>
-      <classpath refid="project.class.path"/>
+    <java classname="org.openbravo.data.Sqlc" fork="yes" jvm="${env.JAVA_HOME}/bin/java" maxmemory="${build.maxmemory}">
+      <arg line="'${base.config}'/Openbravo.properties .xsql ../srcAD '${build.sqlc}'/src" />
+      <classpath refid="project.class.path" />
     </java>
 
   </target>
--- a/src/org/openbravo/authentication/AuthenticationException.java	Sun Feb 01 21:40:15 2009 +0000
+++ b/src/org/openbravo/authentication/AuthenticationException.java	Mon Feb 02 06:26:05 2009 +0000
@@ -17,27 +17,26 @@
  * @author adrianromero
  */
 public class AuthenticationException extends java.lang.Exception {
-    private static final long serialVersionUID = 1L;
+  private static final long serialVersionUID = 1L;
 
-    /**
-     * Creates a new instance of <code>AuthenticationException</code> without
-     * detail message.
-     */
-    public AuthenticationException() {
-    }
+  /**
+   * Creates a new instance of <code>AuthenticationException</code> without detail message.
+   */
+  public AuthenticationException() {
+  }
 
-    /**
-     * Constructs an instance of <code>AuthenticationException</code> with the
-     * specified detail message.
-     * 
-     * @param msg
-     *            the detail message.
-     */
-    public AuthenticationException(String msg) {
-        super(msg);
-    }
+  /**
+   * Constructs an instance of <code>AuthenticationException</code> with the specified detail
+   * message.
+   * 
+   * @param msg
+   *          the detail message.
+   */
+  public AuthenticationException(String msg) {
+    super(msg);
+  }
 
-    public AuthenticationException(String msg, Throwable t) {
-        super(msg, t);
-    }
+  public AuthenticationException(String msg, Throwable t) {
+    super(msg, t);
+  }
 }
--- a/src/org/openbravo/authentication/AuthenticationManager.java	Sun Feb 01 21:40:15 2009 +0000
+++ b/src/org/openbravo/authentication/AuthenticationManager.java	Mon Feb 02 06:26:05 2009 +0000
@@ -25,12 +25,11 @@
  */
 public interface AuthenticationManager {
 
-    public void init(HttpServlet s) throws AuthenticationException;
+  public void init(HttpServlet s) throws AuthenticationException;
 
-    public String authenticate(HttpServletRequest request,
-            HttpServletResponse response) throws AuthenticationException,
-            ServletException, IOException;
+  public String authenticate(HttpServletRequest request, HttpServletResponse response)
+      throws AuthenticationException, ServletException, IOException;
 
-    public void logout(HttpServletRequest request, HttpServletResponse response)
-            throws ServletException, IOException;
+  public void logout(HttpServletRequest request, HttpServletResponse response)
+      throws ServletException, IOException;
 }
--- a/src/org/openbravo/authentication/basic/AutologonAuthenticationManager.java	Sun Feb 01 21:40:15 2009 +0000
+++ b/src/org/openbravo/authentication/basic/AutologonAuthenticationManager.java	Mon Feb 02 06:26:05 2009 +0000
@@ -32,54 +32,48 @@
  */
 public class AutologonAuthenticationManager implements AuthenticationManager {
 
-    private String m_sAutologonUsername;
-    private String m_sUserId = null;
+  private String m_sAutologonUsername;
+  private String m_sUserId = null;
 
-    /** Creates a new instance of FixedAuthenticationManager */
-    public AutologonAuthenticationManager() {
+  /** Creates a new instance of FixedAuthenticationManager */
+  public AutologonAuthenticationManager() {
+  }
+
+  public void init(HttpServlet s) throws AuthenticationException {
+
+    if (s instanceof ConnectionProvider) {
+      ConnectionProvider conn = (ConnectionProvider) s;
+      m_sAutologonUsername = ConfigParameters.retrieveFrom(s.getServletContext()).getOBProperty(
+          "authentication.autologon.username");
+      try {
+        m_sUserId = SeguridadData.getUserId(conn, m_sAutologonUsername);
+      } catch (ServletException e) {
+        throw new AuthenticationException("Cannot authenticate user: " + m_sAutologonUsername, e);
+      }
+
+    } else {
+      throw new AuthenticationException("Connection provider required for Autologon authentication");
     }
+  }
 
-    public void init(HttpServlet s) throws AuthenticationException {
+  public String authenticate(HttpServletRequest request, HttpServletResponse response)
+      throws AuthenticationException, ServletException, IOException {
 
-        if (s instanceof ConnectionProvider) {
-            ConnectionProvider conn = (ConnectionProvider) s;
-            m_sAutologonUsername = ConfigParameters.retrieveFrom(
-                    s.getServletContext()).getOBProperty(
-                    "authentication.autologon.username");
-            try {
-                m_sUserId = SeguridadData.getUserId(conn, m_sAutologonUsername);
-            } catch (ServletException e) {
-                throw new AuthenticationException("Cannot authenticate user: "
-                        + m_sAutologonUsername, e);
-            }
+    if (m_sUserId == null || m_sUserId.equals("") || m_sUserId.equals("-1")) {
+      if (m_sAutologonUsername == null || m_sAutologonUsername.equals("")) {
+        throw new AuthenticationException("Autologon user emtpy.");
+      } else {
+        throw new AuthenticationException("Autologon user is not an Openbravo ERP user: "
+            + m_sAutologonUsername);
+      }
+    } else {
+      return m_sUserId;
+    }
+  }
 
-        } else {
-            throw new AuthenticationException(
-                    "Connection provider required for Autologon authentication");
-        }
-    }
-
-    public String authenticate(HttpServletRequest request,
-            HttpServletResponse response) throws AuthenticationException,
-            ServletException, IOException {
-
-        if (m_sUserId == null || m_sUserId.equals("") || m_sUserId.equals("-1")) {
-            if (m_sAutologonUsername == null || m_sAutologonUsername.equals("")) {
-                throw new AuthenticationException("Autologon user emtpy.");
-            } else {
-                throw new AuthenticationException(
-                        "Autologon user is not an Openbravo ERP user: "
-                                + m_sAutologonUsername);
-            }
-        } else {
-            return m_sUserId;
-        }
-    }
-
-    public void logout(HttpServletRequest request, HttpServletResponse response)
-            throws ServletException, IOException {
-        // Never logs out this manager, just go to menu.
-        response.sendRedirect(HttpBaseUtils.getLocalAddress(request)
-                + "/security/Menu.html");
-    }
+  public void logout(HttpServletRequest request, HttpServletResponse response)
+      throws ServletException, IOException {
+    // Never logs out this manager, just go to menu.
+    response.sendRedirect(HttpBaseUtils.getLocalAddress(request) + "/security/Menu.html");
+  }
 }
\ No newline at end of file
--- a/src/org/openbravo/authentication/basic/DefaultAuthenticationManager.java	Sun Feb 01 21:40:15 2009 +0000
+++ b/src/org/openbravo/authentication/basic/DefaultAuthenticationManager.java	Mon Feb 02 06:26:05 2009 +0000
@@ -34,96 +34,87 @@
  */
 public class DefaultAuthenticationManager implements AuthenticationManager {
 
-    private ConnectionProvider conn = null;
-    private String strServletSinIdentificar = null;
-    public Logger log4j = Logger.getLogger(DefaultAuthenticationManager.class);
+  private ConnectionProvider conn = null;
+  private String strServletSinIdentificar = null;
+  public Logger log4j = Logger.getLogger(DefaultAuthenticationManager.class);
 
-    /** Creates a new instance of DefaultAuthenticationManager */
-    public DefaultAuthenticationManager() {
+  /** Creates a new instance of DefaultAuthenticationManager */
+  public DefaultAuthenticationManager() {
+  }
+
+  public void init(HttpServlet s) throws AuthenticationException {
+    if (s instanceof ConnectionProvider) {
+      conn = (ConnectionProvider) s;
+      strServletSinIdentificar = s.getServletConfig().getServletContext().getInitParameter(
+          "ServletSinIdentificar");
+    } else {
+      throw new AuthenticationException("Connection provider required for default authentication");
     }
+  }
 
-    public void init(HttpServlet s) throws AuthenticationException {
-        if (s instanceof ConnectionProvider) {
-            conn = (ConnectionProvider) s;
-            strServletSinIdentificar = s.getServletConfig().getServletContext()
-                    .getInitParameter("ServletSinIdentificar");
-        } else {
-            throw new AuthenticationException(
-                    "Connection provider required for default authentication");
-        }
+  public String authenticate(HttpServletRequest request, HttpServletResponse response)
+      throws AuthenticationException, ServletException, IOException {
+    String sUserId = (String) request.getSession(true).getAttribute("#Authenticated_user");
+
+    if (sUserId == null || sUserId.equals("")) {
+      String strAjax = "";
+      // strHidden and strPopUp not implemented
+      /*
+       * String strHidden = ""; String strPopUp = "";
+       */
+      try {
+        strAjax = request.getParameter("IsAjaxCall");
+      } catch (Exception ignored) {
+      }
+      /*
+       * try { strHidden = request.getParameter("IsHiddenCall"); } catch (Exception ignored) {} try
+       * { strPopUp = request.getParameter("IsPopUpCall"); } catch (Exception ignored) {}
+       */
+      VariablesHistory variables = new VariablesHistory(request);
+
+      // redirects to the menu or the menu with the target
+      String strTarget = request.getRequestURL().toString();
+      if (!strTarget.endsWith("/security/Menu.html")) {
+        variables.setSessionValue("targetmenu", strTarget);
+      }
+
+      // redirects
+      String strDireccionLocal = HttpBaseUtils.getLocalAddress(request);
+      variables.setSessionValue("target", strDireccionLocal + "/security/Menu.html");
+      if (strAjax != null && !strAjax.equals(""))
+        bdErrorAjax(response, "Error", "", Utility.messageBD(this.conn, "NotLogged", variables
+            .getLanguage()));
+      else
+        response.sendRedirect(strDireccionLocal + strServletSinIdentificar);
+      return null;
+    } else {
+      return sUserId;
     }
+  }
 
-    public String authenticate(HttpServletRequest request,
-            HttpServletResponse response) throws AuthenticationException,
-            ServletException, IOException {
-        String sUserId = (String) request.getSession(true).getAttribute(
-                "#Authenticated_user");
+  public void bdErrorAjax(HttpServletResponse response, String strType, String strTitle,
+      String strText) throws IOException {
+    response.setContentType("text/xml; charset=UTF-8");
+    PrintWriter out = response.getWriter();
+    out.println("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n");
+    out.println("<xml-structure>\n");
+    out.println("  <status>\n");
+    out.println("    <type>" + strType + "</type>\n");
+    out.println("    <title>" + strTitle + "</title>\n");
+    out.println("    <description><![CDATA[" + strText + "]]></description>\n");
+    out.println("  </status>\n");
+    out.println("</xml-structure>\n");
+    out.close();
+  }
 
-        if (sUserId == null || sUserId.equals("")) {
-            String strAjax = "";
-            // strHidden and strPopUp not implemented
-            /*
-             * String strHidden = ""; String strPopUp = "";
-             */
-            try {
-                strAjax = request.getParameter("IsAjaxCall");
-            } catch (Exception ignored) {
-            }
-            /*
-             * try { strHidden = request.getParameter("IsHiddenCall"); } catch
-             * (Exception ignored) {} try { strPopUp =
-             * request.getParameter("IsPopUpCall"); } catch (Exception ignored)
-             * {}
-             */
-            VariablesHistory variables = new VariablesHistory(request);
-
-            // redirects to the menu or the menu with the target
-            String strTarget = request.getRequestURL().toString();
-            if (!strTarget.endsWith("/security/Menu.html")) {
-                variables.setSessionValue("targetmenu", strTarget);
-            }
-
-            // redirects
-            String strDireccionLocal = HttpBaseUtils.getLocalAddress(request);
-            variables.setSessionValue("target", strDireccionLocal
-                    + "/security/Menu.html");
-            if (strAjax != null && !strAjax.equals(""))
-                bdErrorAjax(response, "Error", "", Utility.messageBD(this.conn,
-                        "NotLogged", variables.getLanguage()));
-            else
-                response.sendRedirect(strDireccionLocal
-                        + strServletSinIdentificar);
-            return null;
-        } else {
-            return sUserId;
-        }
+  public void logout(HttpServletRequest request, HttpServletResponse response)
+      throws ServletException, IOException {
+    if (request.getSession().getAttribute("#Authenticated_user") != null
+        && !request.getSession().getAttribute("#Authenticated_user").equals("")) {
+      request.getSession(true).removeAttribute("#Authenticated_user");
     }
-
-    public void bdErrorAjax(HttpServletResponse response, String strType,
-            String strTitle, String strText) throws IOException {
-        response.setContentType("text/xml; charset=UTF-8");
-        PrintWriter out = response.getWriter();
-        out.println("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n");
-        out.println("<xml-structure>\n");
-        out.println("  <status>\n");
-        out.println("    <type>" + strType + "</type>\n");
-        out.println("    <title>" + strTitle + "</title>\n");
-        out.println("    <description><![CDATA[" + strText
-                + "]]></description>\n");
-        out.println("  </status>\n");
-        out.println("</xml-structure>\n");
-        out.close();
-    }
-
-    public void logout(HttpServletRequest request, HttpServletResponse response)
-            throws ServletException, IOException {
-        if (request.getSession().getAttribute("#Authenticated_user") != null
-                && !request.getSession().getAttribute("#Authenticated_user")
-                        .equals("")) {
-            request.getSession(true).removeAttribute("#Authenticated_user");
-        }
-        if (!response.isCommitted())
-            response.sendRedirect(HttpBaseUtils.getLocalAddress(request));
-    }
+    if (!response.isCommitted())
+      response.sendRedirect(HttpBaseUtils.getLocalAddress(request));
+  }
 
 }
--- a/src/org/openbravo/authentication/lam/LamAuthenticationManager.java	Sun Feb 01 21:40:15 2009 +0000
+++ b/src/org/openbravo/authentication/lam/LamAuthenticationManager.java	Mon Feb 02 06:26:05 2009 +0000
@@ -36,61 +36,57 @@
  */
 public class LamAuthenticationManager implements AuthenticationManager {
 
-    private ConnectionProvider conn = null;
+  private ConnectionProvider conn = null;
 
-    /** Creates a new instance of LamAuthenticationManager */
-    public LamAuthenticationManager() {
+  /** Creates a new instance of LamAuthenticationManager */
+  public LamAuthenticationManager() {
+  }
+
+  public void init(HttpServlet s) throws AuthenticationException {
+
+    // TODO: Read LAM configuration.
+    if (s instanceof ConnectionProvider) {
+      conn = (ConnectionProvider) s;
+    } else {
+      throw new AuthenticationException("Connection provider required for LAM authentication");
     }
+  }
 
-    public void init(HttpServlet s) throws AuthenticationException {
+  public String authenticate(HttpServletRequest request, HttpServletResponse response)
+      throws AuthenticationException, ServletException, IOException {
 
-        // TODO: Read LAM configuration.
-        if (s instanceof ConnectionProvider) {
-            conn = (ConnectionProvider) s;
+    try {
+      LamClient LC = new LamClient(); // TODO: configure LamClient
+
+      String sUserName = LC.force_authenticate(request, response);
+      if (sUserName == null || sUserName.equals("")) {
+        return null;
+      } else {
+        String sUserId = SeguridadData.getUserId(conn, sUserName);
+        if ("-1".equals(sUserId)) {
+          throw new AuthenticationException("Authenticated user is not an Openbravo ERP user: "
+              + sUserName);
         } else {
-            throw new AuthenticationException(
-                    "Connection provider required for LAM authentication");
+          return sUserId;
         }
+      }
+    } catch (XmlRpcException e) {
+      throw new ServletException("Cannot authenticate user.", e);
+    } catch (NoSuchAlgorithmException e) {
+      throw new ServletException("Cannot authenticate user.", e);
+    } catch (KeyManagementException e) {
+      throw new ServletException("Cannot authenticate user.", e);
     }
+  }
 
-    public String authenticate(HttpServletRequest request,
-            HttpServletResponse response) throws AuthenticationException,
-            ServletException, IOException {
+  public void logout(HttpServletRequest request, HttpServletResponse response)
+      throws ServletException, IOException {
 
-        try {
-            LamClient LC = new LamClient(); // TODO: configure LamClient
-
-            String sUserName = LC.force_authenticate(request, response);
-            if (sUserName == null || sUserName.equals("")) {
-                return null;
-            } else {
-                String sUserId = SeguridadData.getUserId(conn, sUserName);
-                if ("-1".equals(sUserId)) {
-                    throw new AuthenticationException(
-                            "Authenticated user is not an Openbravo ERP user: "
-                                    + sUserName);
-                } else {
-                    return sUserId;
-                }
-            }
-        } catch (XmlRpcException e) {
-            throw new ServletException("Cannot authenticate user.", e);
-        } catch (NoSuchAlgorithmException e) {
-            throw new ServletException("Cannot authenticate user.", e);
-        } catch (KeyManagementException e) {
-            throw new ServletException("Cannot authenticate user.", e);
-        }
+    try {
+      LamClient LC = new LamClient(); // TODO: configure LamClient
+      LC.logout(request, response, HttpBaseUtils.getLocalAddress(request) + "/security/Menu.html");
+    } catch (XmlRpcException e) {
+      throw new ServletException("Cannot close user session.", e);
     }
-
-    public void logout(HttpServletRequest request, HttpServletResponse response)
-            throws ServletException, IOException {
-
-        try {
-            LamClient LC = new LamClient(); // TODO: configure LamClient
-            LC.logout(request, response, HttpBaseUtils.getLocalAddress(request)
-                    + "/security/Menu.html");
-        } catch (XmlRpcException e) {
-            throw new ServletException("Cannot close user session.", e);
-        }
-    }
+  }
 }
\ No newline at end of file
--- a/src/org/openbravo/base/OBSchedulerInitializerListener.java	Sun Feb 01 21:40:15 2009 +0000
+++ b/src/org/openbravo/base/OBSchedulerInitializerListener.java	Mon Feb 02 06:26:05 2009 +0000
@@ -20,141 +20,119 @@
 import org.quartz.impl.StdSchedulerFactory;
 
 /**
- * A copy of the QuartzInializerListener with some modifications to initialize
- * the Openbravo scheduling items.
+ * A copy of the QuartzInializerListener with some modifications to initialize the Openbravo
+ * scheduling items.
  * 
- * Places Openbravo ERP application resources such as ConnectionProvider and
- * ConfigParameters in the scheduling context so that OBScheduler singleton
- * instance has access to them.
+ * Places Openbravo ERP application resources such as ConnectionProvider and ConfigParameters in the
+ * scheduling context so that OBScheduler singleton instance has access to them.
  * 
  * @author awolski
  * 
  */
 public class OBSchedulerInitializerListener implements ServletContextListener {
 
-    private boolean performShutdown = true;
+  private boolean performShutdown = true;
 
-    private Scheduler scheduler = null;
+  private Scheduler scheduler = null;
 
-    static Logger log = Logger.getLogger(OBSchedulerInitializerListener.class);
+  static Logger log = Logger.getLogger(OBSchedulerInitializerListener.class);
 
-    public void contextInitialized(ServletContextEvent sce) {
+  public void contextInitialized(ServletContextEvent sce) {
 
-        log.info("Quartz Initializer Servlet loaded, initializing "
-                + "Scheduler...");
+    log.info("Quartz Initializer Servlet loaded, initializing " + "Scheduler...");
 
-        final ServletContext servletContext = sce.getServletContext();
-        StdSchedulerFactory factory;
-        try {
+    final ServletContext servletContext = sce.getServletContext();
+    StdSchedulerFactory factory;
+    try {
 
-            final String configFile = servletContext
-                    .getInitParameter("config-file");
-            final String shutdownPref = servletContext
-                    .getInitParameter("shutdown-on-unload");
+      final String configFile = servletContext.getInitParameter("config-file");
+      final String shutdownPref = servletContext.getInitParameter("shutdown-on-unload");
 
-            if (shutdownPref != null) {
-                performShutdown = Boolean.valueOf(shutdownPref).booleanValue();
-            }
+      if (shutdownPref != null) {
+        performShutdown = Boolean.valueOf(shutdownPref).booleanValue();
+      }
 
-            // get Properties
-            if (configFile != null) {
-                factory = new StdSchedulerFactory(configFile);
-            } else {
-                factory = new StdSchedulerFactory();
-            }
+      // get Properties
+      if (configFile != null) {
+        factory = new StdSchedulerFactory(configFile);
+      } else {
+        factory = new StdSchedulerFactory();
+      }
 
-            // Always want to get the scheduler, even if it isn't starting,
-            // to make sure it is both initialized and registered.
-            scheduler = factory.getScheduler();
+      // Always want to get the scheduler, even if it isn't starting,
+      // to make sure it is both initialized and registered.
+      scheduler = factory.getScheduler();
 
-            // Should the Scheduler being started now or later
-            final String startOnLoad = servletContext
-                    .getInitParameter("start-scheduler-on-load");
+      // Should the Scheduler being started now or later
+      final String startOnLoad = servletContext.getInitParameter("start-scheduler-on-load");
 
-            int startDelay = 0;
-            final String startDelayS = servletContext
-                    .getInitParameter("start-delay-seconds");
-            try {
-                if (startDelayS != null && startDelayS.trim().length() > 0)
-                    startDelay = Integer.parseInt(startDelayS);
-            } catch (final Exception e) {
-                log
-                        .error(
-                                "Cannot parse value of 'start-delay-seconds' to an integer: "
-                                        + startDelayS
-                                        + ", defaulting to 5 seconds.", e);
-                startDelay = 5;
-            }
+      int startDelay = 0;
+      final String startDelayS = servletContext.getInitParameter("start-delay-seconds");
+      try {
+        if (startDelayS != null && startDelayS.trim().length() > 0)
+          startDelay = Integer.parseInt(startDelayS);
+      } catch (final Exception e) {
+        log.error("Cannot parse value of 'start-delay-seconds' to an integer: " + startDelayS
+            + ", defaulting to 5 seconds.", e);
+        startDelay = 5;
+      }
 
-            /*
-             * If the "start-scheduler-on-load" init-parameter is not specified,
-             * the scheduler will be started. This is to maintain backwards
-             * compatability.
-             */
-            if (startOnLoad == null
-                    || (Boolean.valueOf(startOnLoad).booleanValue())) {
-                if (startDelay <= 0) {
-                    // Start now
-                    scheduler.start();
-                    log.info("Scheduler has been started...");
-                } else {
-                    // Start delayed
-                    scheduler.startDelayed(startDelay);
-                    log.info("Scheduler will start in " + startDelay
-                            + " seconds.");
-                }
-            } else {
-                log
-                        .info("Scheduler has not been started. Use scheduler.start()");
-            }
+      /*
+       * If the "start-scheduler-on-load" init-parameter is not specified, the scheduler will be
+       * started. This is to maintain backwards compatability.
+       */
+      if (startOnLoad == null || (Boolean.valueOf(startOnLoad).booleanValue())) {
+        if (startDelay <= 0) {
+          // Start now
+          scheduler.start();
+          log.info("Scheduler has been started...");
+        } else {
+          // Start delayed
+          scheduler.startDelayed(startDelay);
+          log.info("Scheduler will start in " + startDelay + " seconds.");
+        }
+      } else {
+        log.info("Scheduler has not been started. Use scheduler.start()");
+      }
 
-            String factoryKey = servletContext
-                    .getInitParameter("servlet-context-factory-key");
-            if (factoryKey == null) {
-                factoryKey = QUARTZ_FACTORY_KEY;
-            }
+      String factoryKey = servletContext.getInitParameter("servlet-context-factory-key");
+      if (factoryKey == null) {
+        factoryKey = QUARTZ_FACTORY_KEY;
+      }
 
-            /**
-             * Openbravo scheduling stuff.
-             */
-            log
-                    .info("Storing the Quartz Scheduler Factory in the servlet context at key: "
-                            + factoryKey);
-            servletContext.setAttribute(factoryKey, factory);
+      /**
+       * Openbravo scheduling stuff.
+       */
+      log.info("Storing the Quartz Scheduler Factory in the servlet context at key: " + factoryKey);
+      servletContext.setAttribute(factoryKey, factory);
 
-            log.info("Storing ConfigParameters and ConnectionProvider in "
-                    + "Scheduler Context.");
-            scheduler.getContext().put(POOL_ATTRIBUTE,
-                    servletContext.getAttribute(POOL_ATTRIBUTE));
-            scheduler.getContext().put(CONFIG_ATTRIBUTE,
-                    servletContext.getAttribute(CONFIG_ATTRIBUTE));
+      log.info("Storing ConfigParameters and ConnectionProvider in " + "Scheduler Context.");
+      scheduler.getContext().put(POOL_ATTRIBUTE, servletContext.getAttribute(POOL_ATTRIBUTE));
+      scheduler.getContext().put(CONFIG_ATTRIBUTE, servletContext.getAttribute(CONFIG_ATTRIBUTE));
 
-            log.info("Initalizing singleton instance of "
-                    + OBScheduler.class.getName());
-            OBScheduler.getInstance().initialize(scheduler);
+      log.info("Initalizing singleton instance of " + OBScheduler.class.getName());
+      OBScheduler.getInstance().initialize(scheduler);
 
-        } catch (final Exception e) {
-            log.error("Quartz Scheduler failed to initialize: " + e.toString(),
-                    e);
-        }
+    } catch (final Exception e) {
+      log.error("Quartz Scheduler failed to initialize: " + e.toString(), e);
+    }
+  }
+
+  public void contextDestroyed(ServletContextEvent sce) {
+
+    if (!performShutdown) {
+      return;
     }
 
-    public void contextDestroyed(ServletContextEvent sce) {
-
-        if (!performShutdown) {
-            return;
-        }
-
-        try {
-            if (scheduler != null) {
-                scheduler.shutdown();
-            }
-        } catch (final Exception e) {
-            log.error("Quartz Scheduler failed to shutdown cleanly: "
-                    + e.toString(), e);
-        }
-
-        log.info("Quartz Scheduler successful shutdown.");
+    try {
+      if (scheduler != null) {
+        scheduler.shutdown();
+      }
+    } catch (final Exception e) {
+      log.error("Quartz Scheduler failed to shutdown cleanly: " + e.toString(), e);
     }
 
+    log.info("Quartz Scheduler successful shutdown.");
+  }
+
 }
\ No newline at end of file
--- a/src/org/openbravo/base/exception/OBException.java	Sun Feb 01 21:40:15 2009 +0000
+++ b/src/org/openbravo/base/exception/OBException.java	Mon Feb 02 06:26:05 2009 +0000
@@ -22,42 +22,42 @@
 import org.apache.log4j.Logger;
 
 /**
- * This is the base exception for all exceptions in Openbravo. It is an
- * unchecked exception which also logs itself.
+ * This is the base exception for all exceptions in Openbravo. It is an unchecked exception which
+ * also logs itself.
  * 
  * @author mtaal
  */
 public class OBException extends RuntimeException {
 
-    private static final long serialVersionUID = 1L;
+  private static final long serialVersionUID = 1L;
 
-    public OBException() {
-        super();
-        getLogger().error(this);
-    }
+  public OBException() {
+    super();
+    getLogger().error(this);
+  }
 
-    public OBException(String message, Throwable cause) {
-        super(message, cause);
-        getLogger().error(message, cause);
-    }
+  public OBException(String message, Throwable cause) {
+    super(message, cause);
+    getLogger().error(message, cause);
+  }
 
-    public OBException(String message) {
-        super(message);
-        getLogger().error(message, this);
-    }
+  public OBException(String message) {
+    super(message);
+    getLogger().error(message, this);
+  }
 
-    public OBException(Throwable cause) {
-        super(cause);
-        getLogger().error(cause);
-    }
+  public OBException(Throwable cause) {
+    super(cause);
+    getLogger().error(cause);
+  }
 
-    /**
-     * This method returns a logger which can be used by a subclass. The logger
-     * is specific for the instance of the Exception (the subclass).
-     * 
-     * @return the class-specific Logger
-     */
-    protected Logger getLogger() {
-        return Logger.getLogger(this.getClass());
-    }
+  /**
+   * This method returns a logger which can be used by a subclass. The logger is specific for the
+   * instance of the Exception (the subclass).
+   * 
+   * @return the class-specific Logger
+   */
+  protected Logger getLogger() {
+    return Logger.getLogger(this.getClass());
+  }
 }
--- a/src/org/openbravo/base/exception/OBSecurityException.java	Sun Feb 01 21:40:15 2009 +0000
+++ b/src/org/openbravo/base/exception/OBSecurityException.java	Mon Feb 02 06:26:05 2009 +0000
@@ -20,28 +20,28 @@
 package org.openbravo.base.exception;
 
 /**
- * This exception is used in case of Security violation. For example updating an
- * object of another client.
+ * This exception is used in case of Security violation. For example updating an object of another
+ * client.
  * 
  * @author mtaal
  */
 public class OBSecurityException extends OBException {
 
-    private static final long serialVersionUID = 1L;
+  private static final long serialVersionUID = 1L;
 
-    public OBSecurityException() {
-        super();
-    }
+  public OBSecurityException() {
+    super();
+  }
 
-    public OBSecurityException(String message, Throwable cause) {
-        super(message, cause);
-    }
+  public OBSecurityException(String message, Throwable cause) {
+    super(message, cause);
+  }
 
-    public OBSecurityException(String message) {
-        super(message);
-    }
+  public OBSecurityException(String message) {
+    super(message);
+  }
 
-    public OBSecurityException(Throwable cause) {
-        super(cause);
-    }
+  public OBSecurityException(Throwable cause) {
+    super(cause);
+  }
 }
--- a/src/org/openbravo/base/expression/Evaluator.java	Sun Feb 01 21:40:15 2009 +0000
+++ b/src/org/openbravo/base/expression/Evaluator.java	Mon Feb 02 06:26:05 2009 +0000
@@ -28,65 +28,65 @@
 import org.openbravo.base.util.Check;
 
 /**
- * Evaluates expressions in the context of a business object, the expression
- * language supported by this class is javascript rhino.
+ * Evaluates expressions in the context of a business object, the expression language supported by
+ * this class is javascript rhino.
  * 
  * @author mtaal
  */
 
 public class Evaluator implements OBSingleton {
-    private static final Logger log = Logger.getLogger(Evaluator.class);
+  private static final Logger log = Logger.getLogger(Evaluator.class);
 
-    private static Evaluator instance = new Evaluator();
+  private static Evaluator instance = new Evaluator();
 
-    public static Evaluator getInstance() {
-        if (instance == null) {
-            instance = OBProvider.getInstance().get(Evaluator.class);
-        }
-        return instance;
+  public static Evaluator getInstance() {
+    if (instance == null) {
+      instance = OBProvider.getInstance().get(Evaluator.class);
     }
+    return instance;
+  }
 
-    public static void setInstance(Evaluator instance) {
-        Evaluator.instance = instance;
+  public static void setInstance(Evaluator instance) {
+    Evaluator.instance = instance;
+  }
+
+  /**
+   * Evaluates the passed script in the context of the passed business object. This means that
+   * properties of the business object may be used directly in the script. The result should always
+   * be a boolean.
+   * 
+   * @param contextBob
+   *          the script is executed in the context of this business object
+   * @param script
+   *          the javascript which much evaluate to a boolean
+   * @return the result of the script evaluation
+   */
+  public Boolean evaluateBoolean(BaseOBObjectDef contextBob, String script) {
+    // TODO: check if the compiled javascript can be cached
+
+    log.debug("Evaluating script for " + contextBob + " script: " + script);
+
+    try {
+      // note that the name of a engine can differ: Mozilla Rhino
+      // but js seems to work fine
+      final ScriptEngineManager manager = new ScriptEngineManager();
+      final ScriptEngine engine = manager.getEngineByName("js");
+      Check
+          .isNotNull(
+              engine,
+              "Scripting engine not found using name js, check for other scripting language names such as Mozilla Rhino");
+
+      final Entity e = contextBob.getEntity();
+      for (final Property p : e.getProperties()) {
+        engine.put(p.getName(), contextBob.get(p.getName()));
+      }
+
+      final Object result = engine.eval(script);
+      Check.isInstanceOf(result, Boolean.class);
+      return (Boolean) result;
+    } catch (final ScriptException e) {
+      throw new OBException("Exception while executing " + script + " for business object "
+          + contextBob, e);
     }
-
-    /**
-     * Evaluates the passed script in the context of the passed business object.
-     * This means that properties of the business object may be used directly in
-     * the script. The result should always be a boolean.
-     * 
-     * @param contextBob
-     *            the script is executed in the context of this business object
-     * @param script
-     *            the javascript which much evaluate to a boolean
-     * @return the result of the script evaluation
-     */
-    public Boolean evaluateBoolean(BaseOBObjectDef contextBob, String script) {
-        // TODO: check if the compiled javascript can be cached
-
-        log.debug("Evaluating script for " + contextBob + " script: " + script);
-
-        try {
-            // note that the name of a engine can differ: Mozilla Rhino
-            // but js seems to work fine
-            final ScriptEngineManager manager = new ScriptEngineManager();
-            final ScriptEngine engine = manager.getEngineByName("js");
-            Check
-                    .isNotNull(
-                            engine,
-                            "Scripting engine not found using name js, check for other scripting language names such as Mozilla Rhino");
-
-            final Entity e = contextBob.getEntity();
-            for (final Property p : e.getProperties()) {
-                engine.put(p.getName(), contextBob.get(p.getName()));
-            }
-
-            final Object result = engine.eval(script);
-            Check.isInstanceOf(result, Boolean.class);
-            return (Boolean) result;
-        } catch (final ScriptException e) {
-            throw new OBException("Exception while executing " + script
-                    + " for business object " + contextBob, e);
-        }
-    }
+  }
 }
--- a/src/org/openbravo/base/gen/GenerateEntitiesTask.java	Sun Feb 01 21:40:15 2009 +0000
+++ b/src/org/openbravo/base/gen/GenerateEntitiesTask.java	Mon Feb 02 06:26:05 2009 +0000
@@ -31,143 +31,132 @@
 import org.openbravo.base.util.OBClassLoader;
 
 /**
- * Task generates the entities using OpenArchitectureWare. It initializes the
- * dal/model layer, the rest of the work is done by the superclass.
+ * Task generates the entities using OpenArchitectureWare. It initializes the dal/model layer, the
+ * rest of the work is done by the superclass.
  * 
  * @author Martin Taal
  */
 public class GenerateEntitiesTask extends WorkflowAntTask {
-    private static final Logger log = Logger
-            .getLogger(GenerateEntitiesTask.class);
+  private static final Logger log = Logger.getLogger(GenerateEntitiesTask.class);
 
-    private static String basePath;
-    private String srcGenPath;
+  private static String basePath;
+  private String srcGenPath;
 
-    public static String getBasePath() {
-        return basePath;
+  public static String getBasePath() {
+    return basePath;
+  }
+
+  public static void setBasePath(String basePath) {
+    GenerateEntitiesTask.basePath = basePath;
+  }
+
+  private String propertiesFile;
+  private String providerConfigDirectory;
+  private boolean debug;
+
+  public String getPropertiesFile() {
+    return propertiesFile;
+  }
+
+  public void setPropertiesFile(String propertiesFile) {
+    this.propertiesFile = propertiesFile;
+  }
+
+  @Override
+  public void execute() {
+
+    if (!hasChanged()) {
+      log.info("Model has not changed since last run, not re-generating entities");
+      return;
     }
 
-    public static void setBasePath(String basePath) {
-        GenerateEntitiesTask.basePath = basePath;
+    if (getBasePath() == null) {
+      setBasePath(super.getProject().getBaseDir().getAbsolutePath());
     }
 
-    private String propertiesFile;
-    private String providerConfigDirectory;
-    private boolean debug;
+    if (debug) {
+      OBProvider.getInstance().register(OBClassLoader.class,
+          OBClassLoader.ClassOBClassLoader.class, false);
 
-    public String getPropertiesFile() {
-        return propertiesFile;
+      // the beautifier uses the source.path if it is not set
+      log.debug("initializating dal layer, getting properties from " + getPropertiesFile());
+      OBPropertiesProvider.getInstance().setProperties(getPropertiesFile());
+
+      if (getProviderConfigDirectory() != null) {
+        OBConfigFileProvider.getInstance().setFileLocation(getProviderConfigDirectory());
+      }
+
+      try {
+        ModelProvider.getInstance().getModel();
+      } catch (final Exception e) {
+        e.printStackTrace(System.err);
+        throw new OBException(e);
+      }
+    }
+    super.execute();
+  }
+
+  private boolean hasChanged() {
+    // first check if there is a directory
+    // already in the src-gen
+    // if not then regenerate anyhow
+    final File modelDir = new File(getSrcGenPath(), "org" + File.separator + "openbravo"
+        + File.separator + "model" + File.separator + "ad");
+    if (!modelDir.exists()) {
+      return true;
     }
 
-    public void setPropertiesFile(String propertiesFile) {
-        this.propertiesFile = propertiesFile;
+    OBProvider.getInstance().register(OBClassLoader.class, OBClassLoader.ClassOBClassLoader.class,
+        false);
+
+    // the beautifier uses the source.path if it is not set
+    log.debug("initializating dal layer, getting properties from " + getPropertiesFile());
+    OBPropertiesProvider.getInstance().setProperties(getPropertiesFile());
+
+    if (getProviderConfigDirectory() != null) {
+      OBConfigFileProvider.getInstance().setFileLocation(getProviderConfigDirectory());
     }
 
-    @Override
-    public void execute() {
+    // check if there is a sourcefile which was updated before the last
+    // time the model was created. In this case that sourcefile (and
+    // all source files need to be regenerated
+    final long lastModelUpdateTime = ModelProvider.getInstance().computeLastUpdateModelTime();
+    return isSourceFileUpdatedBeforeModelChange(modelDir, lastModelUpdateTime);
+  }
 
-        if (!hasChanged()) {
-            log
-                    .info("Model has not changed since last run, not re-generating entities");
-            return;
+  private boolean isSourceFileUpdatedBeforeModelChange(File file, long modelUpdateTime) {
+    if (file.isDirectory()) {
+      for (File child : file.listFiles()) {
+        if (isSourceFileUpdatedBeforeModelChange(child, modelUpdateTime)) {
+          return true;
         }
+      }
+      return false;
+    }
+    return file.lastModified() < modelUpdateTime;
+  }
 
-        if (getBasePath() == null) {
-            setBasePath(super.getProject().getBaseDir().getAbsolutePath());
-        }
+  public String getProviderConfigDirectory() {
+    return providerConfigDirectory;
+  }
 
-        if (debug) {
-            OBProvider.getInstance().register(OBClassLoader.class,
-                    OBClassLoader.ClassOBClassLoader.class, false);
+  public void setProviderConfigDirectory(String providerConfigDirectory) {
+    this.providerConfigDirectory = providerConfigDirectory;
+  }
 
-            // the beautifier uses the source.path if it is not set
-            log.debug("initializating dal layer, getting properties from "
-                    + getPropertiesFile());
-            OBPropertiesProvider.getInstance().setProperties(
-                    getPropertiesFile());
+  public boolean isDebug() {
+    return debug;
+  }
 
-            if (getProviderConfigDirectory() != null) {
-                OBConfigFileProvider.getInstance().setFileLocation(
-                        getProviderConfigDirectory());
-            }
+  public void setDebug(boolean debug) {
+    this.debug = debug;
+  }
 
-            try {
-                ModelProvider.getInstance().getModel();
-            } catch (final Exception e) {
-                e.printStackTrace(System.err);
-                throw new OBException(e);
-            }
-        }
-        super.execute();
-    }
+  public String getSrcGenPath() {
+    return srcGenPath;
+  }
 
-    private boolean hasChanged() {
-        // first check if there is a directory
-        // already in the src-gen
-        // if not then regenerate anyhow
-        final File modelDir = new File(getSrcGenPath(), "org" + File.separator
-                + "openbravo" + File.separator + "model" + File.separator
-                + "ad");
-        if (!modelDir.exists()) {
-            return true;
-        }
-
-        OBProvider.getInstance().register(OBClassLoader.class,
-                OBClassLoader.ClassOBClassLoader.class, false);
-
-        // the beautifier uses the source.path if it is not set
-        log.debug("initializating dal layer, getting properties from "
-                + getPropertiesFile());
-        OBPropertiesProvider.getInstance().setProperties(getPropertiesFile());
-
-        if (getProviderConfigDirectory() != null) {
-            OBConfigFileProvider.getInstance().setFileLocation(
-                    getProviderConfigDirectory());
-        }
-
-        // check if there is a sourcefile which was updated before the last
-        // time the model was created. In this case that sourcefile (and
-        // all source files need to be regenerated
-        final long lastModelUpdateTime = ModelProvider.getInstance()
-                .computeLastUpdateModelTime();
-        return isSourceFileUpdatedBeforeModelChange(modelDir,
-                lastModelUpdateTime);
-    }
-
-    private boolean isSourceFileUpdatedBeforeModelChange(File file,
-            long modelUpdateTime) {
-        if (file.isDirectory()) {
-            for (File child : file.listFiles()) {
-                if (isSourceFileUpdatedBeforeModelChange(child, modelUpdateTime)) {
-                    return true;
-                }
-            }
-            return false;
-        }
-        return file.lastModified() < modelUpdateTime;
-    }
-
-    public String getProviderConfigDirectory() {
-        return providerConfigDirectory;
-    }
-
-    public void setProviderConfigDirectory(String providerConfigDirectory) {
-        this.providerConfigDirectory = providerConfigDirectory;
-    }
-
-    public boolean isDebug() {
-        return debug;
-    }
-
-    public void setDebug(boolean debug) {
-        this.debug = debug;
-    }
-
-    public String getSrcGenPath() {
-        return srcGenPath;
-    }
-
-    public void setSrcGenPath(String srcGenPath) {
-        this.srcGenPath = srcGenPath;
-    }
+  public void setSrcGenPath(String srcGenPath) {
+    this.srcGenPath = srcGenPath;
+  }
 }
--- a/src/org/openbravo/base/gen/ModelProviderComponent.java	Sun Feb 01 21:40:15 2009 +0000
+++ b/src/org/openbravo/base/gen/ModelProviderComponent.java	Mon Feb 02 06:26:05 2009 +0000
@@ -29,43 +29,42 @@
 import org.openbravo.base.session.OBPropertiesProvider;
 
 /**
- * Sets the model in the work flow context, so that the generator can pick it up
- * from there.
+ * Sets the model in the work flow context, so that the generator can pick it up from there.
  * 
  * @author mtaal
  */
 
 public class ModelProviderComponent implements WorkflowComponent {
 
-    private String propFile;
+  private String propFile;
 
-    public void checkConfiguration(Issues arg0) {
-    }
+  public void checkConfiguration(Issues arg0) {
+  }
 
-    public CompositeComponent getContainer() {
-        return null;
-    }
+  public CompositeComponent getContainer() {
+    return null;
+  }
 
-    public Location getLocation() {
-        return null;
-    }
+  public Location getLocation() {
+    return null;
+  }
 
-    public void invoke(WorkflowContext wc, ProgressMonitor pm, Issues issues) {
-        wc.set("model", ModelProvider.getInstance());
-    }
+  public void invoke(WorkflowContext wc, ProgressMonitor pm, Issues issues) {
+    wc.set("model", ModelProvider.getInstance());
+  }
 
-    public void setContainer(CompositeComponent arg0) {
-    }
+  public void setContainer(CompositeComponent arg0) {
+  }
 
-    public void setLocation(Location arg0) {
-    }
+  public void setLocation(Location arg0) {
+  }
 
-    public void setPropFile(String propFile) {
-        OBPropertiesProvider.getInstance().setProperties(propFile);
-        this.propFile = propFile;
-    }
+  public void setPropFile(String propFile) {
+    OBPropertiesProvider.getInstance().setProperties(propFile);
+    this.propFile = propFile;
+  }
 
-    public String getPropFile() {
-        return propFile;
-    }
+  public String getPropFile() {
+    return propFile;
+  }
 }
--- a/src/org/openbravo/base/gen/OBJavaBeautifier.java	Sun Feb 01 21:40:15 2009 +0000
+++ b/src/org/openbravo/base/gen/OBJavaBeautifier.java	Mon Feb 02 06:26:05 2009 +0000
@@ -25,34 +25,33 @@
 import org.hybridlabs.source.formatter.JavaImportBeautifier;
 
 /**
- * Sets the user.home system variable to the source.path/temp directory. This so
- * that the hybridlabs beautifier creates its preferences directory in the
- * correct location.
+ * Sets the user.home system variable to the source.path/temp directory. This so that the hybridlabs
+ * beautifier creates its preferences directory in the correct location.
  * 
  * @author Martin Taal
  */
 
 public class OBJavaBeautifier extends JavaImportBeautifier {
 
-    @Override
-    public void beautify(CharacterSequence characterSequence) {
-        final String userHome = System.getProperty("user.home");
-        // final String sourcePath = OBPropertiesProvider.getInstance()
-        // .getOpenbravoProperties().getProperty("source.path");
-        // Check.isNotNull(sourcePath,
-        // "The source.path parameter is not defined "
-        // + "in Openbravo.properties");
-        final String sourcePath = GenerateEntitiesTask.getBasePath();
-        final File tempDir = new File(sourcePath, "../temp");
-        if (!tempDir.exists()) {
-            tempDir.mkdirs();
-        }
-        try {
-            System.setProperty("user.home", tempDir.getAbsolutePath());
-            super.beautify(characterSequence);
-        } finally {
-            System.setProperty("user.home", userHome);
-        }
+  @Override
+  public void beautify(CharacterSequence characterSequence) {
+    final String userHome = System.getProperty("user.home");
+    // final String sourcePath = OBPropertiesProvider.getInstance()
+    // .getOpenbravoProperties().getProperty("source.path");
+    // Check.isNotNull(sourcePath,
+    // "The source.path parameter is not defined "
+    // + "in Openbravo.properties");
+    final String sourcePath = GenerateEntitiesTask.getBasePath();
+    final File tempDir = new File(sourcePath, "../temp");
+    if (!tempDir.exists()) {
+      tempDir.mkdirs();
     }
+    try {
+      System.setProperty("user.home", tempDir.getAbsolutePath());
+      super.beautify(characterSequence);
+    } finally {
+      System.setProperty("user.home", userHome);
+    }
+  }
 
 }
--- a/src/org/openbravo/base/model/AccessLevel.java	Sun Feb 01 21:40:15 2009 +0000
+++ b/src/org/openbravo/base/model/AccessLevel.java	Mon Feb 02 06:26:05 2009 +0000
@@ -25,5 +25,5 @@
  * @author Martin Taal
  */
 public enum AccessLevel {
-    SYSTEM, CLIENT, ORGANIZATION, CLIENT_ORGANIZATION, SYSTEM_CLIENT, ALL
+  SYSTEM, CLIENT, ORGANIZATION, CLIENT_ORGANIZATION, SYSTEM_CLIENT, ALL
 }
--- a/src/org/openbravo/base/model/BaseOBObjectDef.java	Sun Feb 01 21:40:15 2009 +0000
+++ b/src/org/openbravo/base/model/BaseOBObjectDef.java	Mon Feb 02 06:26:05 2009 +0000
@@ -20,23 +20,22 @@
 package org.openbravo.base.model;
 
 /**
- * Defines the BaseOBObject interface, this interface has been introduced to
- * prevent cyclic references between generated code and model code which is used
- * by the generator. This interface only contains the minimally required methods
- * to prevent this cycle.
+ * Defines the BaseOBObject interface, this interface has been introduced to prevent cyclic
+ * references between generated code and model code which is used by the generator. This interface
+ * only contains the minimally required methods to prevent this cycle.
  * 
  * @author mtaal
  */
 
 public interface BaseOBObjectDef {
 
-    public Object get(String propertyName);
+  public Object get(String propertyName);
 
-    public void set(String propertyName, Object value);
+  public void set(String propertyName, Object value);
 
-    public Entity getEntity();
+  public Entity getEntity();
 
-    public Object getId();
+  public Object getId();
 
-    public String getIdentifier();
+  public String getIdentifier();
 }
\ No newline at end of file
--- a/src/org/openbravo/base/model/Column.java	Sun Feb 01 21:40:15 2009 +0000
+++ b/src/org/openbravo/base/model/Column.java	Mon Feb 02 06:26:05 2009 +0000
@@ -25,373 +25,364 @@
 import org.apache.log4j.Logger;
 
 /**
- * Used by the {@link ModelProvider ModelProvider}, maps the AD_Column table in
- * the application dictionary.
+ * Used by the {@link ModelProvider ModelProvider}, maps the AD_Column table in the application
+ * dictionary.
  * 
  * @author iperdomo
  * @author mtaal
  */
 
 public class Column extends ModelObject {
-    private static final Logger log = Logger.getLogger(Column.class);
+  private static final Logger log = Logger.getLogger(Column.class);
 
-    private Property property;
-    private String columnName;
-    private Table table;
-    private Reference reference;
-    private Reference referenceValue;
-    private Column referenceType = null;
-    private int fieldLength;
-    private String defaultValue;
-    private boolean key;
-    private boolean secondaryKey;
-    private boolean parent;
-    private boolean mandatory;
-    private boolean updatable;
-    private boolean identifier;
-    private String valueMin;
-    private String valueMax;
-    private String developmentStatus;
-    private Boolean isTransient;
-    private String isTransientCondition;
-    private Integer position;
+  private Property property;
+  private String columnName;
+  private Table table;
+  private Reference reference;
+  private Reference referenceValue;
+  private Column referenceType = null;
+  private int fieldLength;
+  private String defaultValue;
+  private boolean key;
+  private boolean secondaryKey;
+  private boolean parent;
+  private boolean mandatory;
+  private boolean updatable;
+  private boolean identifier;
+  private String valueMin;
+  private String valueMax;
+  private String developmentStatus;
+  private Boolean isTransient;
+  private String isTransientCondition;
+  private Integer position;
 
-    private Module module;
+  private Module module;
 
-    public boolean isBoolean() {
-	return isPrimitiveType()
-		&& (getPrimitiveType().getName().compareTo("boolean") == 0 || Boolean.class == getPrimitiveType());
+  public boolean isBoolean() {
+    return isPrimitiveType()
+        && (getPrimitiveType().getName().compareTo("boolean") == 0 || Boolean.class == getPrimitiveType());
+  }
+
+  public String getColumnName() {
+    return columnName;
+  }
+
+  public void setColumnName(String columnName) {
+    this.columnName = columnName;
+  }
+
+  public Table getTable() {
+    return table;
+  }
+
+  public void setTable(Table table) {
+    this.table = table;
+  }
+
+  public Reference getReference() {
+    return reference;
+  }
+
+  public void setReference(Reference reference) {
+    this.reference = reference;
+  }
+
+  public Reference getReferenceValue() {
+    return referenceValue;
+  }
+
+  public void setReferenceValue(Reference referenceValue) {
+    this.referenceValue = referenceValue;
+  }
+
+  public int getFieldLength() {
+    return fieldLength;
+  }
+
+  public void setFieldLength(int fieldLength) {
+    this.fieldLength = fieldLength;
+  }
+
+  public String getDefaultValue() {
+    return defaultValue;
+  }
+
+  public void setDefaultValue(String defaultValue) {
+    this.defaultValue = defaultValue;
+  }
+
+  public boolean isKey() {
+    return key;
+  }
+
+  public void setKey(Boolean key) {
+    this.key = key;
+  }
+
+  public boolean isSecondaryKey() {
+    return secondaryKey;
+  }
+
+  public void setSecondaryKey(boolean secondaryKey) {
+    this.secondaryKey = secondaryKey;
+  }
+
+  public boolean isParent() {
+    return parent;
+  }
+
+  public void setParent(Boolean parent) {
+    this.parent = parent;
+  }
+
+  public boolean isMandatory() {
+    return mandatory;
+  }
+
+  public void setMandatory(Boolean mandatory) {
+    this.mandatory = mandatory;
+  }
+
+  public boolean isUpdatable() {
+    return updatable;
+  }
+
+  public void setUpdatable(Boolean updatable) {
+    this.updatable = updatable;
+  }
+
+  public boolean isIdentifier() {
+    return identifier;
+  }
+
+  public void setIdentifier(Boolean identifier) {
+    this.identifier = identifier;
+  }
+
+  public String getValueMin() {
+    return valueMin;
+  }
+
+  public void setValueMin(String valueMin) {
+    this.valueMin = valueMin;
+  }
+
+  public String getValueMax() {
+    return valueMax;
+  }
+
+  public void setValueMax(String valueMax) {
+    this.valueMax = valueMax;
+  }
+
+  public String getDevelopmentStatus() {
+    return developmentStatus;
+  }
+
+  public void setDevelopmentStatus(String developmentStatus) {
+    this.developmentStatus = developmentStatus;
+  }
+
+  public boolean isPrimitiveType() {
+    if (!reference.getId().equals(Reference.TABLE) && !reference.getId().equals(Reference.TABLEDIR)
+        && !reference.getId().equals(Reference.SEARCH)
+        && !reference.getId().equals(Reference.IMAGE)
+        && !reference.getId().equals(Reference.PRODUCT_ATTRIBUTE)
+        && !reference.getId().equals(Reference.RESOURCE_ASSIGNMENT))
+      return true;
+    return false;
+  }
+
+  @SuppressWarnings("unchecked")
+  public Class getPrimitiveType() {
+    if (isPrimitiveType()) {
+      final Class<?> clz = Reference.getPrimitiveType(reference.getId());
+      if (clz == Boolean.class && getReferenceValue() != null) {
+        // a string list
+        return String.class;
+      }
+      return clz;
+    }
+    return null;
+  }
+
+  public Column getReferenceType() {
+    if (!isPrimitiveType())
+      return referenceType;
+    return null;
+  }
+
+  public void setReferenceType(Column column) {
+    this.referenceType = column;
+  }
+
+  @Override
+  public boolean isActive() {
+    if (super.isActive() && !isPrimitiveType()) {
+      final Column thatColumn = getReferenceType();
+
+      if (thatColumn != null
+          && (!thatColumn.isActive() || !thatColumn.getTable().isActive() || thatColumn.getTable()
+              .isView())) {
+        log.error("Column " + this + " refers to a non active table or column or to a view"
+            + thatColumn);
+      }
+    }
+    return super.isActive();
+  }
+
+  protected void setReferenceType(ModelProvider modelProvider) {
+
+    // reference type does not need to be set
+    if (isPrimitiveType()) {
+      return;
     }
 
-    public String getColumnName() {
-	return columnName;
+    try {
+      final String referenceId = reference.getId();
+      final String referenceValueId = (referenceValue != null ? referenceValue.getId()
+          : Reference.NO_REFERENCE);
+      final char validationType = (referenceValue != null ? referenceValue.getValidationType()
+          : reference.getValidationType());
+      final Column c = modelProvider.getColumnByReference(referenceId, referenceValueId,
+          validationType, getColumnName());
+      if (c != null)
+        setReferenceType(c);
+    } catch (final Exception e) {
+      System.out.println("Error >> tableName: " + table.getTableName() + " - columnName: "
+          + getColumnName());
+      e.printStackTrace();
     }
+  }
 
-    public void setColumnName(String columnName) {
-	this.columnName = columnName;
+  // returns the primitive type name or the class of the
+  // referenced type
+  public String getTypeName() {
+    final String typeName;
+    if (isPrimitiveType()) {
+      typeName = getPrimitiveType().getName();
+    } else if (getReferenceType() == null) {
+      log.warn("ERROR NO REFERENCETYPE " + getTable().getName() + "." + getColumnName());
+      return "java.lang.Object";
+    } else {
+      typeName = getReferenceType().getTable().getNotNullClassName();
     }
+    return typeName;
+  }
 
-    public Table getTable() {
-	return table;
+  // the last part of the class name
+  public String getSimpleTypeName() {
+    final String typeName = getTypeName();
+    if (typeName.indexOf(".") == -1) {
+      return typeName;
     }
+    return typeName.substring(1 + typeName.lastIndexOf("."));
+  }
 
-    public void setTable(Table table) {
-	this.table = table;
+  /**
+   * Returns the classname of the object which maps to the type of this column. For example if this
+   * column is an int then this method will return java.lang.Integer (the object version of the
+   * int).
+   * 
+   * @return the name of the class of the type of this column
+   */
+  public String getObjectTypeName() {
+    if (isPrimitiveType()) {
+      final String typeName = getTypeName();
+      if (typeName.indexOf('.') != -1) {
+        return typeName;
+      }
+      if ("boolean".equals(typeName)) {
+        return Boolean.class.getName();
+      }
+      if ("int".equals(typeName)) {
+        return Integer.class.getName();
+      }
+      if ("long".equals(typeName)) {
+        return Long.class.getName();
+      }
+      if ("byte".equals(typeName)) {
+        return Byte.class.getName();
+      }
+      if ("float".equals(typeName)) {
+        return Float.class.getName();
+      }
+      if ("double".equals(typeName)) {
+        return Double.class.getName();
+      }
+      // TODO: maybe throw an exception
+      return typeName;
+    } else {
+      return getTypeName();
     }
+  }
 
-    public Reference getReference() {
-	return reference;
+  public Property getProperty() {
+    return property;
+  }
+
+  public void setProperty(Property property) {
+    this.property = property;
+  }
+
+  /**
+   * Returns the concatenation of the table and column name.
+   */
+  @Override
+  public String toString() {
+    return getTable() + "." + getColumnName();
+  }
+
+  /**
+   * Is used when this column denotes an enum. This method returns all allowed String values.
+   * 
+   * @return the set of allowed values for this Column.
+   */
+  @SuppressWarnings("unchecked")
+  public Set<String> getAllowedValues() {
+    // TODO: discrepancy with the application dictionary, solve this later
+    if (getColumnName().equalsIgnoreCase("changeprojectstatus")) {
+      return Collections.EMPTY_SET;
     }
+    if (getReferenceValue() != null) {
+      return getReferenceValue().getAllowedValues();
+    }
+    return Collections.EMPTY_SET;
+  }
 
-    public void setReference(Reference reference) {
-	this.reference = reference;
+  public Boolean isTransient() {
+    return isTransient;
+  }
+
+  public void setTransient(Boolean isTransient) {
+    if (isTransient == null) {
+      this.isTransient = new Boolean(false);
+    } else {
+      this.isTransient = isTransient;
     }
+  }
 
-    public Reference getReferenceValue() {
-	return referenceValue;
-    }
+  public String getIsTransientCondition() {
+    return isTransientCondition;
+  }
 
-    public void setReferenceValue(Reference referenceValue) {
-	this.referenceValue = referenceValue;
-    }
+  public void setIsTransientCondition(String isTransientCondition) {
+    this.isTransientCondition = isTransientCondition;
+  }
 
-    public int getFieldLength() {
-	return fieldLength;
-    }
+  public Integer getPosition() {
+    return position;
+  }
 
-    public void setFieldLength(int fieldLength) {
-	this.fieldLength = fieldLength;
-    }
+  public void setPosition(Integer position) {
+    this.position = position;
+  }
 
-    public String getDefaultValue() {
-	return defaultValue;
-    }
+  public Module getModule() {
+    return module;
+  }
 
-    public void setDefaultValue(String defaultValue) {
-	this.defaultValue = defaultValue;
-    }
-
-    public boolean isKey() {
-	return key;
-    }
-
-    public void setKey(Boolean key) {
-	this.key = key;
-    }
-
-    public boolean isSecondaryKey() {
-	return secondaryKey;
-    }
-
-    public void setSecondaryKey(boolean secondaryKey) {
-	this.secondaryKey = secondaryKey;
-    }
-
-    public boolean isParent() {
-	return parent;
-    }
-
-    public void setParent(Boolean parent) {
-	this.parent = parent;
-    }
-
-    public boolean isMandatory() {
-	return mandatory;
-    }
-
-    public void setMandatory(Boolean mandatory) {
-	this.mandatory = mandatory;
-    }
-
-    public boolean isUpdatable() {
-	return updatable;
-    }
-
-    public void setUpdatable(Boolean updatable) {
-	this.updatable = updatable;
-    }
-
-    public boolean isIdentifier() {
-	return identifier;
-    }
-
-    public void setIdentifier(Boolean identifier) {
-	this.identifier = identifier;
-    }
-
-    public String getValueMin() {
-	return valueMin;
-    }
-
-    public void setValueMin(String valueMin) {
-	this.valueMin = valueMin;
-    }
-
-    public String getValueMax() {
-	return valueMax;
-    }
-
-    public void setValueMax(String valueMax) {
-	this.valueMax = valueMax;
-    }
-
-    public String getDevelopmentStatus() {
-	return developmentStatus;
-    }
-
-    public void setDevelopmentStatus(String developmentStatus) {
-	this.developmentStatus = developmentStatus;
-    }
-
-    public boolean isPrimitiveType() {
-	if (!reference.getId().equals(Reference.TABLE)
-		&& !reference.getId().equals(Reference.TABLEDIR)
-		&& !reference.getId().equals(Reference.SEARCH)
-		&& !reference.getId().equals(Reference.IMAGE)
-		&& !reference.getId().equals(Reference.PRODUCT_ATTRIBUTE)
-		&& !reference.getId().equals(Reference.RESOURCE_ASSIGNMENT))
-	    return true;
-	return false;
-    }
-
-    @SuppressWarnings("unchecked")
-    public Class getPrimitiveType() {
-	if (isPrimitiveType()) {
-	    final Class<?> clz = Reference.getPrimitiveType(reference.getId());
-	    if (clz == Boolean.class && getReferenceValue() != null) {
-		// a string list
-		return String.class;
-	    }
-	    return clz;
-	}
-	return null;
-    }
-
-    public Column getReferenceType() {
-	if (!isPrimitiveType())
-	    return referenceType;
-	return null;
-    }
-
-    public void setReferenceType(Column column) {
-	this.referenceType = column;
-    }
-
-    @Override
-    public boolean isActive() {
-	if (super.isActive() && !isPrimitiveType()) {
-	    final Column thatColumn = getReferenceType();
-
-	    if (thatColumn != null
-		    && (!thatColumn.isActive()
-			    || !thatColumn.getTable().isActive() || thatColumn
-			    .getTable().isView())) {
-		log
-			.error("Column "
-				+ this
-				+ " refers to a non active table or column or to a view"
-				+ thatColumn);
-	    }
-	}
-	return super.isActive();
-    }
-
-    protected void setReferenceType(ModelProvider modelProvider) {
-
-	// reference type does not need to be set
-	if (isPrimitiveType()) {
-	    return;
-	}
-
-	try {
-	    final String referenceId = reference.getId();
-	    final String referenceValueId = (referenceValue != null ? referenceValue
-		    .getId()
-		    : Reference.NO_REFERENCE);
-	    final char validationType = (referenceValue != null ? referenceValue
-		    .getValidationType()
-		    : reference.getValidationType());
-	    final Column c = modelProvider.getColumnByReference(referenceId,
-		    referenceValueId, validationType, getColumnName());
-	    if (c != null)
-		setReferenceType(c);
-	} catch (final Exception e) {
-	    System.out.println("Error >> tableName: " + table.getTableName()
-		    + " - columnName: " + getColumnName());
-	    e.printStackTrace();
-	}
-    }
-
-    // returns the primitive type name or the class of the
-    // referenced type
-    public String getTypeName() {
-	final String typeName;
-	if (isPrimitiveType()) {
-	    typeName = getPrimitiveType().getName();
-	} else if (getReferenceType() == null) {
-	    log.warn("ERROR NO REFERENCETYPE " + getTable().getName() + "."
-		    + getColumnName());
-	    return "java.lang.Object";
-	} else {
-	    typeName = getReferenceType().getTable().getNotNullClassName();
-	}
-	return typeName;
-    }
-
-    // the last part of the class name
-    public String getSimpleTypeName() {
-	final String typeName = getTypeName();
-	if (typeName.indexOf(".") == -1) {
-	    return typeName;
-	}
-	return typeName.substring(1 + typeName.lastIndexOf("."));
-    }
-
-    /**
-     * Returns the classname of the object which maps to the type of this
-     * column. For example if this column is an int then this method will return
-     * java.lang.Integer (the object version of the int).
-     * 
-     * @return the name of the class of the type of this column
-     */
-    public String getObjectTypeName() {
-	if (isPrimitiveType()) {
-	    final String typeName = getTypeName();
-	    if (typeName.indexOf('.') != -1) {
-		return typeName;
-	    }
-	    if ("boolean".equals(typeName)) {
-		return Boolean.class.getName();
-	    }
-	    if ("int".equals(typeName)) {
-		return Integer.class.getName();
-	    }
-	    if ("long".equals(typeName)) {
-		return Long.class.getName();
-	    }
-	    if ("byte".equals(typeName)) {
-		return Byte.class.getName();
-	    }
-	    if ("float".equals(typeName)) {
-		return Float.class.getName();
-	    }
-	    if ("double".equals(typeName)) {
-		return Double.class.getName();
-	    }
-	    // TODO: maybe throw an exception
-	    return typeName;
-	} else {
-	    return getTypeName();
-	}
-    }
-
-    public Property getProperty() {
-	return property;
-    }
-
-    public void setProperty(Property property) {
-	this.property = property;
-    }
-
-    /**
-     * Returns the concatenation of the table and column name.
-     */
-    @Override
-    public String toString() {
-	return getTable() + "." + getColumnName();
-    }
-
-    /**
-     * Is used when this column denotes an enum. This method returns all allowed
-     * String values.
-     * 
-     * @return the set of allowed values for this Column.
-     */
-    @SuppressWarnings("unchecked")
-    public Set<String> getAllowedValues() {
-	// TODO: discrepancy with the application dictionary, solve this later
-	if (getColumnName().equalsIgnoreCase("changeprojectstatus")) {
-	    return Collections.EMPTY_SET;
-	}
-	if (getReferenceValue() != null) {
-	    return getReferenceValue().getAllowedValues();
-	}
-	return Collections.EMPTY_SET;
-    }
-
-    public Boolean isTransient() {
-	return isTransient;
-    }
-
-    public void setTransient(Boolean isTransient) {
-	if (isTransient == null) {
-	    this.isTransient = new Boolean(false);
-	} else {
-	    this.isTransient = isTransient;
-	}
-    }
-
-    public String getIsTransientCondition() {
-	return isTransientCondition;
-    }
-
-    public void setIsTransientCondition(String isTransientCondition) {
-	this.isTransientCondition = isTransientCondition;
-    }
-
-    public Integer getPosition() {
-	return position;
-    }
-
-    public void setPosition(Integer position) {
-	this.position = position;
-    }
-
-    public Module getModule() {
-	return module;
-    }
-
-    public void setModule(Module module) {
-	this.module = module;
-    }
+  public void setModule(Module module) {
+    this.module = module;
+  }
 }
--- a/src/org/openbravo/base/model/Entity.java	Sun Feb 01 21:40:15 2009 +0000
+++ b/src/org/openbravo/base/model/Entity.java	Mon Feb 02 06:26:05 2009 +0000
@@ -35,10 +35,9 @@
 import org.openbravo.base.validation.PropertyValidator;
 
 /**
- * Models the business object type. The Entity is the main concept in the
- * in-memory model. An entity corresponds to a {@link Table} in the database. An
- * Entity has properties which are primitive typed, references or lists of child
- * entities.
+ * Models the business object type. The Entity is the main concept in the in-memory model. An entity
+ * corresponds to a {@link Table} in the database. An Entity has properties which are primitive
+ * typed, references or lists of child entities.
  * 
  * @see Property
  * @see ModelProvider
@@ -48,533 +47,516 @@
  */
 
 public class Entity {
-    private static final Logger log = Logger.getLogger(Entity.class);
+  private static final Logger log = Logger.getLogger(Entity.class);
 
-    private List<UniqueConstraint> uniqueConstraints = new ArrayList<UniqueConstraint>();
+  private List<UniqueConstraint> uniqueConstraints = new ArrayList<UniqueConstraint>();
 
-    private List<Property> properties;
-    private Map<String, Property> propertiesByName;
-    private Map<String, Property> propertiesByColumnName;
-    private List<Property> idProperties;
-    private List<Property> identifierProperties;
-    private List<Property> parentProperties;
-    private List<Property> orderByProperties;
+  private List<Property> properties;
+  private Map<String, Property> propertiesByName;
+  private Map<String, Property> propertiesByColumnName;
+  private List<Property> idProperties;
+  private List<Property> identifierProperties;
+  private List<Property> parentProperties;
+  private List<Property> orderByProperties;
 
-    private String name = null;
-    private String tableName;
-    private String tableId;
-    private Class<?> mappingClass = null;
-    private boolean mappingClassComputed = false;
-    private String className;
+  private String name = null;
+  private String tableName;
+  private String tableId;
+  private Class<?> mappingClass = null;
+  private boolean mappingClassComputed = false;
+  private String className;
 
-    private boolean isInActive;
+  private boolean isInActive;
 
-    private boolean isTraceable;
-    private boolean isActiveEnabled;
-    private boolean isOrganizationEnabled;
-    // some views have this:
-    private boolean isOrganizationPartOfKey;
-    private boolean isClientEnabled;
-    private boolean isMutable;
-    private boolean isDeletable;
+  private boolean isTraceable;
+  private boolean isActiveEnabled;
+  private boolean isOrganizationEnabled;
+  // some views have this:
+  private boolean isOrganizationPartOfKey;
+  private boolean isClientEnabled;
+  private boolean isMutable;
+  private boolean isDeletable;
 
-    private EntityValidator entityValidator;
-    private AccessLevelChecker accessLevelChecker;
-    private AccessLevel accessLevel;
+  private EntityValidator entityValidator;
+  private AccessLevelChecker accessLevelChecker;
+  private AccessLevel accessLevel;
 
-    private Module module;
+  private Module module;
 
-    /**
-     * Initializes the entity from a table, also creates the properties from the
-     * list of Columns of the table.
-     * 
-     * @param table
-     *            the table used to initialize the Entity
-     */
-    public void initialize(Table table) {
-	table.setEntity(this);
-	setTableName(table.getTableName());
-	setTableId(table.getId());
-	setClassName(table.getPackageName() + "." + table.getNotNullClassName());
-	setName(table.getName());
-	setDeletable(table.isDeletable());
-	setMutable(!table.isView());
-	setInActive(!table.isActive());
+  /**
+   * Initializes the entity from a table, also creates the properties from the list of Columns of
+   * the table.
+   * 
+   * @param table
+   *          the table used to initialize the Entity
+   */
+  public void initialize(Table table) {
+    table.setEntity(this);
+    setTableName(table.getTableName());
+    setTableId(table.getId());
+    setClassName(table.getPackageName() + "." + table.getNotNullClassName());
+    setName(table.getName());
+    setDeletable(table.isDeletable());
+    setMutable(!table.isView());
+    setInActive(!table.isActive());
 
-	properties = new ArrayList<Property>();
-	idProperties = new ArrayList<Property>();
-	identifierProperties = new ArrayList<Property>();
-	parentProperties = new ArrayList<Property>();
-	orderByProperties = new ArrayList<Property>();
-	// + 5 to take into account some additional properties for onetomany
-	// and such
-	propertiesByName = new HashMap<String, Property>(table.getColumns()
-		.size() + 5);
-	propertiesByColumnName = new HashMap<String, Property>(table
-		.getColumns().size() + 5);
+    properties = new ArrayList<Property>();
+    idProperties = new ArrayList<Property>();
+    identifierProperties = new ArrayList<Property>();
+    parentProperties = new ArrayList<Property>();
+    orderByProperties = new ArrayList<Property>();
+    // + 5 to take into account some additional properties for onetomany
+    // and such
+    propertiesByName = new HashMap<String, Property>(table.getColumns().size() + 5);
+    propertiesByColumnName = new HashMap<String, Property>(table.getColumns().size() + 5);
 
-	for (final Column c : table.getColumns()) {
+    for (final Column c : table.getColumns()) {
 
-	    final Property p = new Property();
-	    p.setEntity(this);
-	    p.initializeFromColumn(c);
-	    properties.add(p);
-	    propertiesByName.put(p.getName(), p);
-	    if (p.getColumnName() != null) {
-		propertiesByColumnName.put(p.getColumnName().toLowerCase(), p);
-	    }
-	    if (p.isId()) {
-		idProperties.add(p);
-	    }
-	    if (p.isIdentifier()) {
-		identifierProperties.add(p);
-	    }
-	    if (p.isParent()) {
-		parentProperties.add(p);
-	    }
-	    if (p.isOrderByProperty())
-		orderByProperties.add(p);
-	}
-
-	entityValidator = new EntityValidator();
-	entityValidator.setEntity(this);
-	entityValidator.initialize();
-
-	if (table.getAccessLevel().equals("1")) {
-	    accessLevelChecker = AccessLevelChecker.ORGANIZATION;
-	    setAccessLevel(AccessLevel.ORGANIZATION);
-	} else if (table.getAccessLevel().equals("3")) {
-	    accessLevelChecker = AccessLevelChecker.CLIENT_ORGANIZATION;
-	    setAccessLevel(AccessLevel.CLIENT_ORGANIZATION);
-	} else if (table.getAccessLevel().equals("4")) {
-	    setAccessLevel(AccessLevel.SYSTEM);
-	    accessLevelChecker = AccessLevelChecker.SYSTEM;
-	} else if (table.getAccessLevel().equals("6")) {
-	    accessLevelChecker = AccessLevelChecker.SYSTEM_CLIENT;
-	    setAccessLevel(AccessLevel.SYSTEM_CLIENT);
-	} else if (table.getAccessLevel().equals("7")) {
-	    accessLevelChecker = AccessLevelChecker.ALL;
-	    setAccessLevel(AccessLevel.ALL);
-	} else {
-	    Check.fail("Access level " + table.getAccessLevel() + " for table "
-		    + table.getName() + " is not supported");
-	}
-
-	setModule(table.getThePackage().getModule());
+      final Property p = new Property();
+      p.setEntity(this);
+      p.initializeFromColumn(c);
+      properties.add(p);
+      propertiesByName.put(p.getName(), p);
+      if (p.getColumnName() != null) {
+        propertiesByColumnName.put(p.getColumnName().toLowerCase(), p);
+      }
+      if (p.isId()) {
+        idProperties.add(p);
+      }
+      if (p.isIdentifier()) {
+        identifierProperties.add(p);
+      }
+      if (p.isParent()) {
+        parentProperties.add(p);
+      }
+      if (p.isOrderByProperty())
+        orderByProperties.add(p);
     }
 
-    /**
-     * Add a property to the internal arrays of properties (common, identifier,
-     * etc.)
-     * 
-     * @param property
-     *            the Property to add
-     */
-    public void addProperty(Property property) {
-	getProperties().add(property);
-	if (property.getColumnName() != null) {
-	    propertiesByColumnName.put(property.getColumnName().toLowerCase(),
-		    property);
-	}
-	if (property.isIdentifier()) {
-	    getIdentifierProperties().add(property);
-	}
-	if (property.isId()) {
-	    getIdProperties().add(property);
-	}
+    entityValidator = new EntityValidator();
+    entityValidator.setEntity(this);
+    entityValidator.initialize();
+
+    if (table.getAccessLevel().equals("1")) {
+      accessLevelChecker = AccessLevelChecker.ORGANIZATION;
+      setAccessLevel(AccessLevel.ORGANIZATION);
+    } else if (table.getAccessLevel().equals("3")) {
+      accessLevelChecker = AccessLevelChecker.CLIENT_ORGANIZATION;
+      setAccessLevel(AccessLevel.CLIENT_ORGANIZATION);
+    } else if (table.getAccessLevel().equals("4")) {
+      setAccessLevel(AccessLevel.SYSTEM);
+      accessLevelChecker = AccessLevelChecker.SYSTEM;
+    } else if (table.getAccessLevel().equals("6")) {
+      accessLevelChecker = AccessLevelChecker.SYSTEM_CLIENT;
+      setAccessLevel(AccessLevel.SYSTEM_CLIENT);
+    } else if (table.getAccessLevel().equals("7")) {
+      accessLevelChecker = AccessLevelChecker.ALL;
+      setAccessLevel(AccessLevel.ALL);
+    } else {
+      Check.fail("Access level " + table.getAccessLevel() + " for table " + table.getName()
+          + " is not supported");
     }
 
-    public List<UniqueConstraint> getUniqueConstraints() {
-	return uniqueConstraints;
+    setModule(table.getThePackage().getModule());
+  }
+
+  /**
+   * Add a property to the internal arrays of properties (common, identifier, etc.)
+   * 
+   * @param property
+   *          the Property to add
+   */
+  public void addProperty(Property property) {
+    getProperties().add(property);
+    if (property.getColumnName() != null) {
+      propertiesByColumnName.put(property.getColumnName().toLowerCase(), property);
     }
+    if (property.isIdentifier()) {
+      getIdentifierProperties().add(property);
+    }
+    if (property.isId()) {
+      getIdProperties().add(property);
+    }
+  }
 
-    /**
-     * Checks if the {@link #getAccessLevel() accessLevel} of the entity is
-     * valid for the clientId and orgId passed as parameters. Throws an
-     * OBSecurityException if the clientId and/or orgId are not valid.
-     * 
-     * @param clientId
-     *            the clientId which is checked against the accessLevel
-     * @param orgId
-     * @throws OBSecurityException
-     * @see AccessLevelChecker
-     */
-    public void checkAccessLevel(String clientId, String orgId) {
-	accessLevelChecker.checkAccessLevel(getName(), clientId, orgId);
+  public List<UniqueConstraint> getUniqueConstraints() {
+    return uniqueConstraints;
+  }
+
+  /**
+   * Checks if the {@link #getAccessLevel() accessLevel} of the entity is valid for the clientId and
+   * orgId passed as parameters. Throws an OBSecurityException if the clientId and/or orgId are not
+   * valid.
+   * 
+   * @param clientId
+   *          the clientId which is checked against the accessLevel
+   * @param orgId
+   * @throws OBSecurityException
+   * @see AccessLevelChecker
+   */
+  public void checkAccessLevel(String clientId, String orgId) {
+    accessLevelChecker.checkAccessLevel(getName(), clientId, orgId);
+  }
+
+  /**
+   * Validates the passed object using the property validators of this Entity.
+   * 
+   * @param o
+   *          the object to validate
+   * @see EntityValidator
+   * @see PropertyValidator
+   */
+  public void validate(Object obj) {
+    entityValidator.validate(obj);
+  }
+
+  public String getName() {
+    return name;
+  }
+
+  public void setName(String name) {
+    this.name = name;
+  }
+
+  public String getClassName() {
+    return className;
+  }
+
+  protected void setClassName(String className) {
+    this.className = className;
+  }
+
+  /**
+   * Loads the class using the {@link #getClassName()} . If this fails then the null is returned and
+   * the system will use a DynamicOBObject as the runtime class.
+   * 
+   * @return the java class implementing this Entity, or null if the class is not available (not
+   *         found)
+   */
+  public Class<?> getMappingClass() {
+    if (mappingClass == null && !mappingClassComputed) {
+      try {
+        // the context class loader is the safest one
+        mappingClass = OBClassLoader.getInstance().loadClass(getClassName());
+      } catch (final ClassNotFoundException e) {
+        mappingClass = null;
+      }
+      mappingClassComputed = true;
     }
+    return mappingClass;
+  }
 
-    /**
-     * Validates the passed object using the property validators of this Entity.
-     * 
-     * @param o
-     *            the object to validate
-     * @see EntityValidator
-     * @see PropertyValidator
-     */
-    public void validate(Object obj) {
-	entityValidator.validate(obj);
+  public void setTraceable(boolean isTraceable) {
+    this.isTraceable = isTraceable;
+  }
+
+  public void setActiveEnabled(boolean isActiveEnabled) {
+    this.isActiveEnabled = isActiveEnabled;
+  }
+
+  public void setOrganizationEnabled(boolean isOrganizationEnabled) {
+    this.isOrganizationEnabled = isOrganizationEnabled;
+  }
+
+  public void setClientEnabled(boolean isClientEnabled) {
+    this.isClientEnabled = isClientEnabled;
+  }
+
+  /**
+   * Returns the list of interfaces implemented by instances of this Entity. It is used by the
+   * entity code generation to determine which interfaces to add to the class definition.
+   * 
+   * @return comma delimited list of interfaces
+   */
+  public String getImplementsStatement() {
+
+    // NOTE not using the direct reference to the class for the interface
+    // names
+    // to prevent binary dependency
+    final StringBuilder sb = new StringBuilder();
+    if (isTraceable()) {
+      sb.append("org.openbravo.base.structure.Traceable");
     }
+    if (isClientEnabled()) {
+      if (sb.length() > 0) {
+        sb.append(", ");
+      }
+      sb.append("org.openbravo.base.structure.ClientEnabled");
+    }
+    if (isOrganizationEnabled()) {
+      if (sb.length() > 0) {
+        sb.append(", ");
+      }
+      sb.append("org.openbravo.base.structure.OrganizationEnabled");
+    }
+    if (isActiveEnabled()) {
+      if (sb.length() > 0) {
+        sb.append(", ");
+      }
+      sb.append("org.openbravo.base.structure.ActiveEnabled");
+    }
+    if (sb.length() == 0) {
+      return "";
+    }
+    return "implements " + sb.toString();
+  }
 
-    public String getName() {
-	return name;
+  /**
+   * Checks if the class has a certain property by name.
+   * 
+   * @param propertyName
+   *          the name used to search for the property
+   * @return returns true if there is a property with this name, false otherwise
+   */
+  // TODO: it is saver to also check for the type!
+  public boolean hasProperty(String propertyName) {
+    return propertiesByName.get(propertyName) != null;
+  }
+
+  /**
+   * Check if there is a property with the name propertyName. If not then a CheckException is
+   * thrown.
+   * 
+   * @param propertyName
+   *          the name used to search for a property
+   * @throws CheckException
+   */
+  public void checkIsValidProperty(String propertyName) {
+    Check.isNotNull(propertiesByName.get(propertyName), "Property " + propertyName
+        + " not defined for entity " + this);
+  }
+
+  /**
+   * Checks if there is a property with the name propName and if so checks that the value is of the
+   * correct type and is valid.
+   * 
+   * @param propName
+   *          the name used to search for the property
+   * @param value
+   *          the value is checked against the constraints for the property (for example length,
+   *          nullable, etc.)
+   * @throws CheckException
+   */
+  public void checkValidPropertyAndValue(String propName, Object value) {
+    Property p;
+    if ((p = propertiesByName.get(propName)) == null) {
+      throw new OBException("Property " + propName + " not defined for entity " + this);
     }
+    p.checkIsValidValue(value);
+  }
 
-    public void setName(String name) {
-	this.name = name;
-    }
+  public void addPropertyByName(Property p) {
+    propertiesByName.put(p.getName(), p);
+  }
 
-    public String getClassName() {
-	return className;
-    }
+  /**
+   * Retrieves the property using the propertyName. Throws a CheckException if no property exists
+   * with that name.
+   * 
+   * @param propertyName
+   *          the name used to search for the property.
+   * @return the found property
+   * @throws CheckException
+   */
+  public Property getProperty(String propertyName) {
+    final Property prop = propertiesByName.get(propertyName);
+    Check.isNotNull(prop, "Property " + propertyName + " does not exist for entity " + this);
+    return prop;
+  }
 
-    protected void setClassName(String className) {
-	this.className = className;
-    }
+  /**
+   * Retrieves the property using the columnName. Throws a CheckException if no property exists with
+   * that columnName.
+   * 
+   * @param columnName
+   *          the name used to search for the property.
+   * @return the found property
+   * @throws CheckException
+   */
+  public Property getPropertyByColumnName(String columnName) {
+    final Property prop = propertiesByColumnName.get(columnName.toLowerCase());
+    Check.isNotNull(prop, "Property with " + columnName + " does not exist for entity " + this);
+    return prop;
+  }
 
-    /**
-     * Loads the class using the {@link #getClassName()} . If this fails then
-     * the null is returned and the system will use a DynamicOBObject as the
-     * runtime class.
-     * 
-     * @return the java class implementing this Entity, or null if the class is
-     *         not available (not found)
-     */
-    public Class<?> getMappingClass() {
-	if (mappingClass == null && !mappingClassComputed) {
-	    try {
-		// the context class loader is the safest one
-		mappingClass = OBClassLoader.getInstance().loadClass(
-			getClassName());
-	    } catch (final ClassNotFoundException e) {
-		mappingClass = null;
-	    }
-	    mappingClassComputed = true;
-	}
-	return mappingClass;
-    }
+  public String getPackageName() {
+    final int lastIndexOf = getClassName().lastIndexOf('.');
+    return getClassName().substring(0, lastIndexOf);
+  }
 
-    public void setTraceable(boolean isTraceable) {
-	this.isTraceable = isTraceable;
-    }
+  /**
+   * Returns the last part of the Class name of the class of this Entity. The last part is the part
+   * after the last dot.
+   * 
+   * @return the last segment of the fully qualified Class name
+   */
+  public String getSimpleClassName() {
+    final int lastIndexOf = getClassName().lastIndexOf('.');
+    return getClassName().substring(1 + lastIndexOf);
+  }
 
-    public void setActiveEnabled(boolean isActiveEnabled) {
-	this.isActiveEnabled = isActiveEnabled;
-    }
+  /**
+   * An Entity is traceable if it has auditInfo fields such as created, createdBy etc.
+   * 
+   * @return true if this Entity has created, createdBy etc. properties.
+   */
+  public boolean isTraceable() {
+    return isTraceable;
+  }
 
-    public void setOrganizationEnabled(boolean isOrganizationEnabled) {
-	this.isOrganizationEnabled = isOrganizationEnabled;
-    }
+  /**
+   * @return true if this Entity has an isActive property.
+   */
+  public boolean isActiveEnabled() {
+    return isActiveEnabled;
+  }
 
-    public void setClientEnabled(boolean isClientEnabled) {
-	this.isClientEnabled = isClientEnabled;
-    }
+  /**
+   * @return true if this Entity has an organization property.
+   */
+  public boolean isOrganizationEnabled() {
+    return isOrganizationEnabled;
+  }
 
-    /**
-     * Returns the list of interfaces implemented by instances of this Entity.
-     * It is used by the entity code generation to determine which interfaces to
-     * add to the class definition.
-     * 
-     * @return comma delimited list of interfaces
-     */
-    public String getImplementsStatement() {
+  /**
+   * @return true if this Entity has a client property.
+   */
+  public boolean isClientEnabled() {
+    return isClientEnabled;
+  }
 
-	// NOTE not using the direct reference to the class for the interface
-	// names
-	// to prevent binary dependency
-	final StringBuilder sb = new StringBuilder();
-	if (isTraceable()) {
-	    sb.append("org.openbravo.base.structure.Traceable");
-	}
-	if (isClientEnabled()) {
-	    if (sb.length() > 0) {
-		sb.append(", ");
-	    }
-	    sb.append("org.openbravo.base.structure.ClientEnabled");
-	}
-	if (isOrganizationEnabled()) {
-	    if (sb.length() > 0) {
-		sb.append(", ");
-	    }
-	    sb.append("org.openbravo.base.structure.OrganizationEnabled");
-	}
-	if (isActiveEnabled()) {
-	    if (sb.length() > 0) {
-		sb.append(", ");
-	    }
-	    sb.append("org.openbravo.base.structure.ActiveEnabled");
-	}
-	if (sb.length() == 0) {
-	    return "";
-	}
-	return "implements " + sb.toString();
-    }
+  public List<Property> getProperties() {
+    return properties;
+  }
 
-    /**
-     * Checks if the class has a certain property by name.
-     * 
-     * @param propertyName
-     *            the name used to search for the property
-     * @return returns true if there is a property with this name, false
-     *         otherwise
-     */
-    // TODO: it is saver to also check for the type!
-    public boolean hasProperty(String propertyName) {
-	return propertiesByName.get(propertyName) != null;
-    }
+  public void setProperties(List<Property> properties) {
+    this.properties = properties;
+  }
 
-    /**
-     * Check if there is a property with the name propertyName. If not then a
-     * CheckException is thrown.
-     * 
-     * @param propertyName
-     *            the name used to search for a property
-     * @throws CheckException
-     */
-    public void checkIsValidProperty(String propertyName) {
-	Check.isNotNull(propertiesByName.get(propertyName), "Property "
-		+ propertyName + " not defined for entity " + this);
-    }
+  /**
+   * @return the properties which make up the identifying string of this Entity
+   */
+  public List<Property> getIdentifierProperties() {
+    return identifierProperties;
+  }
 
-    /**
-     * Checks if there is a property with the name propName and if so checks
-     * that the value is of the correct type and is valid.
-     * 
-     * @param propName
-     *            the name used to search for the property
-     * @param value
-     *            the value is checked against the constraints for the property
-     *            (for example length, nullable, etc.)
-     * @throws CheckException
-     */
-    public void checkValidPropertyAndValue(String propName, Object value) {
-	Property p;
-	if ((p = propertiesByName.get(propName)) == null) {
-	    throw new OBException("Property " + propName
-		    + " not defined for entity " + this);
-	}
-	p.checkIsValidValue(value);
-    }
+  public void setIdentifierProperties(List<Property> identifierProperties) {
+    this.identifierProperties = identifierProperties;
+  }
 
-    public void addPropertyByName(Property p) {
-	propertiesByName.put(p.getName(), p);
-    }
+  /**
+   * Only applies if this Entity is a child of another Entity, for example this is the OrderLine of
+   * an Order.
+   * 
+   * @return the list of properties pointing to the parent, an emptylist if there is no such
+   *         association to a parent
+   */
+  public List<Property> getParentProperties() {
+    return parentProperties;
+  }
 
-    /**
-     * Retrieves the property using the propertyName. Throws a CheckException if
-     * no property exists with that name.
-     * 
-     * @param propertyName
-     *            the name used to search for the property.
-     * @return the found property
-     * @throws CheckException
-     */
-    public Property getProperty(String propertyName) {
-	final Property prop = propertiesByName.get(propertyName);
-	Check.isNotNull(prop, "Property " + propertyName
-		+ " does not exist for entity " + this);
-	return prop;
-    }
+  public void setParentProperties(List<Property> parentProperties) {
+    this.parentProperties = parentProperties;
+  }
 
-    /**
-     * Retrieves the property using the columnName. Throws a CheckException if
-     * no property exists with that columnName.
-     * 
-     * @param columnName
-     *            the name used to search for the property.
-     * @return the found property
-     * @throws CheckException
-     */
-    public Property getPropertyByColumnName(String columnName) {
-	final Property prop = propertiesByColumnName.get(columnName
-		.toLowerCase());
-	Check.isNotNull(prop, "Property with " + columnName
-		+ " does not exist for entity " + this);
-	return prop;
-    }
+  /**
+   * The orderBy properties are used when this Entity is a child of another Entity. For example if
+   * this Entity is the OrderLine with a lineNo property which determines the order of the lines.
+   * Then the lineNo property will be returned as element in the list of this method.
+   * 
+   * @return the properties which can be used to order instances of this Entity
+   */
+  public List<Property> getOrderByProperties() {
+    return this.orderByProperties;
+  }
 
-    public String getPackageName() {
-	final int lastIndexOf = getClassName().lastIndexOf('.');
-	return getClassName().substring(0, lastIndexOf);
-    }
+  public void setOrderByProperties(List<Property> orderByProperties) {
+    this.orderByProperties = orderByProperties;
+  }
 
-    /**
-     * Returns the last part of the Class name of the class of this Entity. The
-     * last part is the part after the last dot.
-     * 
-     * @return the last segment of the fully qualified Class name
-     */
-    public String getSimpleClassName() {
-	final int lastIndexOf = getClassName().lastIndexOf('.');
-	return getClassName().substring(1 + lastIndexOf);
-    }
+  /**
+   * Returns the properties which make up the primary key of this Entity.
+   * 
+   * @return the list of primary key properties
+   */
+  public List<Property> getIdProperties() {
+    return idProperties;
+  }
 
-    /**
-     * An Entity is traceable if it has auditInfo fields such as created,
-     * createdBy etc.
-     * 
-     * @return true if this Entity has created, createdBy etc. properties.
-     */
-    public boolean isTraceable() {
-	return isTraceable;
-    }
+  public void setIdProperties(List<Property> idProperties) {
+    this.idProperties = idProperties;
+  }
 
-    /**
-     * @return true if this Entity has an isActive property.
-     */
-    public boolean isActiveEnabled() {
-	return isActiveEnabled;
-    }
+  public String getTableName() {
+    return tableName;
+  }
 
-    /**
-     * @return true if this Entity has an organization property.
-     */
-    public boolean isOrganizationEnabled() {
-	return isOrganizationEnabled;
-    }
+  public void setTableName(String tableName) {
+    this.tableName = tableName;
+  }
 
-    /**
-     * @return true if this Entity has a client property.
-     */
-    public boolean isClientEnabled() {
-	return isClientEnabled;
-    }
+  @Override
+  public String toString() {
+    return getName();
+  }
 
-    public List<Property> getProperties() {
-	return properties;
-    }
+  public boolean isMutable() {
+    return isMutable;
+  }
 
-    public void setProperties(List<Property> properties) {
-	this.properties = properties;
-    }
+  public void setMutable(boolean isMutable) {
+    this.isMutable = isMutable;
+  }
 
-    /**
-     * @return the properties which make up the identifying string of this
-     *         Entity
-     */
-    public List<Property> getIdentifierProperties() {
-	return identifierProperties;
-    }
+  public boolean isDeletable() {
+    return isDeletable;
+  }
 
-    public void setIdentifierProperties(List<Property> identifierProperties) {
-	this.identifierProperties = identifierProperties;
-    }
+  public void setDeletable(boolean isDeletable) {
+    this.isDeletable = isDeletable;
+  }
 
-    /**
-     * Only applies if this Entity is a child of another Entity, for example
-     * this is the OrderLine of an Order.
-     * 
-     * @return the list of properties pointing to the parent, an emptylist if
-     *         there is no such association to a parent
-     */
-    public List<Property> getParentProperties() {
-	return parentProperties;
-    }
+  public boolean hasCompositeId() {
+    return getIdProperties().size() == 1 && getIdProperties().get(0).isCompositeId();
+  }
 
-    public void setParentProperties(List<Property> parentProperties) {
-	this.parentProperties = parentProperties;
-    }
+  public AccessLevel getAccessLevel() {
+    return accessLevel;
+  }
 
-    /**
-     * The orderBy properties are used when this Entity is a child of another
-     * Entity. For example if this Entity is the OrderLine with a lineNo
-     * property which determines the order of the lines. Then the lineNo
-     * property will be returned as element in the list of this method.
-     * 
-     * @return the properties which can be used to order instances of this
-     *         Entity
-     */
-    public List<Property> getOrderByProperties() {
-	return this.orderByProperties;
-    }
+  public void setAccessLevel(AccessLevel accessLevel) {
+    this.accessLevel = accessLevel;
+  }
 
-    public void setOrderByProperties(List<Property> orderByProperties) {
-	this.orderByProperties = orderByProperties;
-    }
+  public String getTableId() {
+    return tableId;
+  }
 
-    /**
-     * Returns the properties which make up the primary key of this Entity.
-     * 
-     * @return the list of primary key properties
-     */
-    public List<Property> getIdProperties() {
-	return idProperties;
-    }
+  public void setTableId(String tableId) {
+    this.tableId = tableId;
+  }
 
-    public void setIdProperties(List<Property> idProperties) {
-	this.idProperties = idProperties;
-    }
+  public boolean isOrganizationPartOfKey() {
+    return isOrganizationPartOfKey;
+  }
 
-    public String getTableName() {
-	return tableName;
-    }
+  public void setOrganizationPartOfKey(boolean isOrganizationPartOfKey) {
+    this.isOrganizationPartOfKey = isOrganizationPartOfKey;
+  }
 
-    public void setTableName(String tableName) {
-	this.tableName = tableName;
-    }
+  public boolean isInActive() {
+    return isInActive;
+  }
 
-    @Override
-    public String toString() {
-	return getName();
-    }
+  public void setInActive(boolean isInActive) {
+    this.isInActive = isInActive;
+  }
 
-    public boolean isMutable() {
-	return isMutable;
-    }
+  public Module getModule() {
+    return module;
+  }
 
-    public void setMutable(boolean isMutable) {
-	this.isMutable = isMutable;
-    }
-
-    public boolean isDeletable() {
-	return isDeletable;
-    }
-
-    public void setDeletable(boolean isDeletable) {
-	this.isDeletable = isDeletable;
-    }
-
-    public boolean hasCompositeId() {
-	return getIdProperties().size() == 1
-		&& getIdProperties().get(0).isCompositeId();
-    }
-
-    public AccessLevel getAccessLevel() {
-	return accessLevel;
-    }
-
-    public void setAccessLevel(AccessLevel accessLevel) {
-	this.accessLevel = accessLevel;
-    }
-
-    public String getTableId() {
-	return tableId;
-    }
-
-    public void setTableId(String tableId) {
-	this.tableId = tableId;
-    }
-
-    public boolean isOrganizationPartOfKey() {
-	return isOrganizationPartOfKey;
-    }
-
-    public void setOrganizationPartOfKey(boolean isOrganizationPartOfKey) {
-	this.isOrganizationPartOfKey = isOrganizationPartOfKey;
-    }
-
-    public boolean isInActive() {
-	return isInActive;
-    }
-
-    public void setInActive(boolean isInActive) {
-	this.isInActive = isInActive;
-    }
-
-    public Module getModule() {
-	return module;
-    }
-
-    public void setModule(Module module) {
-	this.module = module;
-    }
+  public void setModule(Module module) {
+    this.module = module;
+  }
 }
--- a/src/org/openbravo/base/model/ModelObject.java	Sun Feb 01 21:40:15 2009 +0000
+++ b/src/org/openbravo/base/model/ModelObject.java	Mon Feb 02 06:26:05 2009 +0000
@@ -24,83 +24,82 @@
 import java.util.Map;
 
 /**
- * The root class for the model types. Used for the bootstrap model (Column,
- * Table, etc.).
+ * The root class for the model types. Used for the bootstrap model (Column, Table, etc.).
  * 
  * @author mtaal
  */
 
 public class ModelObject {
 
-    private String id = null;
-    private boolean active = true;
-    private String name;
-    private Date updated;
+  private String id = null;
+  private boolean active = true;
+  private String name;
+  private Date updated;
 
-    private Map<String, Object> data = new HashMap<String, Object>();
+  private Map<String, Object> data = new HashMap<String, Object>();
 
-    public void set(String propertyName, Object value) {
-        // TODO: externalise the strings
-        if (propertyName.compareTo("id") == 0) {
-            setId((String) value);
-            return;
-        } else if (propertyName.compareTo("active") == 0) {
-            setActive((Boolean) value);
-            return;
-        }
-        data.put(propertyName, value);
+  public void set(String propertyName, Object value) {
+    // TODO: externalise the strings
+    if (propertyName.compareTo("id") == 0) {
+      setId((String) value);
+      return;
+    } else if (propertyName.compareTo("active") == 0) {
+      setActive((Boolean) value);
+      return;
     }
+    data.put(propertyName, value);
+  }
 
-    public Object get(String propertyName) {
-        // TODO: externalise the strings
-        if (propertyName.compareTo("id") == 0)
-            return getId();
-        else if (propertyName.compareTo("active") == 0)
-            return isActive();
-        return data.get(propertyName);
-    }
+  public Object get(String propertyName) {
+    // TODO: externalise the strings
+    if (propertyName.compareTo("id") == 0)
+      return getId();
+    else if (propertyName.compareTo("active") == 0)
+      return isActive();
+    return data.get(propertyName);
+  }
 
-    public boolean isNew() {
-        return id == null;
-    }
+  public boolean isNew() {
+    return id == null;
+  }
 
-    public boolean isActive() {
-        return active;
-    }
+  public boolean isActive() {
+    return active;
+  }
 
-    public void setActive(boolean active) {
-        this.active = active;
-    }
+  public void setActive(boolean active) {
+    this.active = active;
+  }
 
-    public String getId() {
-        return id;
-    }
+  public String getId() {
+    return id;
+  }
 
-    public void setId(String id) {
-        this.id = id;
-    }
+  public void setId(String id) {
+    this.id = id;
+  }
 
-    public Map<String, Object> getData() {
-        return data;
-    }
+  public Map<String, Object> getData() {
+    return data;
+  }
 
-    public String getIdentifier() {
-        return getClass().getName() + "(" + getId() + ")";
-    }
+  public String getIdentifier() {
+    return getClass().getName() + "(" + getId() + ")";
+  }
 
-    public String getName() {
-        return name;
-    }
+  public String getName() {
+    return name;
+  }
 
-    public void setName(String name) {
-        this.name = name;
-    }
+  public void setName(String name) {
+    this.name = name;
+  }
 
-    public Date getUpdated() {
-        return updated;
-    }
+  public Date getUpdated() {
+    return updated;
+  }
 
-    public void setUpdated(Date updated) {
-        this.updated = updated;
-    }
+  public void setUpdated(Date updated) {
+    this.updated = updated;
+  }
 }
\ No newline at end of file
--- a/src/org/openbravo/base/model/ModelProvider.java	Sun Feb 01 21:40:15 2009 +0000
+++ b/src/org/openbravo/base/model/ModelProvider.java	Mon Feb 02 06:26:05 2009 +0000
@@ -40,9 +40,9 @@
 import org.openbravo.base.util.CheckException;
 
 /**
- * Builds the Runtime model base on the data model (application dictionary:
- * table, column, reference, etc). Makes the runtime model (Entity and Property)
- * available to the rest of the system.
+ * Builds the Runtime model base on the data model (application dictionary: table, column,
+ * reference, etc). Makes the runtime model (Entity and Property) available to the rest of the
+ * system.
  * 
  * @see Entity
  * @see Property
@@ -54,719 +54,661 @@
  */
 
 public class ModelProvider implements OBSingleton {
-    private static final Logger log = Logger.getLogger(ModelProvider.class);
+  private static final Logger log = Logger.getLogger(ModelProvider.class);
 
-    private static ModelProvider instance;
-    private List<Entity> model = null;
-    private List<Table> tables = null;
-    private HashMap<String, Table> tablesByTableName = null;
-    private List<RefTable> refTable = null;
-    private List<RefSearch> refSearch = null;
-    private Map<String, RefTable> refTableMap = new HashMap<String, RefTable>();
-    private Map<String, RefSearch> refSearchMap = new HashMap<String, RefSearch>();
-    private List<RefList> refList = null;
-    private HashMap<String, Entity> entitiesByName = null;
-    private HashMap<String, Entity> entitiesByClassName = null;
-    private HashMap<String, Entity> entitiesByTableName = null;
-    private HashMap<String, Entity> entitiesByTableId = null;
-    private List<Module> modules;
+  private static ModelProvider instance;
+  private List<Entity> model = null;
+  private List<Table> tables = null;
+  private HashMap<String, Table> tablesByTableName = null;
+  private List<RefTable> refTable = null;
+  private List<RefSearch> refSearch = null;
+  private Map<String, RefTable> refTableMap = new HashMap<String, RefTable>();
+  private Map<String, RefSearch> refSearchMap = new HashMap<String, RefSearch>();
+  private List<RefList> refList = null;
+  private HashMap<String, Entity> entitiesByName = null;
+  private HashMap<String, Entity> entitiesByClassName = null;
+  private HashMap<String, Entity> entitiesByTableName = null;
+  private HashMap<String, Entity> entitiesByTableId = null;
+  private List<Module> modules;
 
-    /**
-     * Returns the singleton instance providing the ModelProvider functionality.
-     * 
-     * @return the ModelProvider instance
-     */
-    public static ModelProvider getInstance() {
-        // set in a localInstance to prevent threading issues when
-        // reseting it in setInstance()
-        ModelProvider localInstance = instance;
-        if (localInstance == null) {
-            localInstance = OBProvider.getInstance().get(ModelProvider.class);
-            instance = localInstance;
-        }
-        return localInstance;
+  /**
+   * Returns the singleton instance providing the ModelProvider functionality.
+   * 
+   * @return the ModelProvider instance
+   */
+  public static ModelProvider getInstance() {
+    // set in a localInstance to prevent threading issues when
+    // reseting it in setInstance()
+    ModelProvider localInstance = instance;
+    if (localInstance == null) {
+      localInstance = OBProvider.getInstance().get(ModelProvider.class);
+      instance = localInstance;
+    }
+    return localInstance;
+  }
+
+  /**
+   * Makes it possible to override the default ModelProvider with a custom implementation.
+   * 
+   * @param instance
+   *          the custom ModelProvider
+   */
+  public static void setInstance(ModelProvider instance) {
+    ModelProvider.instance = instance;
+  }
+
+  /**
+   * Creates a new ModelProvider, initializes it and sets it in the instance here.
+   */
+  public static void refresh() {
+    try {
+      OBProvider.getInstance().removeInstance(ModelProvider.class);
+      final ModelProvider localProvider = OBProvider.getInstance().get(ModelProvider.class);
+      setInstance(localProvider);
+      // initialize it
+      localProvider.getModel();
+    } catch (final Exception e) {
+      e.printStackTrace(System.err);
+      throw new OBException(e);
+    }
+  }
+
+  /**
+   * The list of Entities created on the basis of the Application Dictionary. The main entry point
+   * for retrieving the in-memory model. This method will initialize the in-memory model when it is
+   * called for the first time.
+   * 
+   * @return the list Entities
+   */
+  public List<Entity> getModel() {
+    if (model == null) {
+      initialize();
     }
 
-    /**
-     * Makes it possible to override the default ModelProvider with a custom
-     * implementation.
-     * 
-     * @param instance
-     *            the custom ModelProvider
-     */
-    public static void setInstance(ModelProvider instance) {
-        ModelProvider.instance = instance;
+    return model;
+  }
+
+  private void initialize() {
+    log.info("Building runtime model");
+
+    // Caching model (tables, table-references, search-references,
+    // list-references)
+    // Changed to use the SessionHandler directly because the dal
+    // layer uses the ModelProvider, so otherwise there will be a
+    // cyclic relation.
+    final SessionFactoryController sessionFactoryController = new ModelSessionFactoryController();
+    final Session session = sessionFactoryController.getSessionFactory().openSession();
+    final Transaction tx = session.beginTransaction();
+    try {
+      log.debug("Read model from db");
+      tables = list(session, Table.class);
+
+      // read the columns in one query and assign them to the table
+      final List<Column> cols = readColumns(session);
+      assignColumnsToTable(cols);
+
+      refTable = list(session, RefTable.class);
+      refSearch = list(session, RefSearch.class);
+      refList = list(session, RefList.class);
+      modules = retrieveModules(session);
+      tables = removeInvalidTables(tables);
+
+      for (final RefTable rt : refTable) {
+        refTableMap.put(rt.getId(), rt);
+      }
+      for (final RefSearch rs : refSearch) {
+        // note mapped by reference id
+        refSearchMap.put(rs.getReference(), rs);
+      }
+
+      // this map stores the mapped tables
+      tablesByTableName = new HashMap<String, Table>();
+      for (final Table t : tables) {
+        // tables are stored case insensitive!
+        tablesByTableName.put(t.getTableName().toLowerCase(), t);
+
+        if (t.getName().contains("_")) {
+          System.err.println(t.getName());
+        }
+
+      }
+
+      log.debug("Setting referencetypes for columns");
+      for (final Table t : tablesByTableName.values()) {
+        t.setReferenceTypes(ModelProvider.instance);
+      }
+
+      log.debug("Setting List Values for columns");
+      for (final RefList rl : refList) {
+        rl.setAllowedValue();
+      }
+
+      model = new ArrayList<Entity>();
+      entitiesByName = new HashMap<String, Entity>();
+      entitiesByClassName = new HashMap<String, Entity>();
+      entitiesByTableName = new HashMap<String, Entity>();
+      entitiesByTableId = new HashMap<String, Entity>();
+      for (final Table t : tablesByTableName.values()) {
+        log.debug("Building model for table " + t.getTableName());
+        final Entity e = new Entity();
+        e.initialize(t);
+        model.add(e);
+        entitiesByClassName.put(e.getClassName(), e);
+        entitiesByName.put(e.getName(), e);
+        entitiesByTableName.put(t.getTableName().toUpperCase(), e);
+        entitiesByTableId.put(t.getId(), e);
+      }
+
+      // in the second pass set all the referenceProperties
+      // and targetEntities
+      // uses global member tablesByTableName
+      setReferenceProperties();
+
+      // add virtual property for the case that the
+      // id property is also a reference (a foreign key)
+      // In this case hibernate requires two mappings
+      // one for the id (a string) and for the reference
+      // in addition the id generation strategy should be set
+      // to foreign.
+      log.debug("Setting virtual property for many-to-one id's");
+      setVirtualPropertiesForReferenceId();
+
+      buildUniqueConstraints(session, sessionFactoryController);
+    } finally {
+      log.debug("Closing session and sessionfactory used during model read");
+      tx.commit();
+      session.close();
+      sessionFactoryController.getSessionFactory().close();
     }
 
-    /**
-     * Creates a new ModelProvider, initializes it and sets it in the instance
-     * here.
-     */
-    public static void refresh() {
-        try {
-            OBProvider.getInstance().removeInstance(ModelProvider.class);
-            final ModelProvider localProvider = OBProvider.getInstance().get(
-                    ModelProvider.class);
-            setInstance(localProvider);
-            // initialize it
-            localProvider.getModel();
-        } catch (final Exception e) {
-            e.printStackTrace(System.err);
-            throw new OBException(e);
+    // now initialize the names of the properties
+    for (final Entity e : model) {
+      for (final Property p : e.getProperties()) {
+        p.initializeName();
+      }
+    }
+    clearLists();
+  }
+
+  /**
+   * Returns the tables in the database, is usefull for debugging purposes.
+   * 
+   * @return list of tables in the database
+   */
+  public List<Table> getTables() {
+    final SessionFactoryController sessionFactoryController = new ModelSessionFactoryController();
+    final Session session = sessionFactoryController.getSessionFactory().openSession();
+    final Transaction tx = session.beginTransaction();
+    try {
+      tables = list(session, Table.class);
+      // read the columns in one query and assign them to the table
+      final List<Column> cols = readColumns(session);
+      assignColumnsToTable(cols);
+      return tables;
+    } finally {
+      log.debug("Closing session and sessionfactory used during model read");
+      tx.commit();
+      session.close();
+      sessionFactoryController.getSessionFactory().close();
+    }
+  }
+
+  /**
+   * @return the last time that one of the relevant Application Dictionary objects was modified.
+   *         Relevant AD objects are: Table, Column, Reference, RefList, RefSearch, RefTable,
+   *         Module, Package.
+   */
+  public long computeLastUpdateModelTime() {
+    final SessionFactoryController sessionFactoryController = new ModelSessionFactoryController();
+    final Session session = sessionFactoryController.getSessionFactory().openSession();
+    final Transaction tx = session.beginTransaction();
+    try {
+      // compute the last updated time
+      long currentLastTimeUpdated = 0;
+      currentLastTimeUpdated = getLastUpdated(Table.class, currentLastTimeUpdated, session);
+      currentLastTimeUpdated = getLastUpdated(Column.class, currentLastTimeUpdated, session);
+      currentLastTimeUpdated = getLastUpdated(RefTable.class, currentLastTimeUpdated, session);
+      currentLastTimeUpdated = getLastUpdated(RefSearch.class, currentLastTimeUpdated, session);
+      currentLastTimeUpdated = getLastUpdated(RefList.class, currentLastTimeUpdated, session);
+      currentLastTimeUpdated = getLastUpdated(Module.class, currentLastTimeUpdated, session);
+      currentLastTimeUpdated = getLastUpdated(Package.class, currentLastTimeUpdated, session);
+      currentLastTimeUpdated = getLastUpdated(Reference.class, currentLastTimeUpdated, session);
+      return currentLastTimeUpdated;
+    } finally {
+      tx.commit();
+      session.close();
+      sessionFactoryController.getSessionFactory().close();
+    }
+  }
+
+  private <T extends ModelObject> long getLastUpdated(Class<T> clz, long currentLastTime,
+      Session session) {
+    final ModelObject mo = queryLastUpdateObject(session, clz);
+    if (mo.getUpdated().getTime() > currentLastTime) {
+      return mo.getUpdated().getTime();
+    }
+    return currentLastTime;
+  }
+
+  private <T extends ModelObject> T queryLastUpdateObject(Session session, Class<T> clazz) {
+    final Criteria c = session.createCriteria(clazz);
+    c.addOrder(Order.desc("updated"));
+    c.setMaxResults(1);
+    @SuppressWarnings("unchecked")
+    final List<T> list = c.list();
+    if (list.size() == 0) {
+      throw new OBException("No instances of " + clazz.getName()
+          + " in the database, has the database been created and filled with data?");
+    }
+    return (T) list.get(0);
+
+  }
+
+  // clears some in-memory lists to save memory
+  private void clearLists() {
+    tables = null;
+    tablesByTableName = null;
+    refTable = null;
+    refSearch = null;
+    refTableMap = new HashMap<String, RefTable>();
+    refSearchMap = new HashMap<String, RefSearch>();
+    refList = null;
+  }
+
+  @SuppressWarnings("unchecked")
+  private List<Column> readColumns(Session session) {
+    final Criteria c = session.createCriteria(Column.class);
+    c.addOrder(Order.asc("position"));
+    return c.list();
+  }
+
+  private void assignColumnsToTable(List<Column> cols) {
+    for (final Column column : cols) {
+      final Table table = column.getTable();
+      table.getColumns().add(column);
+    }
+  }
+
+  private void setVirtualPropertiesForReferenceId() {
+
+    for (final Entity e : entitiesByName.values()) {
+      if (e.getIdProperties().size() == 1 && !e.getIdProperties().get(0).isPrimitive()) {
+        createIdReferenceProperty(e);
+      } else if (e.getIdProperties().size() > 1) {
+        createCompositeId(e);
+      }
+      // add virtual property in the parent table based on
+      // isParent columns
+      if (e.getParentProperties().size() > 0) {
+        createPropertyInParentEntity(e);
+      }
+    }
+  }
+
+  private void setReferenceProperties() {
+    log.debug("Setting reference property");
+    // uses global member tablesByTableName
+    for (final Table t : tablesByTableName.values()) {
+      for (final Column c : t.getColumns()) {
+        if (!c.isPrimitiveType()) {
+          final Property thisProp = c.getProperty();
+          log.debug("Setting targetEntity and reference Property for " + thisProp);
+          final Column thatColumn = c.getReferenceType();
+          if (thatColumn == null) {
+            log
+                .error("Property "
+                    + thisProp
+                    + " is mapped incorrectly, there is no reference column for it, removing from the mapping");
+            thisProp.getEntity().getProperties().remove(thisProp);
+            if (thisProp.getEntity().getIdProperties().remove(thisProp)) {
+              Check.fail("Incorrect mapping for property " + thisProp
+                  + " which is an id, mapping fails, stopping here");
+            }
+            thisProp.getEntity().getIdentifierProperties().remove(thisProp);
+            continue;
+          }
+          // targetentity is set within setReferencedProperty
+          final Property thatProperty = thatColumn.getProperty();
+          thisProp.setReferencedProperty(thatProperty);
         }
+      }
     }
 
-    /**
-     * The list of Entities created on the basis of the Application Dictionary.
-     * The main entry point for retrieving the in-memory model. This method will
-     * initialize the in-memory model when it is called for the first time.
-     * 
-     * @return the list Entities
-     */
-    public List<Entity> getModel() {
-        if (model == null) {
-            initialize();
+  }
+
+  private List<Table> removeInvalidTables(List<Table> allTables) {
+    final List<Table> toRemove = new ArrayList<Table>();
+    final List<Table> localTables = allTables;
+    for (final Table t : localTables) {
+      // taking into account inactive tables for now...
+      if (false && !t.isActive()) {
+        log.debug("Table " + t.getName() + " is not active ignoring it");
+        toRemove.add(t);
+        continue;
+      }
+
+      if (t.getPrimaryKeyColumns().size() == 0) {
+        log.debug("Ignoring table " + t.getName() + " because it has no primary key columns");
+        toRemove.add(t);
+        continue;
+      }
+    }
+    allTables.removeAll(toRemove);
+    return tables;
+  }
+
+  // Build unique constraints