com.aliyun.openservices.ots.model
类 PrimaryKeyValue

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

public class PrimaryKeyValue
extends Object

表示主键(PrimaryKey)列的值。


字段摘要
static PrimaryKeyValue INF_MAX
          表示主键值范围的最大值。
static PrimaryKeyValue INF_MIN
          表示主键值范围的最小值。
 
方法摘要
 long asLong()
          转换为长整型。
 String asString()
           
 boolean equals(Object o)
           
static PrimaryKeyValue fromLong(long value)
          使用int值构造值的数据类型为PrimaryKeyType.INTEGER的 PrimaryKeyValue对象。
static PrimaryKeyValue fromString(String value)
          使用String对象构造值的数据类型为PrimaryKeyType.STRING的 PrimaryKeyValue对象。
 PrimaryKeyType getType()
          获取值的数据类型。
 int hashCode()
           
 String toString()
           
 
从类 java.lang.Object 继承的方法
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

字段详细信息

INF_MAX

public static final PrimaryKeyValue INF_MAX
表示主键值范围的最大值。


INF_MIN

public static final PrimaryKeyValue INF_MIN
表示主键值范围的最小值。

方法详细信息

getType

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

返回:
值的数据类型。

fromString

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

参数:
value - String对象。

fromLong

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

参数:
value - int值。

asString

public String asString()

asLong

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

返回:
long值。

equals

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

hashCode

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

toString

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


Copyright © 2014. All Rights Reserved.