Class AffiliationId
- java.lang.Object
-
- de.fraunhofer.iese.mydata.common.MyDataEntity
-
- de.fraunhofer.iese.mydata.affiliation.AffiliationId
-
- All Implemented Interfaces:
Serializable
@Embeddable public class AffiliationId extends MyDataEntity implements Serializable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AffiliationId()default constructorAffiliationId(@NonNull String urnOrIdentifier)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)StringgetIdentifier()inthashCode()voidsetUrn(@NonNull String urnOrIdentifier)StringtoString()-
Methods inherited from class de.fraunhofer.iese.mydata.common.MyDataEntity
fromJson, getGson, getGson, toJson, validate, validateAndNullCheck
-
-
-
-
Constructor Detail
-
AffiliationId
public AffiliationId()
default constructor
-
AffiliationId
public AffiliationId(@NonNull @NonNull String urnOrIdentifier)- Parameters:
urnOrIdentifier- will be set to the urn if starts with "urn:affiliation:", else the prefix will be add and set as urn
-
-
Method Detail
-
setUrn
public void setUrn(@NonNull @NonNull String urnOrIdentifier)- Parameters:
urnOrIdentifier- will be set to the urn if starts with "urn:affiliation:", else the prefix will be add and set as urn
-
getIdentifier
public String getIdentifier() throws InvalidEntityException
- Returns:
- the identifier part (without urn:affiliation) of this affiliationid
- Throws:
InvalidEntityException- in case of an invalid affiliationid
-
toString
public String toString()
- Overrides:
toStringin classMyDataEntity
-
-