OpenSource ERP Software dedicated to small to mid-size companies

           Become Platinium or Gold Neogia Partner

UML modelization rules

Contents

Rule for entity object modelization

Currently all generated file is base on entity objects.

the entity specific tag value are:

shortName 
use to build primaryKey Name for associated entity, for Ofbiz compatibility, to avoid field name too long. Use for the discriminator value for the extend entity, in OFBiz id-ne value.length() must be < 20. Use it only if you have some entityEngine Warning message.
discriminatorValue 
value to use as discriminator in the superclass. Should be use only to match existing ofbiz entities. In all other cases, default value is correct.
uniqueNameAttribute 
boolean value, if true the attribute name are used without adding the entityShortName. It's useful for the ofbiz data model entity.
alreadyExistingOfbizEntities 
boolean value, if true an element <extend-entity> is generated in entitymodel.xml. This element contains the definition of all attributes tagged by "addedToOfbiz". Nothing is generated in entitygroup.xml
setDefaultAssoc 
use to give the default order for association (example in PartRole entity), <no more use> (todo: will be review )mandatory for association Class to say in which order will be parameters for the object contructor. Syntax is "ClassNameA:1, ClassNameB:2". </no more use>
orderBy 
use to define the default order for the accessor "List getxxxs()" to this class from an other. The value contain the attributes list which define the order separated by a ",". If a descending order is required add "DESC" after attribute name, (ex: minimumQty DESC, product ). WARNING : Currently if you want to put an association in this list put the generatedName (look in the generated entitymodel file); in the futur it will be the associationName !!! .
cache 
use to say if (by default) the accessor "List getxxxs()" to this class from an other should be read from cache or not. Value = true or false.
defaultValue 
used for enumeration or StatusItem derivation association, define the defaultValue for drop-down and value set if null is given to service method (actionForm = add). It's possible to use this tag for all association to entity with drop-down. This tag is used if the same tag is not defined at the associationEnd. The tag value is used without transformation to call the setter. So, it must have the java format depending of the attribute type : for string "value", for boolean true or false, for double 0, .. .
gui 
string with some words, each word is a sub-tag and if it's present it say the value is true for this sub-tag. This Tag is use for User Interface generation
ofbizEntityOptions 
string with some words, each word is a sub-tag and if it's present it say the value is true for this sub-tag. This tag is used for User Interface generation and for entity model generation. This tag has been created to facilitate OFBiz model integration with Neogia. This feature will be available in generators release 0.8.
help 
string with some words, each word is a sub-tag and if it's present it say the value is true for this sub-tag. This Tag is use for Online Help loookup generation for user interface (i.e : forms generation)

Tag value for associations ends

mandatory 
booleen to say that this attribute is mandatory, use to add this constrain in the entityService
titleAsSuffix 
if value is true, generated attribute will have the title of the association's end as suffix, and no as prefix by default
shortName 
use to build primaryKey Name for associated entity, for Ofbiz compatibility, to avoid field name too long.build (used only when association multiplicity == 1)
addedToOfbiz 
boolean to say if the attribute is added by Neogia to ofbiz schemas
ofbizAttributeName 
to force a generated primaryKey name for associated entity, when shortName is not usable
relationTitle 
to force relation title in the ofbiz entitymodel.xml
defaultValue 
define the defaultValue for drop-down and value set if null is given to service method with actionForm ="add". The tag value is used without transformation to call the setter. So, it must have the java format depending of the attribute type : for string "value", for boolean true or false, for double 0, .. .
noGetterSetter 
if value is true, get and set method are not generated, it's usefull for ofbiz object when ofbiz method exist with an other return type.
GetterSetter
Fix the duplication of the Getter and Setter caused by the standard naming process, this process create a get+Title+EntityName for returning the entity object and if the field defined in entity relation has the same name there are two getter with same Name. The value of the tag will replace the normal formed named by Title+with values.
gui 
(cf above) used for user interface management

Tag value for attributes in entity object :

addedToOfbiz 
boolean to say if the attribute is added by Neogia to ofbiz schemas
readonly 
boolean to say that no setter must be generated
mandatory 
boolean to say that this attribute is mandatory, use to add this constrain in the entityService
primaryKey 
boolean to say that this attribute is one of the primaryKey. (use to defined the parameter list for the constructor and the find method)
noGetterSetter 
if value is true, get and set method are not generated, it's usefull for ofbiz object when ofbiz method exist with an other return type.
ofbizEntityType 
used to give the correct ofbiz entity Type, if it exist the value is used as type in the entitymodel.xml file. For comment and very-long, it's used in the form generation to have textarea (not text). In cas of comment and very-long, you cannot set the gui tag to indexed because the OFBiz entity engine cannot manage indexes on CLOB field type.
staticValue 
used for static-final attribute, give the value of the Attribute.
defaultValue 
define the defaultValue for drop-down and value set if null is given to service method with actionForm ="add". The tag value is used without transformation to call the setter. So, it must have the java format depending of the attribute type : for string "value", for boolean true or false, for double 0, .. .
value 
used to define how attribue value is check or populated.
mask 
not yet implemented
i18n 
The attribute can be populated by a string in multiple language generate link to the content entity and add a icon to be able to enter the multiple value.
versioned 
the value history for this attribute must be manage. For each modification user, date, oldValue, new Value will be store. One additional methodes will be created for the attribute : list getHistory[Attribut]()
format 
to give a format (use for stringwrapping in entry, and for display), currently only active for date, value available are date, time, timestamp.
gui 
string with some words, each word is a sub-tag and if it's present it say the value is true for this sub-tag. This Tag is use for User Interface generation

Tips for generation

Rule for service object modelization

Currently nothing is generated for these objects

Convention or Non supported UML rules

For the object or attribue name the Java rules must be used.