com.aliyun.openservices.ots.model
类 PrimaryKeyValue

java.lang.Object
  继承者 com.aliyun.openservices.ots.model.PrimaryKeyValue

public class PrimaryKeyValue
extends Object

表示主键(PrimaryKey)列的值。


方法摘要
 boolean equals(Object o)
           
static PrimaryKeyValue fromBoolean(boolean value)
          使用boolean值构造值的数据类型为PrimaryKeyType.BOOLEANPrimaryKeyValue对象。
static PrimaryKeyValue fromLong(long value)
          使用int值构造值的数据类型为PrimaryKeyType.INTEGERPrimaryKeyValue对象。
static PrimaryKeyValue fromString(String value)
          使用String对象构造值的数据类型为PrimaryKeyType.STRINGPrimaryKeyValue对象。
 PrimaryKeyType getType()
          获取值的数据类型。
 String getValue()
          获取值的字符串表示。
 int hashCode()
           
 boolean toBoolean()
          转换为布尔型。
 long toLong()
          转换为长整型。
 String toString()
           
 
从类 java.lang.Object 继承的方法
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

方法详细信息

getValue

public String getValue()
获取值的字符串表示。

返回:
值的字符串表示。

getType

public PrimaryKeyType getType()
获取值的数据类型。

返回:
值的数据类型。

fromString

public static PrimaryKeyValue fromString(String value)
使用String对象构造值的数据类型为PrimaryKeyType.STRINGPrimaryKeyValue对象。 主键的值不能为空引用或长度为0的字符串。

参数:
value - String对象。

fromLong

public static PrimaryKeyValue fromLong(long value)
使用int值构造值的数据类型为PrimaryKeyType.INTEGERPrimaryKeyValue对象。

参数:
value - int值。

fromBoolean

public static PrimaryKeyValue fromBoolean(boolean value)
使用boolean值构造值的数据类型为PrimaryKeyType.BOOLEANPrimaryKeyValue对象。

参数:
value - boolean值。

toString

public String toString()
覆盖:
Object 中的 toString

toLong

public long toLong()
转换为长整型。 当且仅当数据类型为PrimaryKeyType.INTEGER时转换能够成功。

返回:
long值。

toBoolean

public boolean toBoolean()
转换为布尔型。 当且仅当数据类型为PrimaryKeyType.BOOLEAN时转换能够成功。

返回:
boolean值。

equals

public boolean equals(Object o)
覆盖:
Object 中的 equals

hashCode

public int hashCode()
覆盖:
Object 中的 hashCode


Copyright © 2013. All Rights Reserved.