Class PolicyDTO

java.lang.Object
org.apache.gravitino.dto.policy.PolicyDTO
All Implemented Interfaces:
Auditable, Policy

public class PolicyDTO extends Object implements Policy
Represents a Policy Data Transfer Object (DTO).
  • Method Details

    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object
    • builder

      public static PolicyDTO.Builder builder()
      Returns:
      a new builder for constructing a PolicyDTO.
    • name

      public String name()
      Description copied from interface: Policy
      Get the name of the policy.
      Specified by:
      name in interface Policy
      Returns:
      The name of the policy.
    • policyType

      public String policyType()
      Description copied from interface: Policy
      Get the type of the policy.
      Specified by:
      policyType in interface Policy
      Returns:
      The type of the policy.
    • comment

      public String comment()
      Description copied from interface: Policy
      Get the comment of the policy.
      Specified by:
      comment in interface Policy
      Returns:
      The comment of the policy.
    • enabled

      public boolean enabled()
      Description copied from interface: Policy
      Whether the policy is enabled or not.
      Specified by:
      enabled in interface Policy
      Returns:
      True if the policy is enabled, false otherwise.
    • content

      public PolicyContentDTO content()
      Description copied from interface: Policy
      Get the content of the policy.
      Specified by:
      content in interface Policy
      Returns:
      The content of the policy.
    • inherited

      public Optional<Boolean> inherited()
      Description copied from interface: Policy
      Check if the policy is inherited from a parent object or not.

      Note: The return value is optional, Only when the policy is associated with a metadata object, and called from the metadata object, the return value will be present. Otherwise, it will be empty.

      Specified by:
      inherited in interface Policy
      Returns:
      True if the policy is inherited, false if it is owned by the object itself. Empty if the policy is not associated with any object.
    • auditInfo

      public AuditDTO auditInfo()
      Specified by:
      auditInfo in interface Auditable
      Returns:
      The audit information of the entity.