List of fields standard implementation.
All the fields are presented both in the SELECT and in the
ResultSet .
Fields can be added/removed either:
- one by one
- as a list
- using a
ListStructure (all fields defined in the list)
- using a Bean Class (all fields are listed using reflection)
For each add/remove call a prefixcan be set.
Prefix should refer to a composite field in a Bean (containing another Bean).
Example use:
ListSqlHelper helper = ...
StandardFields sf = helper.getStandardFields();
sf.addField("name"); // add "name"
sf.addField("birthdate"); // add "birthdate"
sf.addField("address", "town"); // add "address.town"
sf.addField("address", "zip"); // add "address.zip"
sf.addField("org", Organization.class); // add all fields of Organization.class as sub-fields
Modifier.addListFields(sf.subFields("modifier")); // let Mofifier.class add it's common fields
See Also: Fields See Also: ListSqlHelper.getStandardFields author: Rein Raudjärv since: 1.1 |