Cayenne User Documentation
Setting DataMap Defaults

### Setting DataMap Defaults

DataMap editing panel allows to define a number of default values for the entities in this map.

Defaults are stored in the DataMap XML file and used in CayenneModeler to make entity creation/modification easier. The following defaults are supported:

- DB Schema. Default schema for newly created DbEntities and Procedures. Clicking "Update.." button next to default schema will reset the schema of all existing DbEntities and Procedures to match the default.

- Java Package. Default package for newly created ObjEntities. When specified, newly created ObjEntities will be assigned a class name that is a combination of default package and initial entity name. Clicking "Update.." button next to default package will reset the package of the existing Java classes in the DataMap.

- DataObject Superclass. DataObject superclass allows to specify default superclass for the DataObject classes mapped via ObjEntities. Clicking "Update.." button next to DataObject superclass field will reset the superclass of all existing Java classes in the DataMap.

- Optimistic Locking. Default optimistic locking policy for ObjEntities. Clicking "Update.." button next to the optimistic locking checkbox will reset the optimistic locking policy of all existing ObjEntities to match the default.
- Client Entities. Allows you to specify remote persistence client classes. Clicking "Update.." button next to Client Java Package field will reset the client java package of all existing Java classes in the DataMap.

  | Defaults are ignored in runtime Note that none of the defaults affect entities runtime behavior. For example if a DbEntity "ARTIST" has empty schema, and a DataMap defines a default schema to be "SCHEMA1", Cayenne will assume that ARTIST entity does not use schema.

.
Copyright ©2001-2010 Apache Software Foundation