Class Policy

java.lang.Object
de.fraunhofer.iese.mydata.common.MyDataEntity
de.fraunhofer.iese.mydata.policy.Policy

@Entity public class Policy extends MyDataEntity
The Class Policy.
  • Constructor Details

    • Policy

      public Policy()
      Required for JPA.
    • Policy

      public Policy(String content)
      Instantiates a new policy.
      Parameters:
      content - the policy
    • Policy

      @Deprecated public Policy(String content, String description)
      Deprecated.
      the description is part of the xml, use Policy(String) instead
      Instantiates a new policy.
      Parameters:
      policy - the policy
      description - the description
  • Method Details

    • extractId

      public static PolicyId extractId(String policy)
    • isSolutionAndComponentsValid

      public boolean isSolutionAndComponentsValid()
    • isLanguageValid

      public boolean isLanguageValid()
      Returns:
      the languageValid
    • setLanguageValid

      public void setLanguageValid(boolean languageValid)
      Parameters:
      languageValid - the languageValid to set
    • isXmlValid

      public boolean isXmlValid()
    • getContent

      public String getContent()
      Gets the policy.
      Returns:
      the policy
    • setContent

      public void setContent(String p)
      Parameters:
      p - the MYDATA Policy as String
    • doInternalValidation

      public void doInternalValidation()
      Typically used when loading a policy from the db, it checks if it's valid or not
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object