Class OpenId
-
- All Implemented Interfaces:
DataObject,Serializable
public final class OpenId extends AbstractFieldsObject
Represents the value of an identifier field that's associated with an open type. Originally generated from the following ASN.1.OpenId ::= CHOICE { local INTEGER, global OBJECT IDENTIFIER, ... }- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classOpenId.ChoiceAPI for the choice's discriminant.
-
Field Summary
-
Fields inherited from class com.opencloud.util.AbstractFieldsObject
FIELD_ABSENT, FIELD_UNINITIALISED
-
-
Constructor Summary
Constructors Constructor Description OpenId()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckFieldsSet()Checks that all mandatory fields are present.OpenIdclone()Constructs a copy of this object and everything reachable from it.static OpenIdcopyOf(OpenId from)Creates a new object of this type, initialising its field values from those of the given object.OpenId.ChoicegetChoice()Gets the discriminant of the current choice.static FieldAccessor[]getFieldAccessors()Gets a new array of the accessors for fields of this type.Map<String,Object>getFieldsMap(boolean withAbsents)Gets a Map from :discriminant-name to associated-value.ObjectIDgetGlobal()Gets the value of the global choice.longgetLocal()Gets the value of the local choice.booleanisGlobalChosen()Tests whether the choice is global.booleanisLocalChosen()Tests whether the choice is local.protected voidsetChoice(OpenId.Choice arg)Sets the discriminant of the current choice.OpenIdsetGlobal(ObjectID value)Sets the value of the global choice.OpenIdsetLocal(long value)Sets the value of the local choice.-
Methods inherited from class com.opencloud.util.AbstractFieldsObject
equals, hashCode, toString
-
Methods inherited from class com.opencloud.util.AbstractDataObject
checkModify, isReadOnly, setReadOnly
-
-
-
-
Method Detail
-
checkFieldsSet
public void checkFieldsSet() throws EncodeFailedExceptionChecks that all mandatory fields are present.- Throws:
EncodeFailedException- if any mandatory field is not present
-
clone
public OpenId clone()
Constructs a copy of this object and everything reachable from it.- Specified by:
clonein interfaceDataObject- Specified by:
clonein classAbstractDataObject- Returns:
- copy of object
-
copyOf
public static OpenId copyOf(OpenId from)
Creates a new object of this type, initialising its field values from those of the given object.- Parameters:
from- the object from which to copy- Returns:
- new OpenId
-
getChoice
public OpenId.Choice getChoice()
Gets the discriminant of the current choice.- Returns:
- the current discriminant
-
getFieldAccessors
public static FieldAccessor[] getFieldAccessors()
Gets a new array of the accessors for fields of this type.- Returns:
- FieldAccessor[]
-
getFieldsMap
public Map<String,Object> getFieldsMap(boolean withAbsents)
Gets a Map from :discriminant-name to associated-value. For a value of primitive type, the value is boxed. If choice is not set, returns a map from : to AbstractFieldsObject.FIELD_UNINITIALISED.- Specified by:
getFieldsMapin classAbstractFieldsObject- Parameters:
withAbsents- ignored, as value cannot be optional- Returns:
- Map from :discriminant-name to associated-value
-
getGlobal
public ObjectID getGlobal()
Gets the value of the global choice.- Returns:
- value of the choice, if choice is global, else null
-
getLocal
public long getLocal()
Gets the value of the local choice.- Returns:
- value of the choice, if choice is local
-
isGlobalChosen
public boolean isGlobalChosen()
Tests whether the choice is global.- Returns:
- true if chosen, false if not
-
isLocalChosen
public boolean isLocalChosen()
Tests whether the choice is local.- Returns:
- true if chosen, false if not
-
setChoice
protected void setChoice(OpenId.Choice arg)
Sets the discriminant of the current choice.- Parameters:
arg- the new discriminant
-
setGlobal
public OpenId setGlobal(ObjectID value)
Sets the value of the global choice.- Parameters:
value- the new value for the choice- Returns:
- this
-
setLocal
public OpenId setLocal(long value)
Sets the value of the local choice.- Parameters:
value- the new value for the choice- Returns:
- this
-
-