This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.novus.salat.test.model | |
import com.novus.salat._ | |
import com.novus.salat.annotations._ | |
import com.mongodb.casbah.Imports._ | |
case class Bar(email: String) | |
case class Foo[X](jobId: String, bar: Bar, x: Set[X] = Set.empty) { | |
@Persist @Key("_id") val guid = jobId + bar.email | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object Format { | |
import com.typesafe.sbtscalariform.ScalariformPlugin | |
import ScalariformPlugin._ | |
lazy val settings = seq(scalariformSettings: _*) ++ Seq( | |
preferences = formattingPreferences | |
) | |
lazy val formattingPreferences = { | |
import scalariform.formatter.preferences._ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
salat-core:master:0.0.8-SNAPSHOT> test:console | |
[info] Formatting 2 Scala sources {file:/home/rose/workspace/salat/}salat-core(test)... | |
[info] Compiling 2 Scala sources to /home/rose/workspace/salat/salat-core/target/scala-2.8.1.final/test-classes... | |
[info] Starting scala interpreter... | |
[info] | |
Welcome to Scala version 2.8.1.final (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_26). | |
Type in expressions to have them evaluated. | |
Type :help for more information. | |
scala> import com.novus.salat._ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cleanbuild@marzipan:~$ ls -al | |
total 28 | |
drwxr-xr-x 2 cleanbuild cleanbuild 4096 2011-11-08 10:47 . | |
drwxr-xr-x 5 root root 4096 2011-10-25 13:02 .. | |
-rw------- 1 cleanbuild cleanbuild 689 2011-11-08 10:47 .bash_history | |
-rw-r--r-- 1 cleanbuild cleanbuild 220 2011-10-25 13:02 .bash_logout | |
-rw-r--r-- 1 cleanbuild cleanbuild 3353 2011-10-25 13:02 .bashrc | |
-rw-r--r-- 1 cleanbuild cleanbuild 179 2011-10-25 13:02 examples.desktop | |
-rw-r--r-- 1 cleanbuild cleanbuild 797 2011-10-25 13:03 .profile | |
-rw-rw-r-- 1 cleanbuild cleanbuild 0 2011-10-25 13:15 .sbt.cache.lock |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo su - cleanbuild | |
cleanbuild@marzipan:~$ ls -al | |
total 28 | |
drwxr-xr-x 2 cleanbuild cleanbuild 4096 2011-10-25 13:10 . | |
drwxr-xr-x 5 root root 4096 2011-10-25 13:02 .. | |
-rw------- 1 cleanbuild cleanbuild 195 2011-10-25 13:10 .bash_history | |
-rw-r--r-- 1 cleanbuild cleanbuild 220 2011-10-25 13:02 .bash_logout | |
-rw-r--r-- 1 cleanbuild cleanbuild 3353 2011-10-25 13:02 .bashrc | |
-rw-r--r-- 1 cleanbuild cleanbuild 179 2011-10-25 13:02 examples.desktop | |
-rw-r--r-- 1 cleanbuild cleanbuild 797 2011-10-25 13:03 .profile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.novus.salat.test | |
import com.novus.salat.util.encoding.TypeHintEncoding | |
import com.novus.salat.{ TypeHintFrequency, BinaryTypeHintStrategy, Context } | |
package object when_necessary_binary_type_hint_encoding { | |
implicit val ctx = new Context { | |
val name = Some("WhenNecessary-BinaryTypeHint") | |
override val typeHintStrategy = BinaryTypeHintStrategy(when = TypeHintFrequency.WhenNecessary, | |
typeHint = "t", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rose@calisson:~$ sudo su - cb | |
cb@calisson:~$ ls -al | |
total 36 | |
drwxr-xr-x 2 cb cb 4096 2011-09-16 15:02 . | |
drwxr-xr-x 5 root root 4096 2011-01-27 09:07 .. | |
-rw------- 1 cb cb 2599 2011-09-16 15:02 .bash_history | |
-rw-r--r-- 1 cb cb 220 2010-08-10 16:47 .bash_logout | |
-rw-r--r-- 1 cb cb 3353 2010-08-10 16:47 .bashrc | |
-rw-r--r-- 1 cb cb 179 2010-09-15 07:41 examples.desktop |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cb@calisson:~$ ls -al | |
total 40 | |
drwxr-xr-x 3 cb cb 4096 2011-07-26 13:22 . | |
drwxr-xr-x 5 root root 4096 2011-01-27 09:07 .. | |
-rw------- 1 cb cb 1824 2011-07-26 13:22 .bash_history | |
-rw-r--r-- 1 cb cb 220 2010-08-10 16:47 .bash_logout | |
-rw-r--r-- 1 cb cb 3353 2010-08-10 16:47 .bashrc | |
-rw-r--r-- 1 cb cb 179 2010-09-15 07:41 examples.desktop | |
-rw-r--r-- 1 cb cb 675 2010-08-10 16:47 .profile | |
drwxr-xr-x 10 cb cb 4096 2011-01-27 12:22 querulous-generic |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Welcome to Scala version 2.9.0.RC4 (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_24). | |
Type in expressions to have them evaluated. | |
Type :help for more information. | |
scala> case class Foo(x: String) { | |
| def distinctiveMethodName = "Hello" | |
| } | |
defined class Foo | |
scala> val clazz = classOf[Foo] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rose@marzipan:~/workspace/salat/target/scala_2.8.1/test-classes/com/novus/salat/test/model$ scalap -cp . "Maud" | |
package com.novus.salat.test.model | |
@scala.serializable | |
case class Maud(swept : scala.Predef.String, out : scala.Predef.String) extends java.lang.Object with scala.ScalaObject with scala.Product { | |
val swept : scala.Predef.String = { /* compiled code */ } | |
val out : scala.Predef.String = { /* compiled code */ } | |
@com.novus.salat.annotations.raw.Persist | |
val toSea : scala.Predef.String = { /* compiled code */ } | |
def copy(swept : scala.Predef.String, out : scala.Predef.String) : com.novus.salat.test.model.Maud = { /* compiled code */ } | |
override def hashCode() : scala.Int = { /* compiled code */ } |