Package de.fraunhofer.iese.mydata.common
Class MyDataEntity
java.lang.Object
de.fraunhofer.iese.mydata.common.MyDataEntity
- Direct Known Subclasses:
ActionId,Affiliation,AffiliationId,AuthorizationDecision,BasicManagementServiceComponentInformation,ClientId,ComponentId,DataObject,DecisionId,Event,ExecuteAction,HistoricEventParameter,InfoId,InputParameterDescription,LibraryClient,ManagementServiceComponentInformation,MethodInterfaceDescription,Modifier,ModifierEngine,OauthClientDetails,OAuthCredentials,Parameter,PdpComponentInformation,PepComponentInformation,PepInterfaceDescription,PipComponentInformation,PipRequest,Policy,PolicyId,PxpComponentInformation,Solution,SolutionAccessStatistics,SolutionId,SyncNotification,Timer,TimerId,Timezone,TypeDescription,User,ValueChangeEntity
Common super class for all other MYDATA classes.
- Author:
- Fraunhofer IESE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends MyDataEntity>
TDeserializes an MyDataEntity from JSON.static com.google.gson.GsongetGson()Gets the gson.static com.google.gson.GsongetGson(boolean pretty) toJson(boolean pretty) Serializes an MyDataEntity to JSON.toString()static voidvalidate(MyDataEntity entity, Class<?>... validationGroups) static voidvalidateAndNullCheck(MyDataEntity entity, Class<?>... validationGroups)
-
Constructor Details
-
MyDataEntity
public MyDataEntity()
-
-
Method Details
-
fromJson
Deserializes an MyDataEntity from JSON.- Type Parameters:
T- the generic type (sub class ofMyDataEntity)- Parameters:
json- the serialized object in JSON notationclazz- the generic type (sub class ofMyDataEntity)- Returns:
- the deserialized
MyDataEntity
-
getGson
public static com.google.gson.Gson getGson()Gets the gson.- Returns:
- the gson
-
getGson
public static com.google.gson.Gson getGson(boolean pretty) - Parameters:
pretty-- Returns:
- the serialized entity
-
validate
public static void validate(MyDataEntity entity, Class<?>... validationGroups) throws InvalidEntityException - Parameters:
entity-validationGroups-- Throws:
InvalidEntityException
-
validateAndNullCheck
public static void validateAndNullCheck(MyDataEntity entity, Class<?>... validationGroups) throws InvalidEntityException - Parameters:
entity-validationGroups-- Throws:
InvalidEntityException
-
toJson
Serializes an MyDataEntity to JSON.- Parameters:
pretty- if true, pretty printing is enabled- Returns:
- the JSON serialized
MyDataEntity
-
toString
-