Interface PojoRawTypeModel<T>
- Type Parameters:
T- The pojo type
- All Superinterfaces:
MappableTypeModel,PojoTypeModel<T>
- All Known Implementing Classes:
AbstractPojoHCAnnRawTypeModel,AbstractPojoRawTypeModel,PojoSimpleHCAnnRawTypeModel
A
PojoTypeModel 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 as ArrayList<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 the Class only.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionStream<? extends PojoRawTypeModel<? super T>>PojoTypeModel<? extends T>cast(PojoTypeModel<?> other) caster()constructor(Class<?>... parameterTypes) Stream<? extends PojoRawTypeModel<? super T>>default PojoRawTypeModel<T>rawType()Methods inherited from interface org.hibernate.search.engine.mapper.model.spi.MappableTypeModel
equals, hashCode, isAbstract, isSubTypeOf, name, toStringMethods inherited from interface org.hibernate.search.mapper.pojo.model.spi.PojoTypeModel
arrayElementType, castTo, equals, hashCode, name, property, toString, typeArgument
-
Method Details
-
rawType
- Specified by:
rawTypein interfacePojoTypeModel<T>- Returns:
this.
-
typeIdentifier
PojoRawTypeIdentifier<T> typeIdentifier()- Returns:
- The identifier for this type.
-
ascendingSuperTypes
Stream<? extends PojoRawTypeModel<? super T>> ascendingSuperTypes()- Specified by:
ascendingSuperTypesin interfaceMappableTypeModel- Returns:
- The supertypes of the current type, in ascending order.
-
descendingSuperTypes
Stream<? extends PojoRawTypeModel<? super T>> descendingSuperTypes()- Specified by:
descendingSuperTypesin interfaceMappableTypeModel- Returns:
- The supertypes of the current type, in descending order.
-
annotations
Stream<Annotation> annotations()- Returns:
- All annotations on this specific type (non-inherited annotations from supertype are excluded).
-
mainConstructor
PojoConstructorModel<T> mainConstructor()- Returns:
- The main constructor of this type. The main constructor only exists if this type defines a single constructor.
- Throws:
SearchException- If there is no main constructor for this type.
-
constructor
- Parameters:
parameterTypes- The type of parameters to the returned constructor.- Returns:
- The constructor of this type whose parameters have the given
parameterTypes. - Throws:
SearchException- If there is no constructor with parameters of the given types.
-
declaredConstructors
Collection<PojoConstructorModel<T>> declaredConstructors()- Returns:
- All accessible constructors of this type.
-
declaredProperties
Collection<PojoPropertyModel<?>> declaredProperties()- Returns:
- All declared properties of this type.
-
cast
- 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 model will retain as much contextual type information as possible (type arguments, ...), so castingList<Integer>toCollectionfor example would returnCollection<Integer>.
-
caster
PojoCaster<T> caster()- Returns:
- A
PojoCastertargeting this type.
-