Record Class RepositoryInfo

java.lang.Object
java.lang.Record
io.helidon.data.codegen.common.RepositoryInfo
Record Components:
interfaceInfo - type info
interfacesInfo - implemented interfaces
entityInfo - type of the entity
id - type of the ID

public record RepositoryInfo(TypeInfo interfaceInfo, Map<TypeName,RepositoryInterfaceInfo> interfacesInfo, TypeInfo entityInfo, TypeName id) extends Record
Data repository interface descriptor (info).
  • Constructor Details

  • Method Details

    • entityAlias

      public static String entityAlias(String className)
      Extract entity alias from class name. Returns 1st lowercase letter from className or "e" when no letter was found. Class names like __ are valid so there must be a fallback option.
      Parameters:
      className - entity simple class name (without package)
      Returns:
      entity alias
    • entityAlias

      public static String entityAlias(TypeName typeName)
      Extract entity alias from class name. Returns 1st lowercase letter from typeName or "e" when no letter was found. Class names like __ are valid so there must be a fallback option.
      Parameters:
      typeName - entity type name
      Returns:
      entity alias
    • entity

      public TypeName entity()
      Entity TypeName.
      Returns:
      type name of the entity
    • idName

      public String idName()
      Entity ID attribute.
      Returns:
      name of the Entity ID attribute
    • interfaceNames

      public Set<TypeName> interfaceNames()
      Set of implemented interfaces type names.
      Returns:
      implemented interfaces type names
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • interfaceInfo

      public TypeInfo interfaceInfo()
      Returns the value of the interfaceInfo record component.
      Returns:
      the value of the interfaceInfo record component
    • interfacesInfo

      public Map<TypeName,RepositoryInterfaceInfo> interfacesInfo()
      Returns the value of the interfacesInfo record component.
      Returns:
      the value of the interfacesInfo record component
    • entityInfo

      public TypeInfo entityInfo()
      Returns the value of the entityInfo record component.
      Returns:
      the value of the entityInfo record component
    • id

      public TypeName id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component