Business Objects
A business object is a semantic entity that represents the smallest data unit to take part in a business scenario.
You use a business object to define persistable data types and to generate database tables. You can specify relations between business objects, persistency and permissions, implement or map basic methods for reading, writing, updating, deleting or querying data.
A business object is a clearly identifiable unit.

For a car rental system, you can create the following business objects:
· Car – with attributes such as license plate number, car model, number of seats, maximum speed, mileage, color
· Customer – with attributes such as the first name, last name, credit card number, address, phone, fax, e-mail, date of registration
· Order – with attributes such as the date, invoice number, or price.
You should create associations with the other business objects to specify details about the customer and car.
When you create a new business object, the following nodes appear in the Composite Application Explorer:
|
All business objects are under this node. |
|
The business object itself |
|
The business object root node |
|
A sample business object subnode |
|
A sample business object subnode |
The business object root node is a wrapper representing the root of a business object tree structure. Each business object root node may contain several business object nodes.
When you create a new business object, you can choose one of the following:
● Create the business object node with a new (empty) structure.
● Create the business object node with an existing (complex) structure.
Business object nodes are not standalone. You must put them under a business object root node.
When you create a new business object, the following attributes are created automatically:
● key – the Global Unique Identification (GUID) key of the object
● createdBy – the creator of the object
● createdAt – the time when the object was created
● modifiedBy – the performer of the last change
● modifiedAt – the time of the last change
These attributes are read only and cannot be deleted.
You can also create additional attributes. The attributes of a business object are presented as part of a complex data type.
More information:
● Modeling Business Object Attributes
● Creating and Editing Data Types
You can create relations between business objects. Associations are the only type of relations that are supported. When the association type is CROSS_BO if an object is deleted, the objects associated to it are not deleted. When the association type is PARENT_CHILD the child business object nodes are deleted together with the parent business object node.
More information: Defining Business Object Associations
Business object can be persisted locally or in a remote back-end SAP system. When you use business objects with different types of persistency, you take advantage of the flexibility in accessing and mixing all types of data from remote and local persistency.
Business objects can be persisted in various data stores. Depending on the application and system landscape, the persistency can be:
● Local persistency
CAF utilizes the Enterprise Java Beans (EJB) 3.0 standard and implements persistency using session beans and plain Java objects with the Java Persistence API (JPA) for storing data in the database. CAF creates a database model in the system database of the Application Server (AS) Java that corresponds to the structure of your business objects.
You can extend or entirely replace the functionality that CAF generates in the business objects by overriding the generated methods in the implementation bean class that is created automatically for each business object.
● Remote persistency
Any remote back-end system, that is, systems whose data is separated from the local CAF database, can be connected to a composite application system through external services.
To access remote persistency, you assign and map business object methods and parameters to external service methods and parameters.
● Custom persistency
You can implement the persistency logic entirely by yourself if you choose local persistency for your business objects and override all the CRUD methods.
More information: Defining Business Object Persistency