Posts tagged ‘Openbravo India’

March 8, 2012

Data Access Layer Architecture in Openbravo


– Narayanaswamy, Sysfore

1 Introduction

The goal of the DAL development is to strengthen the middle-tier in the application, i.e. to implement business logic in Java. The DAL provides the application developer with the following functionality:

  • Type safe querying and retrieval of business objects from the database.
  • A convenient API to update or create new data in the database.
  • A type safe interface to update information of a business object, increased productivity by making the properties of a business object directly visible through getters and setters (in the IDE).
  • Transaction and context handling.
  • Security and validation checking.
  • Automatically maps new entries in the Application Dictionary to database tables and columns.
  • Generates Java class business objects (and their associations) on the basis of the Application Dictionary model.

The DAL consists of a development-time and runtime part. The development-time part takes care of generating Java business object classes. The runtime part takes care of mapping Java classes to the database and supporting functionality such as security and validation.

2 DAL Architecture

The Data Access Layer (DAL) provides an API to store, query and remove business objects from the database.

The DAL offers three main services to instantiate, create and query Openbravo ERP business objects: OBDal, OBCriteria and OBProvider. The service classes can all be found in the org.openbravo.dal.service package.

3 OBDal

The OBDal instance (available through OBDal.getInstance()) is the main entrance point for retrieving and storing business objects in the database in a validated and secure way. It provides the following functions:

  • save: stores a new business object in the database or an existing business object is updated. For existing business object it is not required to call this method as Hibernate does automatic dirty checking.
  • get: retrieves a single business object using its id. There are two versions: one using the class name (of the generated business object) and one using the entity name.
  • remove: delete a business object from the database, the actual database delete is done at commit time.
  • create OBCriteria: OBCriteria objects are used for querying.
  • commitAndClose and rollbackAndClose: these methods can be used to implement custom transaction handling. Normally this is done by the environment (Openbravo web container or Openbravo test).

The OBDal API makes extensive use of the OBCriteria and OBQuery classes to support querying.

4 OBCriteria

The OBCriteria class implements the Hibernate Criteria interface. It extends the standard Hibernate Criteria functionality for filtering on active, client and organization. In addition it offers convenience methods to set orderby and to perform count actions.

  • Summarizing, the OBCriteria object supports all Hibernate Criteria features:
  • Setting the where-clause of a filter using the Hibernate Criterion concept.
  • Setting paging parameters such as first row and maximum number of results.
  • Setting order by on the query.
  • Specifying joins for performance reasons.
  • Performing counts, average etc.

5 OBQuery

The OBQuery class is an extension of the Hibernate Query object. It extends the standard Hibernate Query functionality for filtering on active, client and organization.

The OBQuery object is created through the OBDal.createQuery method. The first argument of the createQuery is a class or an entity name, the second argument is the where-clause.

6 OBProvider

Openbravo business objects should not be instantiated directly using the new operator. Instead the OBProvider class should be used to create an instance of the required business object. The OBProvider is located in the org.openbravo.base.provider package and can be retrieved using the method OBProvider.getInstance(). The OBProvider offers methods to instantiate using a class name or using an entity name.

Advertisements
February 27, 2012

Sysfore named Openbravo Partner of the Year

Sysfore named Openbravo Partner of the Year

Openbravo Partner of the Year

Proud Moment For Sysfore: Sysfore named Openbravo Partner of the Year!

Leading Openbravo Partner, Sysfore Technologies awarded as the Partner of the Year 2011 – India

Bangalore, India – January 9, 2012: Sysfore Technologies, a specialist provider of business web solutions and IT Outsourcing services, has been named Partner of the Year 2011 (India) by Openbravo. Openbravo, the agile ERP company,announced the winners of its “Partner of the Year 2011” awards recognized for technical excellence in..[Click here to read the official announcement on our website]

February 27, 2012

Free Webinar on HR and Payroll Management

Human Resources and Payroll Management for Openbravo ERP:

Easily manage your company’s most valuable asset!

  • Date: Tuesday, 6 March 2012
  • Time: 9am CET
HR & Payroll for Openbravo ERP by Sysfore

HR & Payroll for Openbravo ERP by Sysfore

Is your growing business getting bogged down by tedious, manual processes for human resources and payroll? Smart companies know that as the business environment grows increasingly complex, their employees represent a sustainable source of competitive advantage. But, understandably, many hesitate to deploy a standalone HR system due to the cost and complexity.

The Human Resources & Payroll Management solution is a fully integrated, native solution for Openbravo, the leading open source ERP. Extremely simple and user-friendly, this solution helps you optimize your workforce, and assists in processing payroll. The HR & Payroll solution is cost-effective, and very easy to configure and further customize using standard Openbravo facilities.

Register now to join Openbravo and Sysfore, Gold Partner of Openbravo and author of the solution, on Tuesday March 6, to discover the benefits of easily managing all of this integrated functionality directly inside of the powerful Openbravo 3 ERP platform:

  • Employee information
  • Time & Attendance
  • Team management
  • Leave management
  • Work shifts
  • Payroll & Benefits
  • Standard and Custom Reports

Now is your chance to register to see this exciting new solution in action, interact with the experts, and get your questions answered!