Skip to content

Instantly share code, notes, and snippets.

@hexx
Created April 21, 2012 10:44
Show Gist options
  • Save hexx/2436548 to your computer and use it in GitHub Desktop.
Save hexx/2436548 to your computer and use it in GitHub Desktop.
gaeds Put and Get Sample
// 共通部分
import com.github.hexx.gaeds.{ Mapper, Property }
import com.github.hexx.gaeds.Property._
// データ定義
class Person(val name: Property[String], val age: Property[Long]) extends Mapper[Person] {
def this() = this("", 0)
}
object Person extends Person
// 保存
val p = new Person("John", 13)
val key = p.put()
// 取得
val p2 = Person.get(key)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment