Created
September 29, 2013 04:09
-
-
Save debop/6749266 to your computer and use it in GitHub Desktop.
This file contains 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 kr.hconnect.core.json | |
import kr.hconnect.core.ValueObjectBase | |
import beans.BeanProperty | |
import kr.hconnect.core.tools.ScalaHash | |
import com.google.common.base.Objects.ToStringHelper | |
/** | |
* 객체를 JSON 직렬화를 수행하여, 그 결과를 저장하려고 할 때 사용한다. | |
* | |
* @author 배성혁 [email protected] | |
* @since 13. 6. 30. 오후 10:17 | |
*/ | |
class JsonTextObject(@BeanProperty var className: String, | |
@BeanProperty var jsonText: String) extends ValueObjectBase { | |
def this() { | |
this(null, null) | |
} | |
def this(src: JsonTextObject) { | |
this(src.getClassName, src.getJsonText) | |
} | |
override def hashCode(): Int = ScalaHash.compute(className, jsonText) | |
override | |
def buildStringHelper: ToStringHelper = | |
super.buildStringHelper | |
.add("className", className) | |
.add("jsonText", jsonText) | |
} | |
object JsonTextObject { | |
val Empty: JsonTextObject = new JsonTextObject() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment