Package com.netscape.certsrv.dbs.certdb
Class CertId
- java.lang.Object
-
- com.netscape.certsrv.dbs.certdb.CertId
-
public class CertId extends java.lang.ObjectThe CertId class represents the identifier for a particular cert record. This identifier may be used to retrieve the cert record from the database.- Version:
- $Revision$ $Date$
- Author:
- Endi S. Dewata
-
-
Field Summary
Fields Modifier and Type Field Description protected java.math.BigIntegervalue
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)inthashCode()java.math.BigIntegertoBigInteger()Converts the CertId into its BigInteger representation.java.lang.StringtoHexString()Converts the CertId into its hex string representation.java.lang.StringtoString()Converts the CertId into its string representation.
-
-
-
Constructor Detail
-
CertId
public CertId(java.lang.String id)
Creates a new CertId from its string representation.- Parameters:
id- a string containing the decimal or hex value for the identifier.
-
CertId
public CertId(java.math.BigInteger id)
Creates a new CertId from its BigInteger representation.- Parameters:
id- a BigInteger containing the identifier.
-
CertId
public CertId(int id)
Creates a new CertId from its integer representation.- Parameters:
id- an integer containing the identifier.
-
-
Method Detail
-
toBigInteger
public java.math.BigInteger toBigInteger()
Converts the CertId into its BigInteger representation.- Returns:
- a BigInteger containing the identifier.
-
toString
public java.lang.String toString()
Converts the CertId into its string representation. The string form can be stored in a database (such as the LDAP directory)- Overrides:
toStringin classjava.lang.Object- Returns:
- a string containing the decimal (base 10) value for the identifier.
-
toHexString
public java.lang.String toHexString()
Converts the CertId into its hex string representation. The string form can be stored in a database (such as the LDAP directory)- Returns:
- a string containing the hex (hex 16) value for the identifier.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
-