Class AbstractPojoRawTypeModel<T,I extends PojoBootstrapIntrospector>
- java.lang.Object
-
- org.hibernate.search.mapper.pojo.model.spi.AbstractPojoRawTypeModel<T,I>
-
- All Implemented Interfaces:
MappableTypeModel
,PojoRawTypeModel<T>
,PojoTypeModel<T>
- Direct Known Subclasses:
AbstractPojoHCAnnRawTypeModel
public abstract class AbstractPojoRawTypeModel<T,I extends PojoBootstrapIntrospector> extends Object implements PojoRawTypeModel<T>
-
-
Field Summary
Fields Modifier and Type Field Description protected I
introspector
protected PojoRawTypeIdentifier<T>
typeIdentifier
-
Constructor Summary
Constructors Constructor Description AbstractPojoRawTypeModel(I introspector, PojoRawTypeIdentifier<T> typeIdentifier)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description PojoCaster<T>
caster()
<U> Optional<PojoTypeModel<? extends U>>
castTo(Class<U> target)
protected abstract PojoPropertyModel<?>
createPropertyModel(String propertyName)
Collection<PojoPropertyModel<?>>
declaredProperties()
protected abstract Stream<String>
declaredPropertyNames()
boolean
equals(Object o)
int
hashCode()
String
name()
PojoPropertyModel<?>
property(String propertyName)
String
toString()
PojoRawTypeIdentifier<T>
typeIdentifier()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.hibernate.search.engine.mapper.model.spi.MappableTypeModel
isAbstract, isSubTypeOf
-
Methods inherited from interface org.hibernate.search.mapper.pojo.model.spi.PojoRawTypeModel
annotations, ascendingSuperTypes, cast, descendingSuperTypes, rawType
-
-
-
-
Field Detail
-
introspector
protected final I extends PojoBootstrapIntrospector introspector
-
typeIdentifier
protected final PojoRawTypeIdentifier<T> typeIdentifier
-
-
Constructor Detail
-
AbstractPojoRawTypeModel
public AbstractPojoRawTypeModel(I introspector, PojoRawTypeIdentifier<T> typeIdentifier)
-
-
Method Detail
-
equals
public final boolean equals(Object o)
- Specified by:
equals
in interfaceMappableTypeModel
- Overrides:
equals
in classObject
- Returns:
true
ifobj
is aMappableTypeModel
referencing the exact same type with the exact same exposed metadata.
-
hashCode
public final int hashCode()
- Specified by:
hashCode
in interfaceMappableTypeModel
- Overrides:
hashCode
in classObject
-
toString
public final String toString()
- Specified by:
toString
in interfaceMappableTypeModel
- Overrides:
toString
in classObject
- Returns:
- A human-readable description of this type.
-
typeIdentifier
public final PojoRawTypeIdentifier<T> typeIdentifier()
- Specified by:
typeIdentifier
in interfacePojoRawTypeModel<T>
- Returns:
- The identifier for this type.
-
name
public final String name()
- Specified by:
name
in interfaceMappableTypeModel
- Specified by:
name
in interfacePojoTypeModel<T>
- Returns:
- A human-readable name for this type.
-
property
public final PojoPropertyModel<?> property(String propertyName)
- Specified by:
property
in interfacePojoTypeModel<T>
-
declaredProperties
public final Collection<PojoPropertyModel<?>> declaredProperties()
- Specified by:
declaredProperties
in interfacePojoRawTypeModel<T>
-
caster
public final PojoCaster<T> caster()
- Specified by:
caster
in interfacePojoRawTypeModel<T>
-
castTo
public <U> Optional<PojoTypeModel<? extends U>> castTo(Class<U> target)
- Specified by:
castTo
in interfacePojoTypeModel<T>
- Type Parameters:
U
- The type to cast to.- Parameters:
target
- The type to cast to.- Returns:
- A new type model, representing the current type cast to the given type,
or
Optional.empty()
if casting is not supported. The type model will retain as much contextual type information as possible (type arguments, ...), so castingList<Integer>
toCollection
for example would returnCollection<Integer>
.
-
createPropertyModel
protected abstract PojoPropertyModel<?> createPropertyModel(String propertyName)
-
-