Package io.helidon.data.codegen.common
Record Class RepositoryInfo
java.lang.Object
java.lang.Record
io.helidon.data.codegen.common.RepositoryInfo
- Record Components:
interfaceInfo
- type infointerfacesInfo
- implemented interfacesentityInfo
- type of the entityid
- type of the ID
public record RepositoryInfo(TypeInfo interfaceInfo, Map<TypeName,RepositoryInterfaceInfo> interfacesInfo, TypeInfo entityInfo, TypeName id)
extends Record
Data repository interface descriptor (info).
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionRepositoryInfo
(TypeInfo interfaceInfo, Map<TypeName, RepositoryInterfaceInfo> interfacesInfo, TypeInfo entityInfo, TypeName id) Creates an instance of aRepositoryInfo
record class. -
Method Summary
Modifier and TypeMethodDescriptionentity()
EntityTypeName
.static String
entityAlias
(TypeName typeName) Extract entity alias from class name.static String
entityAlias
(String className) Extract entity alias from class name.Returns the value of theentityInfo
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.id()
Returns the value of theid
record component.idName()
Entity ID attribute.Returns the value of theinterfaceInfo
record component.Set
of implemented interfaces type names.Returns the value of theinterfacesInfo
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
RepositoryInfo
public RepositoryInfo(TypeInfo interfaceInfo, Map<TypeName, RepositoryInterfaceInfo> interfacesInfo, TypeInfo entityInfo, TypeName id) Creates an instance of aRepositoryInfo
record class.- Parameters:
interfaceInfo
- the value for theinterfaceInfo
record componentinterfacesInfo
- the value for theinterfacesInfo
record componententityInfo
- the value for theentityInfo
record componentid
- the value for theid
record component
-
-
Method Details
-
entityAlias
Extract entity alias from class name. Returns 1st lowercase letter fromclassName
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
Extract entity alias from class name. Returns 1st lowercase letter fromtypeName
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
EntityTypeName
.- Returns:
- type name of the entity
-
idName
Entity ID attribute.- Returns:
- name of the Entity ID attribute
-
interfaceNames
Set
of implemented interfaces type names.- Returns:
- implemented interfaces type names
-
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. -
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. -
equals
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 withObjects::equals(Object,Object)
. -
interfaceInfo
Returns the value of theinterfaceInfo
record component.- Returns:
- the value of the
interfaceInfo
record component
-
interfacesInfo
Returns the value of theinterfacesInfo
record component.- Returns:
- the value of the
interfacesInfo
record component
-
entityInfo
Returns the value of theentityInfo
record component.- Returns:
- the value of the
entityInfo
record component
-
id
Returns the value of theid
record component.- Returns:
- the value of the
id
record component
-