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 Iintrospectorprotected 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()booleanequals(Object o)inthashCode()Stringname()PojoPropertyModel<?>property(String propertyName)StringtoString()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:
equalsin interfaceMappableTypeModel- Overrides:
equalsin classObject
-
hashCode
public final int hashCode()
- Specified by:
hashCodein interfaceMappableTypeModel- Overrides:
hashCodein classObject
-
toString
public final String toString()
- Specified by:
toStringin interfaceMappableTypeModel- Overrides:
toStringin classObject
-
typeIdentifier
public final PojoRawTypeIdentifier<T> typeIdentifier()
- Specified by:
typeIdentifierin interfacePojoRawTypeModel<T>- Returns:
- The identifier for this type.
-
name
public final String name()
- Specified by:
namein interfaceMappableTypeModel- Specified by:
namein interfacePojoTypeModel<T>- Returns:
- A human-readable name for this type.
-
property
public final PojoPropertyModel<?> property(String propertyName)
- Specified by:
propertyin interfacePojoTypeModel<T>
-
declaredProperties
public final Collection<PojoPropertyModel<?>> declaredProperties()
- Specified by:
declaredPropertiesin interfacePojoRawTypeModel<T>
-
caster
public final PojoCaster<T> caster()
- Specified by:
casterin interfacePojoRawTypeModel<T>
-
castTo
public <U> Optional<PojoTypeModel<? extends U>> castTo(Class<U> target)
- Specified by:
castToin 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>toCollectionfor example would returnCollection<Integer>.
-
createPropertyModel
protected abstract PojoPropertyModel<?> createPropertyModel(String propertyName)
-
-