package org.openspaces.scala.example.data
import scala.beans.BeanProperty
/*
* This imports enhanced space annotations such as @SpaceId, @SpaceRouting, etc...
* with a @beanGetter annotation attached to them so annotations will be attached to the generated getter method.
*/
import org.openspaces.scala.core.aliases.annotation._
/**
* Data properties should be inferred from the constructor.
* This allows the pojo properties to remain immutable as demonstrated below.
*/
case class Data @SpaceClassConstructor() (
@BeanProperty
@SpaceId
@SpaceProperty(nullValue = "-1")
id: Long = -1,
@BeanProperty
@SpaceRouting
@SpaceProperty(nullValue = "-1")
routing: Long = -1,
@BeanProperty
data: String = null
)