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 -
Constructor Summary
ConstructorsConstructorDescriptionAbstractPojoRawTypeModel
(I introspector, PojoRawTypeIdentifier<T> typeIdentifier) -
Method Summary
Modifier and TypeMethodDescriptionPojoTypeModel<? extends T>
cast
(PojoTypeModel<?> other) final PojoCaster<T>
caster()
<U> Optional<PojoTypeModel<? extends U>>
final PojoConstructorModel<T>
constructor
(Class<?>... parameterTypes) protected abstract List<PojoConstructorModel<T>>
protected abstract PojoPropertyModel<?>
createPropertyModel
(String propertyName) final Collection<PojoPropertyModel<?>>
protected PojoTypeModel<? extends T>
doCast
(PojoTypeModel<?> other) final boolean
final int
hashCode()
final PojoConstructorModel<T>
final String
name()
final PojoPropertyModel<?>
final String
toString()
final PojoRawTypeIdentifier<T>
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, descendingSuperTypes, rawType
Methods inherited from interface org.hibernate.search.mapper.pojo.model.spi.PojoTypeModel
arrayElementType, typeArgument
-
Field Details
-
introspector
-
typeIdentifier
-
-
Constructor Details
-
AbstractPojoRawTypeModel
-
-
Method Details
-
equals
- Specified by:
equals
in interfaceMappableTypeModel
- Specified by:
equals
in interfacePojoTypeModel<T>
- Overrides:
equals
in classObject
- Returns:
true
ifobj
is aPojoTypeModel
referencing the exact same type with the exact same exposed metadata.
-
hashCode
public final int hashCode()- Specified by:
hashCode
in interfaceMappableTypeModel
- Specified by:
hashCode
in interfacePojoTypeModel<T>
- Overrides:
hashCode
in classObject
-
toString
- Specified by:
toString
in interfaceMappableTypeModel
- Specified by:
toString
in interfacePojoTypeModel<T>
- Overrides:
toString
in classObject
- Returns:
- A human-readable description of this type.
-
typeIdentifier
- Specified by:
typeIdentifier
in interfacePojoRawTypeModel<T>
- Returns:
- The identifier for this type.
-
name
- Specified by:
name
in interfaceMappableTypeModel
- Specified by:
name
in interfacePojoTypeModel<T>
- Returns:
- A human-readable name for this type.
-
mainConstructor
- Specified by:
mainConstructor
in interfacePojoRawTypeModel<T>
- Returns:
- The main constructor of this type. The main constructor only exists if this type defines a single constructor.
-
constructor
- Specified by:
constructor
in interfacePojoRawTypeModel<T>
- Parameters:
parameterTypes
- The type of parameters to the returned constructor.- Returns:
- The constructor of this type whose parameters have the given
parameterTypes
.
-
declaredConstructors
- Specified by:
declaredConstructors
in interfacePojoRawTypeModel<T>
- Returns:
- All accessible constructors of this type.
-
createDeclaredConstructors
-
property
- Specified by:
property
in interfacePojoTypeModel<T>
- Parameters:
propertyName
- The name of aproperty
in this type.- Returns:
- A representation of the property with the given name.
-
declaredProperties
- Specified by:
declaredProperties
in interfacePojoRawTypeModel<T>
- Returns:
- All declared properties of this type.
-
cast
- Specified by:
cast
in interfacePojoRawTypeModel<T>
- 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>
toCollection
for example would returnCollection<Integer>
.
-
doCast
-
caster
- Specified by:
caster
in interfacePojoRawTypeModel<T>
- Returns:
- A
PojoCaster
targeting this type.
-
castTo
- 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>
.
-
declaredPropertyNames
-
createPropertyModel
-