[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue/docbook/GNUeModuleGuide/chapters businesso...
From: |
Neil Tiffin |
Subject: |
gnue/docbook/GNUeModuleGuide/chapters businesso... |
Date: |
Sat, 19 May 2001 08:26:01 -0700 |
CVSROOT: /home/cvs
Module name: gnue
Changes by: Neil Tiffin <address@hidden> 01/05/19 08:26:01
Modified files:
docbook/GNUeModuleGuide/chapters: businessobjects.sgml
Log message:
Add include statement to syntax, clean up examples and add links to top
of business objects page.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/docbook/GNUeModuleGuide/chapters/businessobjects.sgml.diff?cvsroot=OldCVS&tr1=1.12&tr2=1.13&r1=text&r2=text
Patches:
Index: gnue/docbook/GNUeModuleGuide/chapters/businessobjects.sgml
diff -u gnue/docbook/GNUeModuleGuide/chapters/businessobjects.sgml:1.12
gnue/docbook/GNUeModuleGuide/chapters/businessobjects.sgml:1.13
--- gnue/docbook/GNUeModuleGuide/chapters/businessobjects.sgml:1.12 Mon May
7 06:02:47 2001
+++ gnue/docbook/GNUeModuleGuide/chapters/businessobjects.sgml Sat May 19
08:26:01 2001
@@ -7,15 +7,66 @@
Introduction
</title>
<para>
- This chapter is $Id: businessobjects.sgml,v 1.12
2001/05/07 13:02:47 ntiffin Exp $.
+ This chapter is $Id: businessobjects.sgml,v 1.13
2001/05/19 15:26:01 ntiffin Exp $.
</para>
- <sect2>
- <title>
+ <para>
+ Quick links to the various sections.
+ </para>
+ <para>
+ <quote><link linkend=businessobjects
endterm="businessobjects.title"></link></quote>
+ </para>
+ <para>
+ <quote><link linkend=namingconventions
endterm="namingconventions.title"></link></quote>
+ </para>
+ <para>
+ <quote><link linkend=codingconventions
endterm="codingconventions.title"></link></quote>
+ </para>
+ <para>
+ <quote><link linkend=modulesclasses
endterm="modulesclasses.title"></link></quote>
+ </para>
+ <para>
+ <quote><link linkend=extend endterm="extend.title"></link></quote>
+ </para>
+ <para>
+ <quote><link linkend=fields endterm="fields.title"></link></quote>
+ </para>
+ <para>
+ <quote><link linkend=typecomplex
endterm="typecomplex.title"></link></quote>
+ </para>
+ <para>
+ <quote><link linkend=typedef endterm="typedef.title"></link></quote>
+ </para>
+ <para>
+ <quote><link linkend=comment endterm="comment.title"></link></quote>
+ </para>
+ <para>
+ <quote><link linkend=include endterm="include.title"></link></quote>
+ </para>
+ <para>
+ <quote><link linkend=lookup endterm="lookup.title"></link></quote>
+ </para>
+ <para>
+ <quote><link linkend=reference
endterm="reference.title"></link></quote>
+ </para>
+ <para>
+ <quote><link linkend=list endterm="list.title"></link></quote>
+ </para>
+ <para>
+ <quote><link linkend=method endterm="method.title"></link></quote>
+ </para>
+ <para>
+ <quote><link linkend=inheritance
endterm="inheritance.title"></link></quote>
+ </para>
+ <sect2 id=businessobjects>
+ <title id=businessobjects.title>
Business Objects
</title>
+ <para>
+ Comments about what should be changed in this
document (and what is even missing) are very appreciated, because every comment
possibly reflects on future versions of this document and therefore will make
the final document better. Please direct your comments to Neil Tiffin
(address@hidden).
<para>
- Comments about what should be changed in this
document (and what is even missing) are very appreciated, because every comment
possibly reflects on future versions of this document and therefore will make
the final document better. Please direct your comments to Neil Tiffin
(address@hidden). This chapter was originally written by Neil Tiffin
(address@hidden) and comes from documents and code originally written by Andrew
Murie (address@hidden) and coding standard from Reinhard
Müller(address@hidden).
</para>
+This chapter was originally written by Neil Tiffin (address@hidden) and comes
from documents and code originally written by Andrew Murie (address@hidden) and
coding standard from Reinhard Müller(address@hidden).
+ </para>
<para>
GNUe business objects are defined in GNUe Class
Files (GCD). These files have the extension ".gcd". This chapter discusses the
format of GCD files. Business objects are processed by the GEAS server. If you
are using GNUe Forms in 2-tier mode then things work a little differently.
</para>
@@ -23,8 +74,8 @@
This document contains only definitions that
are implemented in geas now or noted specifically as not implemented. Names in
CAPITALS are literal words for the purpose of this document. More technical
information may be present in the geas document directory in cvs.
</para>
</sect2>
- <sect2>
- <title>
+ <sect2 id=namingconventions>
+ <title id=namingconventions.title>
Naming Conventions
</title>
<para>
@@ -37,8 +88,8 @@
Words in names should be separated by a single
"_" character.
</para>
</sect2>
- <sect2>
- <title>
+ <sect2 id=codingconventions>
+ <title id=codingconventions.title>
Coding Conventions
</title>
<orderedlist>
@@ -146,7 +197,7 @@
#
# This file originally written by Neil Tiffin (address@hidden).
#
-# $Revision: 1.12 $ $Date: 2001/05/07 13:02:47 $ $Author: ntiffin $
+# $Revision: 1.13 $ $Date: 2001/05/19 15:26:01 $ $Author: ntiffin $
#
module person {
@@ -187,8 +238,8 @@
<title>
GNUe Class Files
</title>
- <sect2>
- <title>
+ <sect2 id=modulesclasses>
+ <title id=modulesclasses.title>
MODULES and CLASSES
</title>
<para>
@@ -219,7 +270,7 @@
</programlisting>
</sect2>
- <sect2>
+ <sect2 id=extend>
<title>
EXTEND (NOT IMPLEMENTED YET)
</title>
@@ -285,8 +336,8 @@
This should not be confused with inheritance which produces two tables when
processed by geas.
</para>
</sect2>
- <sect2>
- <title>
+ <sect2 id=fields>
+ <title id=fields.title>
Fields
</title>
@@ -343,22 +394,22 @@
MODULE location
{
- CLASS address
- {
- CHAR street1<25>;
- CHAR street2<25>;
- CHAR city<15>;
- CHAR county<15>;
- CHAR state_code<8>;
- CHAR country_code<8>;
- CHAR postal_code<10>;
- TEXT my_notes;
- FLOAT latitude;
- FLOAT longitude;
- INT some_number;
- DATE today;
- TIME now;
- };
+ CLASS address
+ {
+ CHAR street1<25>;
+ CHAR street2<25>;
+ CHAR city<15>;
+ CHAR county<15>;
+ CHAR state_code<8>;
+ CHAR country_code<8>;
+ CHAR postal_code<10>;
+ TEXT my_notes;
+ FLOAT latitude;
+ FLOAT longitude;
+ INT some_number;
+ DATE today;
+ TIME now;
+ };
};
]]>
@@ -391,8 +442,8 @@
DATETIME- Is formatted for both date and time as provided for in the
SQL database.
</para>
</sect2>
- <sect2>
- <title>
+ <sect2 id=typecomplex>
+ <title id=typecomplex.title>
TYPE (Complex Fields)
</title>
<para>
@@ -447,8 +498,8 @@
</programlisting>
</sect2>
- <sect2>
- <title>
+ <sect2 id=typedef>
+ <title id=typedef.title>
TYPE (Typedef) (NOT IMPLEMENTED YET)
</title>
<para>
@@ -487,23 +538,23 @@
<![CDATA[
MODULE inventory
-
- TYPE product_code = char<25>;
- TYPE product_class = char<8>;
-
- CLASS product
{
- product_code product_id;
- product_class class;
- char description<100>;
- };
+ TYPE product_code = char<25>;
+ TYPE product_class = char<8>;
- CLASS product_classification
- {
- product_class class;
- char class<20>;
+ CLASS product
+ {
+ inventory::product_code product_id;
+ inventory::product_class class;
+ char description<100>;
+ };
+
+ CLASS product_classification
+ {
+ inventory::product_class class;
+ char description<20>;
+ };
};
- };
]]>
</programlisting>
@@ -526,17 +577,51 @@
</programlisting>
</sect2>
- <sect2>
- <title>
+ <sect2 id=comment>
+ <title id=comment.title>
Comments
</title>
<para>
- As you can see from the example comments start with the "#"
+ Comments start with the "#"
character and continue to the end of the line.
</para>
+<para>
+ For example:
+</para>
+<programlisting>
+ char phone_code<4>; # for validating phone country code
+</programlisting>
</sect2>
- <sect2>
- <title>
+ <sect2 id=include>
+ <title id=include.title>
+ Include
+ </title>
+<para>
+ The include statement is used to reference classes defined outside of
the current file.
+The include path is relative to the current file. If the file has already been
+included the scanner will not include it a second time.
+</para>
+<para>
+For example:
+</para>
+<programlisting>
+ include "../../../base/location/classes/address.gcd"
+</programlisting>
+<para>
+You may not have more than one file with the same name. Paths do not make
files unique
+to GEAS.
+Therefore you may not have the following:
+</para>
+<programlisting>
+ include "../../../base/location/classes/address.gcd"
+ include "../../../supply-chain/vendor/classes/address.gcd"
+</programlisting>
+<para>
+ The second file will never ever get processed.
+</para>
+ </sect2>
+ <sect2 id=lookup>
+ <title id=lookup.title>
LOOKUP
</title>
<para>
@@ -565,8 +650,8 @@
src_class.src_data is copied into new_fld_name
</programlisting>
</sect2>
- <sect2>
- <title>
+ <sect2 id=reference>
+ <title id=reference.title>
REFERENCE
</title>
<para>
@@ -577,7 +662,12 @@
<programlisting>
REFERENCE new_fld_name : src_class(src_field) = comp_field;
-Where:
+</programlisting>
+<para>
+ Where:
+</para>
+<programlisting>
+
new_fld_name - is the new field name for reference in the class. It
does not result in a table column in the database.
@@ -589,14 +679,17 @@
comp_field - is the field from the current class that is matched.
-Therefore:
- The new_fld_name is a reference to an object instance where src_fld and
+</programlisting>
+<para>
+ Therefore:
+</para>
+<para>
+ The new_fld_name is a reference to an object instance where src_fld and
comp_field match.
+</para>
-REFERENCE is used to implement many to one relationships.
-
-</programlisting>
<para>
+ REFERENCE is used to implement many to one relationships.
A short hand way to create a REFERENCE is to use the following syntax:
</para>
<programlisting>
@@ -623,8 +716,8 @@
the reference automatically.
</para>
</sect2>
- <sect2>
- <title>
+ <sect2 id=list>
+ <title id=list.title>
LIST
</title>
@@ -683,8 +776,8 @@
</para>
</sect2>
- <sect2>
- <title>
+ <sect2 id=method>
+ <title id=method.title>
METHOD
</title>
<para>
@@ -694,14 +787,19 @@
<programlisting>
return_type method_name(arg_type arg_name);
+
+</programlisting>
+<para>
+ Where:
+</para>
+<programlisting>
-Where:
return_type - the type (CHAR, INT, FLOAT) of the returned value,
if any. The only type currently working is CHAR.
method_name - the method name.
arg_type - the type of the argument. See caveat below.
arg_name - the argument name.
-
+
</programlisting>
<para>
Caveat - the only type passed to C or Python is string type. So your
@@ -719,7 +817,6 @@
char callme( int a , int b );
};
-
</programlisting>
<para>
Python Example
@@ -764,8 +861,8 @@
</programlisting>
</sect2>
- <sect2>
- <title>
+ <sect2 id=inheritance>
+ <title id=inheritance.title>
Inheritance
</title>
<para>
@@ -780,10 +877,7 @@
</programlisting>
<para>
-Example:
-</para>
-<para>
- For class definitions.
+CLASS example:
</para>
<programlisting>
@@ -806,7 +900,7 @@
</programlisting>
<para>
- For type definitions.
+ TYPEexample
</para>
<programlisting>
@@ -828,14 +922,13 @@
]]>
</programlisting>
+<para>
+ Where:
+</para>
<programlisting>
-
-Where:
-
item - is a parent of sales_item.
stock_item - is a parent of sales_item.
-
</programlisting>
<para>
Inheritance works for both CLASS or TYPE, but you can not mix them.
- gnue/docbook/GNUeModuleGuide/chapters businesso..., Neil Tiffin, 2001/05/04
- gnue/docbook/GNUeModuleGuide/chapters businesso..., Neil Tiffin, 2001/05/07
- gnue/docbook/GNUeModuleGuide/chapters businesso...,
Neil Tiffin <=
- gnue/docbook/GNUeModuleGuide/chapters businesso..., Neil Tiffin, 2001/05/19
- gnue/docbook/GNUeModuleGuide/chapters businesso..., Neil Tiffin, 2001/05/19
- gnue/docbook/GNUeModuleGuide/chapters businesso..., Neil Tiffin, 2001/05/24
- gnue/docbook/GNUeModuleGuide/chapters businesso..., Neil Tiffin, 2001/05/27
- gnue/docbook/GNUeModuleGuide/chapters businesso..., Neil Tiffin, 2001/05/31