Class AbstractQueryAttribute<X,Y>
java.lang.Object
cz.cvut.kbss.jopa.model.metamodel.AbstractQueryAttribute<X,Y>
- Type Parameters:
X
- The represented type that contains the attributeY
- The type of the represented attribute
- All Implemented Interfaces:
FieldSpecification<X,
,Y> QueryAttribute<X,
Y>
- Direct Known Subclasses:
PluralQueryAttributeImpl
,SingularQueryAttributeImpl
A common class to all attributes defined by a query
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Name of the variable which may be used in the query and would be replaced by the identifier of the entity owning this attribute. -
Constructor Summary
ConstructorsConstructorDescriptionAbstractQueryAttribute
(String query, boolean enableReferencingAttributes, Field field, ManagedType<X> declaringType, FetchType fetchType, ParticipationConstraint[] constraints, ConverterWrapper converter) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Whether referencing other entity attributes is enabled.Returns participation constraints specified for this attribute.Return the managed type representing the type in which the attribute was declared.Whether the association is lazily loaded or must be eagerly fetched.Return the java.lang.reflect.Member for the represented attribute.Return the java.lang.reflect.Member for the represented attribute.getName()
Return the name of the attribute.getQuery()
Return the entire query as inserted intoSparql
.boolean
A query based attribute always includes explicit.abstract boolean
Is the attribute collection-valued (represents a Collection, Set, List, or Map).boolean
A query based attribute is always inferred.toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface cz.cvut.kbss.jopa.model.metamodel.FieldSpecification
getJavaType, isMappedAttribute
-
Field Details
-
THIS_PARAMETER
Name of the variable which may be used in the query and would be replaced by the identifier of the entity owning this attribute.- See Also:
-
-
Constructor Details
-
AbstractQueryAttribute
public AbstractQueryAttribute(String query, boolean enableReferencingAttributes, Field field, ManagedType<X> declaringType, FetchType fetchType, ParticipationConstraint[] constraints, ConverterWrapper converter)
-
-
Method Details
-
getQuery
Description copied from interface:QueryAttribute
Return the entire query as inserted intoSparql
.- Specified by:
getQuery
in interfaceQueryAttribute<X,
Y> - Returns:
- Query defining this attribute
-
enableReferencingAttributes
public boolean enableReferencingAttributes()Description copied from interface:QueryAttribute
Whether referencing other entity attributes is enabled.- Specified by:
enableReferencingAttributes
in interfaceQueryAttribute<X,
Y> - Returns:
true
when other entity attributes may be referenced from the query
-
getJavaMember
Description copied from interface:QueryAttribute
Return the java.lang.reflect.Member for the represented attribute.- Specified by:
getJavaMember
in interfaceQueryAttribute<X,
Y> - Returns:
- corresponding java.lang.reflect.Member
-
getConstraints
Description copied from interface:QueryAttribute
Returns participation constraints specified for this attribute.- Specified by:
getConstraints
in interfaceQueryAttribute<X,
Y> - Returns:
- Array of participation constraints
-
getDeclaringType
Description copied from interface:FieldSpecification
Return the managed type representing the type in which the attribute was declared.- Specified by:
getDeclaringType
in interfaceFieldSpecification<X,
Y> - Returns:
- declaring type
-
getJavaField
Description copied from interface:FieldSpecification
Return the java.lang.reflect.Member for the represented attribute.- Specified by:
getJavaField
in interfaceFieldSpecification<X,
Y> - Returns:
- corresponding java.lang.reflect.Member
-
getFetchType
Description copied from interface:FieldSpecification
Whether the association is lazily loaded or must be eagerly fetched.- Specified by:
getFetchType
in interfaceFieldSpecification<X,
Y> - Returns:
- Fetch type of the field specification
-
isInferred
public boolean isInferred()A query based attribute is always inferred.- Specified by:
isInferred
in interfaceFieldSpecification<X,
Y> - Returns:
- always
true
- See Also:
-
includeExplicit
public boolean includeExplicit()A query based attribute always includes explicit.- Specified by:
includeExplicit
in interfaceFieldSpecification<X,
Y> - Returns:
- always
true
- See Also:
-
getName
Description copied from interface:FieldSpecification
Return the name of the attribute.- Specified by:
getName
in interfaceFieldSpecification<X,
Y> - Returns:
- name
-
isCollection
public abstract boolean isCollection()Description copied from interface:FieldSpecification
Is the attribute collection-valued (represents a Collection, Set, List, or Map).- Specified by:
isCollection
in interfaceFieldSpecification<X,
Y> - Returns:
- boolean indicating whether the attribute is collection-valued
-
getConverter
-
toString
-