Changes for page WebObjects with Scala
Last modified by Ravi Mendis on 2011/05/10 02:10
From version 357.1
edited by Ravi Mendis
on 2009/10/13 23:38
on 2009/10/13 23:38
Change comment:
There is no comment for this version
To version 354.1
edited by Ravi Mendis
on 2009/10/13 21:35
on 2009/10/13 21:35
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -47,10 +47,8 @@ 47 47 Scala doesn't have static variables or methods. However, a class can have a //Companion Object// that will allow you to achieve something equivalent to static variables. 48 48 One of the advantages of this approach is that it is **thread-safe**, so you don't have to worry about synchronizing access to these fields in a concurrent application. 49 49 50 - The followingis an example of the use of a //Companion Object// for Talent in Scala instead of static fields inJava.50 +In Java: 51 51 52 -Java: 53 - 54 54 {{code}} 55 55 56 56 public class _Talent extends EOGenericRecord { ... ... @@ -58,7 +58,7 @@ 58 58 59 59 {{/code}} 60 60 61 -Scala: 59 +In Scala: 62 62 63 63 {{code}} 64 64 ... ... @@ -202,8 +202,10 @@ 202 202 203 203 ==== EO Templates ==== 204 204 203 +See: [[Scala templates>>http://wiki.objectstyle.org/confluence/display/WOL/EOGenerator+Templates+and+Additions]] 204 + 205 205 When you create your ##.eogen## file, be sure to make the following changes in the EOGenerator Editor: 206 206 207 -1. Point to the local [[Scala versions>>http://wiki.objectstyle.org/confluence/display/WOL/EOGenerator+Templates+and+Additions]]ofthe .eotemplate files for ##Entity## and ##//Entity//##207 +1. Point to the local .eotemplate files for ##Entity## and ##//Entity//## 208 208 1. Change the File Names Extension to "scala" 209 209 1. Uncheck Java under Options