TWiki
>
WebXEO Web
>
XeoPrimer
>
XeoPrimerBOL
(revision 2) (raw view)
Edit
Attach
Tags:
tag this topic
create new tag
,
view all tags
-- Main.PedroRio - 21 Dec 2010 ---+ Business Object Language (BOL) The Business Object Language is a small expression language to help define conditions for the behavior in XEO Object Models. It allows to reference attribute values, compare them with other values as well as making small calculations ---+++ Attributes Object Model attributes can be referenced in BOL expressions by their name, for example if you want to build the follwing: "If the value of attribute X is bigger than 5, return true" the bol expression would be "if (x > 5) return true". This syntax works for attributes that are not Collection nor Object. For Object attribute you can refer to their simple attributes by doing attributeObjectName.simpleAttributeName. If you have A ---+++ Functions __DATE FUNCTIONS__ NOW - Devolve a data do tipo DD-MM-AAAA (21-12-2010 a 21 de Dezembro de 2010) TODAY - Devolve de hoje só com a data (ignora o tempo) NOW_HOURS - Devolve a data de hoje com as horas, (ignora minutos e segundos) NOW_MINUTES - Devolve a data de hoje com as horas e minutos (ignora os segundos) --- __NUMBER FUNCTIONS__ ROUND - ROUND(Number) - Arredonda o número para o inteiro mais proximo (0.4 -> 0; 0.5 -> 1) --- __CONCAT (Concatena 2 valores)__ <em><strong><br /></strong></em> * CONCAT(String,String) * CONCAT (Number,Number) - Number pode ser long/int * CONCAT (Object,Object) - Concatena tudo como strings (Object.toString()) --- __TO_DATE (Devolve um Date em Java)__ * TO_DATE(Date, Format) * TO_DATE (Object, Format), neste caso o Object é convertido em String * TO_DATE (long, Format) O <em>Format </em>tem de ser algo que o SimpleDateFormatter do java entenda, senão não devolve resultado (nem estoira) O primeiro argumento pode ser (NOW, TODAY, NOW_MINUTES, NOW_HOURS) --- __SUM__ * SUM ( Number , Number ) * SUM (Object , Object) - Converts the Object to String --- __SUBTRACT__ * SUBTRACT (Number, Number) * SUBTRACT (Object, Object) - Converts the Object to String --- __DIFF_IN_DAYS__ * <span style="white-space: pre;">DIFF_IN_DAYS</span> (Date, Date) * <span style="white-space: pre;">DIFF_IN_DAY</span> (Date, Long) * DIFF_IN_DAY (Long, Date) * DIFF_IN_DAY (Long, Long) Pode-se ter por exemplo DIFF_IN_DAYS (NOW, TO_DATE('DATA_FORMATADA','dd/MM/yyyy')) --- DIFF_IN_UTIL_DAYS __IS_NULL (Verifica se um dado valor é null)__ Funciona para todos os tipos de attributos excepto collection. addErrorMessage - Não funciona. aaa
Edit
|
Attach
|
P
rint version
|
H
istory
:
r12
|
r4
<
r3
<
r2
<
r1
|
B
acklinks
|
V
iew topic
|
Raw edit
|
More topic actions...
Topic revision: r2 - 2010-12-22
-
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