Wednesday 25 February 2015

Oracle Sales Cloud Groovy Tips and Tricks : Data Types

Data Types are the fundamentals for any programming language. Since groovy is a programming language for the Java platform, it is following java syntax. Since it is a scripting language, we can achieve more by writing less lines of codes.

In Java:-

Primitive Data Types:-

Data Type
Size
Range
Usage in Real world
byte
8-bit
minimum value of -128 and a maximum value of 127 (inclusive)
byte b= 127;
System.out.println(b); will print 127

short
16- bit
-32,768 and a maximum value of 32,767 (inclusive)

int
 32-bit 
-231 and a maximum value of 231-1

long
 64-bit
 -263 and a maximum value of 263-1

float
32-bit IEEE 754 floating point


double
64-bit IEEE 754 floating point


boolean
1-bit
The boolean data type has only two possible values: true and false

char
16-bit Unicode character
'\u0000' (or 0) and a maximum value of '\uffff' (or 65,535 inclusive).



Data Type
Default Value
byte
0
short
0
int
long
 0L
float
0.0f
double
0.0d
boolean
false
char
'\u0000'






Oracle Sales Cloud Groovy Tips and Tricks

Today I will help you to understand Oracle Sales Cloud Groovy.

What is groovy? 

Groovy is an object-oriented programming language for the Java platform. It is also a standard, dynamic scripting language. The scripts will be dynamically compiled to Java Virtual Machine (JVM) bytecode and executes.

Oracle Sales Cloud application is built by using ADF framework and which supports groovy. CRM Application Composer(Also built by using ADF) provides deep support for Groovy to programmatically manipulate data and other UI components.

Please note that you cannot use all the Java APIs available in the web. There are restrictions due to security issues, So refer to the 'Supported Groovy Classes and Methods' section in groovy manual provided by Oracle before you start.

Reference Documents:-

1. http://docs.oracle.com/cloud/latest/salescs_gs/salescs_customize.htm
2. http://docs.oracle.com/cloud/latest/salescs_gs/CGSAC/index.html