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 StringName 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 TypeMethodDescriptionbooleanWhether 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.booleanA query based attribute always includes explicit.abstract booleanIs the attribute collection-valued (represents a Collection, Set, List, or Map).booleanA query based attribute is always inferred.toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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:QueryAttributeReturn the entire query as inserted intoSparql.- Specified by:
getQueryin interfaceQueryAttribute<X,Y> - Returns:
- Query defining this attribute
-
enableReferencingAttributes
public boolean enableReferencingAttributes()Description copied from interface:QueryAttributeWhether referencing other entity attributes is enabled.- Specified by:
enableReferencingAttributesin interfaceQueryAttribute<X,Y> - Returns:
truewhen other entity attributes may be referenced from the query
-
getJavaMember
Description copied from interface:QueryAttributeReturn the java.lang.reflect.Member for the represented attribute.- Specified by:
getJavaMemberin interfaceQueryAttribute<X,Y> - Returns:
- corresponding java.lang.reflect.Member
-
getConstraints
Description copied from interface:QueryAttributeReturns participation constraints specified for this attribute.- Specified by:
getConstraintsin interfaceQueryAttribute<X,Y> - Returns:
- Array of participation constraints
-
getDeclaringType
Description copied from interface:FieldSpecificationReturn the managed type representing the type in which the attribute was declared.- Specified by:
getDeclaringTypein interfaceFieldSpecification<X,Y> - Returns:
- declaring type
-
getJavaField
Description copied from interface:FieldSpecificationReturn the java.lang.reflect.Member for the represented attribute.- Specified by:
getJavaFieldin interfaceFieldSpecification<X,Y> - Returns:
- corresponding java.lang.reflect.Member
-
getFetchType
Description copied from interface:FieldSpecificationWhether the association is lazily loaded or must be eagerly fetched.- Specified by:
getFetchTypein interfaceFieldSpecification<X,Y> - Returns:
- Fetch type of the field specification
-
isInferred
public boolean isInferred()A query based attribute is always inferred.- Specified by:
isInferredin interfaceFieldSpecification<X,Y> - Returns:
- always
true - See Also:
-
includeExplicit
public boolean includeExplicit()A query based attribute always includes explicit.- Specified by:
includeExplicitin interfaceFieldSpecification<X,Y> - Returns:
- always
true - See Also:
-
getName
Description copied from interface:FieldSpecificationReturn the name of the attribute.- Specified by:
getNamein interfaceFieldSpecification<X,Y> - Returns:
- name
-
isCollection
public abstract boolean isCollection()Description copied from interface:FieldSpecificationIs the attribute collection-valued (represents a Collection, Set, List, or Map).- Specified by:
isCollectionin interfaceFieldSpecification<X,Y> - Returns:
- boolean indicating whether the attribute is collection-valued
-
getConverter
-
toString
-