Chapter 2. Dealing with Basics: Entity Objects
In this chapter, we will cover:
Using a custom property to populate a sequence attribute
Overriding doDML() to populate an attribute with a gapless sequence
Creating and applying property sets
Using getPostedAttribute() to determine the posted attribute's value
Overriding remove() to delete associated child entities
Overriding remove() to delete a parent entity in an association
Using a method validator based on a view object accessor
Using Groovy expressions to resolve validation error message tokens
Using doDML() to enforce a detail record for a new master record
Introduction
Entity objects are the basic building blocks in the chain of business components. They represent a single row of data and they encapsulate the business model, data, rules, and persistence behavior. Usually, they map to database objects, most commonly to database tables, and views. Entity object definitions are stored in XML metadata files. These files are maintained automatically...