TWiki
>
WebXEO Web
>
XeoPrimer
>
XeoPrimerObjectModelReference
(revision 2) (raw view)
Edit
Attach
Tags:
tag this topic
create new tag
,
view all tags
-- Main.PedroRio - 30 Jan 2011 ---+ XEO Object Model Reference This section is a reference of all options regarding the creation of a XEO Object Model and it's divided in five (5) parts: 1 General Model properties 1 Attributes 1 OPL 1 Events 1 Methods ---++ General Model Properties In XEO Studio, while editing the general properties of an Object Model, you'll see the following (depicted in figure ModelRef.1) <img width="768" alt="" src="%ATTACHURL%/General.png" height="896" /> __Figure ModelRef.1 - General Properties Editing for an Object Model.__ Reference of XEO Model General Properties ---++++++ 1 - Name The name of the XEOModel, this name must be equal to the name of file. This is name that's used when referencing this XEO Model from other XEO Models (like when creating collection attributes, or relation attributes) or the name to be used in XEOQL expressions. ---++++++ 2 - Type The type of the XEO Model. There are three different types of XEO Models: * Object * Abstract * Interface The most common type is "Object", which allows you to create instances of the given Model. The "abstract" type represents an abstract Model (much like an abstract class in Java) which allows you to define a set of attributes, events, etc... which you can later reuse in concrete (i.e. type "Object") XEO Models. The Interface type, represents an interface which Models can implement, therefore inheriting all of their attributes and becoming of that type (i.e. if Model A implements interface B, issuing a XEOQL expression of "select B" will return all instances of A, along will all other instances of Models that implement B). You cannot create instances of Models that are either Interface or Abstract. ---++++++ 3 - Orphan Determines whether instances of this Model are Orphans or not ( [[XeoPrimerConcepts#orphanConcept][recall from the XEO Concepts]]). An orphan instance is one that can exist by it self, while a non-orphan instance is one that can only exist with a parent instance. Think of an invoice and an invoice line, it only makes sense for an invoice line to exist if it's inside an invoice. While a Model can be declared an Orphan/Non-Orphan using this property, relations between Models can also change that situation. __See in Attributes__. ---++++++ 4 - Extends Any Model can extend other Model (single inheritance), inheriting it's attributes, events and methods. Any of those attributes, events and methods can be redefined in the extending Model. In this property you choose the name of the Model to extend. ---++++++ 5 - Description A description of the Model, serves as documentation. ---++++++ 6 - Label A label for the Model, it's used throught the application in places such as the "New OBJECT_LABEL" menu in toolbars, when a label of the Object Model is displayed. ---++++++ 7 - Mastertable __Not quite sure, what this does yet.__ _ ---++++++ 8 - CardID The CardID of an Object Model is a way to identify it's instances. The name CardID derives from the idea of an Identification Card (or Business Card) that people have. For a person you normally have their name, phone number, e-mail, etc. The CardID property is declared using a syntax which allows to refer to the instance's attributes to compose an "Identification Card" for that particular instance. For example, if Object Model "A" has attributes _name_, _task_ and _age_ and you use the following expression for the CardID: <pre><verbatim>[name] is a [task]</verbatim> </pre> And and instance has the following values for the name, task and description attributes (respectively): "John Smith", "Manager", "30". The CardID for that instance will be: <verbatim>John Smith is a Manager</verbatim> If you use the following CardID declaration: <verbatim>[name] : [age]</verbatim> The same instance would have the following CardID. <verbatim>John Smith : 30</verbatim> *Important*: * <strong>The CardID for each instance is a calculated value. It's not stored persitently, as such you can change it as many times as you want while building your application.<br /></strong> * <strong>The syntax for a CardID expression is basically the name of an Object Model attribute inside square brackets to refer to their value. Any other character will be interpreted as a literal text.<br /></strong> _ ---++++++ 9 - Extends Java Every Object Model is converted to a Java class that extends from the netgest.bo.runtime.boObject class. It's possible to make it that the generated Object Model extends from a different class (which, however, must extend from the boObject class), in order to do processing of something in a different way. In order to use that class as the base for the Object Model you'll need to type the fully qualified name of that class. _ ---++++++ 10 - Implemented Interfaces A list of all the implemented interfaces by the current Model. An Object Model can declare that it implements any number of interfaces (and will inherit all of their attributes and events). ---++++++ 11 - Versioning Activates versioning for the current Object Model. Whenever an instance of the current Model is saved, if any of its attributes are changed, a new version of the instances is created. The list of versions of a given instance can be seen in an edit viewer of the instance if the <em>renderListVersionBtn </em>property of the [[EditToolBar][editToolBar]] component is true, in that viewer. __In order to have acess....__ 12 - TextIndex 13 - Locale 14 - Database Manager ---++ Attributes a OPL a Events a Methods a
Attachments
Attachments
Topic attachments
I
Attachment
Action
Size
Date
Who
Comment
png
General.png
manage
34.3 K
2011-01-30 - 15:25
PedroRio
Edit
|
Attach
|
P
rint version
|
H
istory
:
r18
|
r4
<
r3
<
r2
<
r1
|
B
acklinks
|
V
iew topic
|
Raw edit
|
More topic actions...
Topic revision: r2 - 2011-01-31
-
PedroRio
WebXEO
XEO Primer
-
Instalation
-
Introduction
-
Concepts
-
Architecture
-
XEO Library
-
Deploy to EAR
-
PreferenceStore
XEO - Core
-
XEO Model Reference
-
Security
-
Java API
-
BOL
-
XEOQL (BOQL)
-
Administrating
-
Background Tasks
-
boConfig.xml
-
Web.xml
-
Known Issues
-
XEO Flags
XEO - XWC
- Web Components
- Java Samples
- Custom Components
- Component Plugins
- Internationalization
- Viewer Events
- Value Change Listeners
- XUIServlet
- XeoLocalization
- XvwTemplates
Create New Topic
WebXEO Web
No permission to view
TWiki.WebTopBar
No permission to view
TWiki.WebBottomBar