@Embeddable public class ComponentId extends Ind2uceEntity
| Modifier and Type | Field and Description |
|---|---|
static Pattern |
URN_COMPONENT_PATTERN
The pattern of a component ID.
|
GSON_DEFAULT, GSON_PLAIN, GSON_PRETTY, version| Constructor and Description |
|---|
ComponentId()
Parameterless constructor is required for JPA.
|
ComponentId(ComponentType type)
Generates a random ID for the given component type.
|
ComponentId(String id)
Instantiates a new component id.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
ComponentType |
getComponentType()
Gets the component type.
|
String |
getId()
Gets the id.
|
String |
getIdentifier()
Gets the identifier.
|
String |
getScope()
Gets the scope.
|
ComponentType |
getType()
Gets the type.
|
int |
hashCode() |
void |
setComponentType(ComponentType componentType)
Sets the component type.
|
void |
setIdentifier(String identifier)
Sets the identifier.
|
void |
setScope(String scope)
Sets the scope.
|
String |
toString() |
protected void |
validate(String uri)
Validates a string with respect to the URN_COMPONENT_PATTERN.
|
fromJson, getGson, getVersion, toJsonpublic static final Pattern URN_COMPONENT_PATTERN
public ComponentId()
public ComponentId(ComponentType type)
type - The component type for which the ID is intended.public ComponentId(String id)
id - the idpublic ComponentType getComponentType()
public String getId()
public String getIdentifier()
public String getScope()
public ComponentType getType()
public void setComponentType(ComponentType componentType)
componentType - the new component typepublic void setIdentifier(String identifier)
identifier - the new identifierpublic void setScope(String scope)
scope - the new scopepublic String toString()
toString in class Ind2uceEntityprotected void validate(String uri)
uri - the uriCopyright © 2018. All rights reserved.