Interface PojoRawTypeModel<T>
-
- Type Parameters:
T
- The pojo type
- All Superinterfaces:
MappableTypeModel
,PojoTypeModel<T>
- All Known Implementing Classes:
AbstractPojoHCAnnRawTypeModel
,AbstractPojoRawTypeModel
public interface PojoRawTypeModel<T> extends PojoTypeModel<T>, MappableTypeModel
APojoTypeModel
representing a raw type, where generic type parameters are ignored.This excludes in particular parameterized types such as
ArrayList<Integer>
, because we cannot tell the difference between instances of such types and instances of the same type with different parameters, such asArrayList<String>
. Thus the mapper would be unable to find which mapping to use when indexing such an instance, and it would be impossible to target the index from theClass
only.- See Also:
PojoTypeModel
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Stream<Annotation>
annotations()
Stream<? extends PojoRawTypeModel<? super T>>
ascendingSuperTypes()
PojoTypeModel<? extends T>
cast(PojoTypeModel<?> other)
PojoCaster<T>
caster()
Collection<PojoPropertyModel<?>>
declaredProperties()
Stream<? extends PojoRawTypeModel<? super T>>
descendingSuperTypes()
default PojoRawTypeModel<T>
rawType()
PojoRawTypeIdentifier<T>
typeIdentifier()
-
Methods inherited from interface org.hibernate.search.engine.mapper.model.spi.MappableTypeModel
equals, hashCode, isAbstract, isSubTypeOf, name, toString
-
Methods inherited from interface org.hibernate.search.mapper.pojo.model.spi.PojoTypeModel
castTo, name, property
-
-
-
-
Method Detail
-
rawType
default PojoRawTypeModel<T> rawType()
- Specified by:
rawType
in interfacePojoTypeModel<T>
- Returns:
this
.
-
typeIdentifier
PojoRawTypeIdentifier<T> typeIdentifier()
- Returns:
- The identifier for this type.
-
ascendingSuperTypes
Stream<? extends PojoRawTypeModel<? super T>> ascendingSuperTypes()
- Specified by:
ascendingSuperTypes
in interfaceMappableTypeModel
- Returns:
- The supertypes of the current type, in ascending order.
-
descendingSuperTypes
Stream<? extends PojoRawTypeModel<? super T>> descendingSuperTypes()
- Specified by:
descendingSuperTypes
in interfaceMappableTypeModel
- Returns:
- The supertypes of the current type, in descending order.
-
annotations
Stream<Annotation> annotations()
-
declaredProperties
Collection<PojoPropertyModel<?>> declaredProperties()
-
cast
PojoTypeModel<? extends T> cast(PojoTypeModel<?> other)
- Parameters:
other
- The type to cast to this type.- Returns:
- A new type model, representing the given type cast to this type.
If casting is not possible, returns
this
. If casting is possible, the returned type type model will retain as much contextual type information as possible (type arguments, ...), so castingList<Integer>
toCollection
for example would returnCollection<Integer>
.
-
caster
PojoCaster<T> caster()
-
-