Wiki source code of Scala Entity.java Template
Last modified by Ravi Mendis on 2009/12/02 00:07
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | This is a basic proof-of-concept Scala template. | ||
| 2 | Scala is supposed to reduce boilerplate and so potentially allows for a better or improved solution. | ||
| 3 | |||
| 4 | {{code}} | ||
| 5 | |||
| 6 | #if ($entity.packageName) | ||
| 7 | package $entity.packageName | ||
| 8 | #end | ||
| 9 | |||
| 10 | import org.apache.log4j.Logger | ||
| 11 | |||
| 12 | class ${entity.classNameWithoutPackage} extends ${entity.superclassPackageName}.${entity.classNameWithoutPackage} { | ||
| 13 | private lazy val logger = Logger.getLogger(this.getClass.getName) | ||
| 14 | } | ||
| 15 | |||
| 16 | object ${entity.classNameWithoutPackage} extends ${entity.superclassPackageName}.${entity.classNameWithoutPackage} { | ||
| 17 | } | ||
| 18 | |||
| 19 | {{/code}} |