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

public abstract class MyDataEntity extends Object
Common super class for all other MYDATA classes.
Author:
Fraunhofer IESE
  • Constructor Details

    • MyDataEntity

      public MyDataEntity()
  • Method Details

    • fromJson

      public static <T extends MyDataEntity> T fromJson(String json, Class<T> clazz)
      Deserializes an MyDataEntity from JSON.
      Type Parameters:
      T - the generic type (sub class of MyDataEntity)
      Parameters:
      json - the serialized object in JSON notation
      clazz - the generic type (sub class of MyDataEntity)
      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

      public String toJson(boolean pretty)
      Serializes an MyDataEntity to JSON.
      Parameters:
      pretty - if true, pretty printing is enabled
      Returns:
      the JSON serialized MyDataEntity
    • toString

      public String toString()
      Overrides:
      toString in class Object