blob: 5db34afe4c16210f074336ede8238dc9e874fff1 [file] [log] [blame]
Title: General Navigation
<H3><A name="GeneralNavigation-GeneralNavigation"></A>General Navigation</H3>
<P>CayenneModeler supports executing commands via its main menu and a button toolbar. Currently Modeler DOES NOT support contextual menus that open on right-click. All of the toolbar buttons have corresponding items in the menu that perform exact same operation (plus there are operations that are available via the menu only). If an item or a button action can not be performed in a given context an item is visually disabled.</P>
<H4><A name="GeneralNavigation-Toolbars"></A>Toolbars</H4>
<P>There is a main toolbar shown below, and a number of object-specific toolbars.</P>
<P><SPAN class="image-wrap" style=""><IMG src="general-navigation.data/toolbar-main.jpg" style="border: 0px solid black"></SPAN></P>
<P>The following is a quick reference of the toolbar button functions.</P>
<H5><A name="GeneralNavigation-Project%3A%21iconnew.gif%21%21iconopen.gif%21%21iconsave.gif%21"></A>Project: <SPAN class="image-wrap" style=""><IMG src="general-navigation.data/icon-new.gif" style="border: 0px solid black"></SPAN> <SPAN class="image-wrap" style=""><IMG src="general-navigation.data/icon-open.gif" style="border: 0px solid black"></SPAN> <SPAN class="image-wrap" style=""><IMG src="general-navigation.data/icon-save.gif" style="border: 0px solid black"></SPAN></H5>
<P>Cayenne Project is a logical deployment unit, that consists of a main project file (called cayenne.xml) and zero or more DataNode (<B>.driver.xml) and DataMap (</B>.map.xml) XML files. Currently CayenneModeler supports a single project per running Modeler instance, however multiple instances of Modeler can be started to edit multiple projects at the same time.</P>
<H5><A name="GeneralNavigation-DataDomain%3A%21icondom.gif%21"></A>DataDomain: <SPAN class="image-wrap" style=""><IMG src="general-navigation.data/icon-dom.gif" style="border: 0px solid black"></SPAN> </H5>
<P>Each DataDomain is an abstraction of a logical data source, possibly spreading multiple physical databases. cayenne.xml file lists DataDomains present in the project. Most projects will contain only a single domain. DataDomain button creates a new DataDomain in the currently open project. </P>
<H5><A name="GeneralNavigation-DataNode%3A%21iconnode.gif%21"></A>DataNode: <SPAN class="image-wrap" style=""><IMG src="general-navigation.data/icon-node.gif" style="border: 0px solid black"></SPAN></H5>
<P>DataNode is an object that corresponds to a single physical data source, normally a database. Currently there are two types of DataNodes: </P>
<UL>
<LI>Based on DataSource obtained via JNDI from the container (e.g. a WebLogic or Tomcat server).</LI>
<LI>Based on JDBC driver. In this case Cayenne provides its own connection pooling and other functions expected from a DataSource.</LI>
</UL>
<P>DataNode references zero or more DataMaps defined under DataDomain. </P>
<H5><A name="GeneralNavigation-DataMap%3A%21icondatamap.gif%21"></A>DataMap: <SPAN class="image-wrap" style=""><IMG src="general-navigation.data/icon-datamap.gif" style="border: 0px solid black"></SPAN></H5>
<P>DataMap is a collection of Object/Relational mapping information linking Java object layer with the relational database. DataMaps are created within DataDomains and can be later linked to DataNodes. </P>
<H5><A name="GeneralNavigation-Entities%3A%21icondbentity.gif%21%21iconderiveddbentity.gif%21%21iconobjentity.gif%21"></A>Entities: <SPAN class="image-wrap" style=""><IMG src="general-navigation.data/icon-dbentity.gif" style="border: 0px solid black"></SPAN> <SPAN class="image-wrap" style=""><IMG src="general-navigation.data/icon-derived-dbentity.gif" style="border: 0px solid black"></SPAN> <SPAN class="image-wrap" style=""><IMG src="general-navigation.data/icon-objentity.gif" style="border: 0px solid black"></SPAN></H5>
<P>There are two types of entities in Cayenne DataMaps: ObjEntities, reflecting the structure of the object layer, and DbEntities that describe database tables and views. In other words, ObjEntity is a descriptor of a persistent Java class, and DbEntity is a descriptor of a database table or view. Each ObjEntity is based on a DbEntity, but there can be DbEntities that do not have a corresponding ObjEntity. </P>
<P>There is a special kind of DbEntity - DerivedDbEntity - that has limited capabilities of defining &quot;virtual&quot; database views. DerivedDbEntity is deprecated in version 3.0 and should be avoided.</P>
<H5><A name="GeneralNavigation-Procedures%3A%21iconstoredprocedure.gif%21"></A>Procedures: <SPAN class="image-wrap" style=""><IMG src="general-navigation.data/icon-stored-procedure.gif" style="border: 0px solid black"></SPAN></H5>
<P>Procedure is a decriptor of a database stored procedure. It can be created in the modeler and later invoked using ProcedureQuery. Note that not all databases support stored procedures. </P>
<H5><A name="GeneralNavigation-Query%3A%21iconquery.gif%21"></A>Query: <SPAN class="image-wrap" style=""><IMG src="general-navigation.data/icon-query.gif" style="border: 0px solid black"></SPAN></H5>
<P>Cayenne allows to store queries in the DataMap. There are three types of Cayenne queries that can be created in the Modeler - object select query, raw SQL query, and procedure query.</P>