@Override public boolean supports(Class<?> entityType) { return PropertyQueries .createQuery(entityType) .addCriteria(new AnnotatedPropertyCriteria(PartitionClass.class)) .getFirstResult() != null; }
protected List<Property<String>> getAnnotatedProperties(Class<? extends Annotation> annotationType, Class<?> type) { return PropertyQueries.<String>createQuery(type) .addCriteria(new AnnotatedPropertyCriteria(annotationType)) .getResultList(); }
protected Property getNamedProperty(String propertyName, Class<?> type) { return PropertyQueries.<String>createQuery(type) .addCriteria(new NamedPropertyCriteria(propertyName)) .getFirstResult(); }
/** * Get the result from the query, causing the query to be run. * * @return the results, or an empty list if there are no results */ public List<Property<V>> getResultList() { return getResultList(false); }
@Override public boolean isAnnotationPresent(final Class<? extends Annotation> annotation) { if (isPropertyAnnotated(this.fieldProperty, annotation) || isPropertyAnnotated(this.methodProperty, annotation)) { return true; } return false; }
/** * Create a new {@link PropertyQuery} * * @param <V> * @param targetClass * @return */ public static <V> PropertyQuery<V> createQuery(Class<?> targetClass) { return new PropertyQuery<V>(targetClass); }
protected Property getAnnotatedProperty(Class<? extends Annotation> annotationType, Class<?> type) { return PropertyQueries.<String>createQuery(type) .addCriteria(new AnnotatedPropertyCriteria(annotationType)) .getFirstResult(); }
protected List<Property<String>> getAnnotatedProperties(Class<? extends Annotation> annotationType, Class<?> type) { return PropertyQueries.<String>createQuery(type) .addCriteria(new AnnotatedPropertyCriteria(annotationType)) .getResultList(); }
protected Property getNamedProperty(String propertyName, Class<?> type) { return PropertyQueries.<String>createQuery(type) .addCriteria(new NamedPropertyCriteria(propertyName)) .getFirstResult(); }
/** * Get the result from the query, causing the query to be run. * * @return the results, or an empty list if there are no results */ public List<Property<V>> getResultList() { return getResultList(false); }
@Override public boolean isAnnotationPresent(final Class<? extends Annotation> annotation) { if (isPropertyAnnotated(this.fieldProperty, annotation) || isPropertyAnnotated(this.methodProperty, annotation)) { return true; } return false; }
protected Property getAnnotatedProperty(Class<? extends Annotation> annotationType, Class<?> type) { return PropertyQueries.<String>createQuery(type) .addCriteria(new AnnotatedPropertyCriteria(annotationType)) .getFirstResult(); }
private List<Property<Serializable>> getAttributedProperties(T attributedType) { PropertyQuery<Serializable> query = PropertyQueries.createQuery(attributedType.getClass()); query.addCriteria(new AnnotatedPropertyCriteria(AttributeProperty.class)); return query.getResultList(); }
/** * Get the result from the query, causing the query to be run. * * @return the results, or an empty list if there are no results */ public List<Property<V>> getResultList() { return getResultList(false); }
@Override public boolean supports(Class<?> entityType) { return PropertyQueries.<String>createQuery(entityType) .addCriteria(new AnnotatedPropertyCriteria(RelationshipClass.class)) .getFirstResult() != null; }
private List<Property<Serializable>> getAttributedProperties(T attributedType) { PropertyQuery<Serializable> query = PropertyQueries.createQuery(attributedType.getClass()); query.addCriteria(new AnnotatedPropertyCriteria(AttributeProperty.class)); return query.getResultList(); }
@Override public boolean supports(Class<?> entityType) { return PropertyQueries.<String>createQuery(entityType) .addCriteria(new AnnotatedPropertyCriteria(RelationshipDescriptor.class)) .getFirstResult() != null && PropertyQueries.<String>createQuery(entityType) .addCriteria(new AnnotatedPropertyCriteria(RelationshipMember.class)) .getFirstResult() != null; }
@Override public boolean supports(Class<?> entityType) { return PropertyQueries.<String>createQuery(entityType) .addCriteria(new AnnotatedPropertyCriteria(RelationshipDescriptor.class)) .getFirstResult() != null && PropertyQueries.<String>createQuery(entityType) .addCriteria(new AnnotatedPropertyCriteria(RelationshipMember.class)) .getFirstResult() != null; }
@Override public boolean supports(Class<?> entityType) { return PropertyQueries.<String>createQuery(entityType) .addCriteria(new AnnotatedPropertyCriteria(RelationshipClass.class)) .getFirstResult() != null; }
@Override public boolean supports(Class<?> entityType) { return PropertyQueries .createQuery(entityType) .addCriteria(new AnnotatedPropertyCriteria(PartitionClass.class)) .getFirstResult() != null; }