@Immutable public final class BambooEntityOid extends Object implements WhitelistedSerializable
Modifier and Type | Field and Description |
---|---|
static int |
SERVER_BITS_MASK |
static int |
SERVER_BITS_NUMBER |
Modifier and Type | Method and Description |
---|---|
static BambooEntityOid |
create(int serverKey,
@NotNull BambooEntityType type,
long entityOid)
Create a new OID object instance based on server key, entity type and entity oid (unique within the server,
within entity type).
|
static BambooEntityOid |
create(long oid)
Create a new OID object instance from it's serialized representation.
|
static BambooEntityOid |
createFromExternalValue(String externalValue) |
boolean |
equals(Object o) |
long |
getEntityOid()
Return unique entity OID from this OID object.
|
@NotNull BambooEntityType |
getEntityType()
Return entity type represented by this OID.
|
int |
getServerKey()
Return server key represented by this OID.
|
long |
getValue()
Returns the serialized representation of this OID object.
|
int |
hashCode() |
static @NotNull BambooEntityOid |
maxOidOfType(int serverKey,
@NotNull BambooEntityType type)
Obtain maximal allowed entity OID for the given server key and entity type.
|
static @NotNull BambooEntityOid |
minOidOfType(int serverKey,
@NotNull BambooEntityType type)
Obtain minimal allowed entity OID for the given server key and entity type.
|
String |
toExternalValue() |
String |
toString() |
public static final int SERVER_BITS_NUMBER
public static final int SERVER_BITS_MASK
public static BambooEntityOid create(long oid)
oid
- serialized OIDIllegalArgumentException
- if the OID is invalidpublic static BambooEntityOid create(int serverKey, @NotNull @NotNull BambooEntityType type, long entityOid)
serverKey
- server keytype
- entity typeentityOid
- OID of this entity within the server and the typeIllegalArgumentException
- if the server key or entity OID are invalidpublic static BambooEntityOid createFromExternalValue(String externalValue)
@NotNull public static @NotNull BambooEntityOid minOidOfType(int serverKey, @NotNull @NotNull BambooEntityType type)
@NotNull public static @NotNull BambooEntityOid maxOidOfType(int serverKey, @NotNull @NotNull BambooEntityType type)
public String toExternalValue()
public int getServerKey()
@NotNull public @NotNull BambooEntityType getEntityType()
public long getEntityOid()
getServerKey()
,
getEntityType()
public long getValue()
Copyright © 2023 Atlassian Software Systems Pty Ltd. All rights reserved.