/** * Creates a new PathBuilder instance * * @param type type of the expression * @param variable variable name * @param validator validator for property creation */ public PathBuilder(Class<? extends T> type, String variable, PathBuilderValidator validator) { this(type, PathMetadataFactory.forVariable(variable), validator); }
protected ArrayPath(Class<? super A> type, Path<?> parent, String property) { this(type, PathMetadataFactory.forProperty(parent, property)); }
@Override public SimplePath<E> get(@Nonnegative int index) { PathMetadata md = PathMetadataFactory.forArrayAccess(pathMixin, index); return Expressions.path(componentType, md); }
@Generated("com.querydsl.codegen.EntitySerializer") public class QJpaServiceLevelAgreementActionTemplate extends EntityPathBase<JpaServiceLevelAgreementActionTemplate> { this(JpaServiceLevelAgreementActionTemplate.class, forVariable(variable), INITS); this(path.getType(), path.getMetadata(), PathInits.getFor(path.getMetadata(), INITS));
@SuppressWarnings("unchecked") @Test public void various_properties() { Path<?> parent = ExpressionUtils.path(Object.class, "parent"); List<Path<?>> paths = new ArrayList<Path<?>>(); paths.add(new ArrayPath(String[].class, parent, "p")); paths.add(new BeanPath(Object.class, parent, "p")); paths.add(new BooleanPath(parent, "p")); paths.add(new CollectionPath(String.class, StringPath.class, parent, "p")); paths.add(new ComparablePath(String.class, parent, "p")); paths.add(new DatePath(Date.class, parent, "p")); paths.add(new DateTimePath(Date.class, parent, "p")); paths.add(new EnumPath(ExampleEnum.class, parent, "p")); paths.add(new ListPath(String.class, StringPath.class, parent, "p")); paths.add(new MapPath(String.class, String.class, StringPath.class, parent, "p")); paths.add(new NumberPath(Integer.class, parent, "p")); paths.add(new SetPath(String.class, StringPath.class, parent, "p")); paths.add(new SimplePath(String.class, parent, "p")); paths.add(new StringPath(parent, "p")); paths.add(new TimePath(Time.class, parent, "p")); for (Path<?> path : paths) { Path other = ExpressionUtils.path(path.getType(), PathMetadataFactory.forProperty(parent, "p")); assertEquals(path.toString(), path.accept(ToStringVisitor.DEFAULT, Templates.DEFAULT)); assertEquals(path.hashCode(), other.hashCode()); assertEquals(path, other); assertNotNull(path.getMetadata()); assertNotNull(path.getType()); assertEquals(parent, path.getRoot()); } }
@SuppressWarnings("unchecked") @Override protected Predicate exists(Context c, Predicate condition) { JPAQueryMixin<?> query = new JPAQueryMixin<Object>(); query.setProjection(Expressions.ONE); for (int i = 0; i < c.paths.size(); i++) { Path<?> child = c.paths.get(i).getMetadata().getParent(); EntityPath<Object> replacement = (EntityPath<Object>) c.replacements.get(i); if (c.paths.get(i).getType().isAnnotationPresent(Entity.class)) { query.addJoin(i == 0 ? JoinType.DEFAULT : JoinType.INNERJOIN, Expressions.as( Expressions.listPath((Class) c.paths.get(i).getType(), SimplePath.class, child.getMetadata()), replacement)); } else { // join via parent Path<?> parent = child.getMetadata().getParent(); EntityPathBase<Object> newParent = new EntityPathBase<Object>(parent.getType(), ExpressionUtils.createRootVariable(parent, Math.abs(condition.hashCode()))); EntityPath<Object> newChild = new EntityPathBase<Object>(child.getType(), PathMetadataFactory.forProperty(newParent, child.getMetadata().getName())); query.from(newParent); query.addJoin(JoinType.INNERJOIN, Expressions.as(newChild, replacement)); query.where(ExpressionUtils.eq(newParent, parent)); } } c.clear(); query.where(condition); return ExpressionUtils.predicate(Ops.EXISTS, asExpression(query.getMetadata())); }
/** * QAbstractAuditedEntityAsMillis is a Querydsl query type for AbstractAuditedEntityAsMillis */ @Generated("com.querydsl.codegen.SupertypeSerializer") public class QAbstractAuditedEntityAsMillis extends EntityPathBase<AbstractAuditedEntityAsMillis> { private static final long serialVersionUID = 1992558749L; public static final QAbstractAuditedEntityAsMillis abstractAuditedEntityAsMillis = new QAbstractAuditedEntityAsMillis("abstractAuditedEntityAsMillis"); public final DateTimePath<org.joda.time.DateTime> createdTime = createDateTime("createdTime", org.joda.time.DateTime.class); public final DateTimePath<org.joda.time.DateTime> modifiedTime = createDateTime("modifiedTime", org.joda.time.DateTime.class); public QAbstractAuditedEntityAsMillis(String variable) { super(AbstractAuditedEntityAsMillis.class, forVariable(variable)); } public QAbstractAuditedEntityAsMillis(Path<? extends AbstractAuditedEntityAsMillis> path) { super(path.getType(), path.getMetadata()); } public QAbstractAuditedEntityAsMillis(PathMetadata metadata) { super(AbstractAuditedEntityAsMillis.class, metadata); } }
/** * QJpaNifiRelatedRootFlowFiles_NifiRelatedFlowFilesPK is a Querydsl query type for NifiRelatedFlowFilesPK */ @Generated("com.querydsl.codegen.EmbeddableSerializer") public class QJpaNifiRelatedRootFlowFiles_NifiRelatedFlowFilesPK extends BeanPath<JpaNifiRelatedRootFlowFiles.NifiRelatedFlowFilesPK> { private static final long serialVersionUID = 1288822002L; public static final QJpaNifiRelatedRootFlowFiles_NifiRelatedFlowFilesPK nifiRelatedFlowFilesPK = new QJpaNifiRelatedRootFlowFiles_NifiRelatedFlowFilesPK("nifiRelatedFlowFilesPK"); public final StringPath flowFileId = createString("flowFileId"); public final StringPath relationId = createString("relationId"); public QJpaNifiRelatedRootFlowFiles_NifiRelatedFlowFilesPK(String variable) { super(JpaNifiRelatedRootFlowFiles.NifiRelatedFlowFilesPK.class, forVariable(variable)); } public QJpaNifiRelatedRootFlowFiles_NifiRelatedFlowFilesPK(Path<? extends JpaNifiRelatedRootFlowFiles.NifiRelatedFlowFilesPK> path) { super(path.getType(), path.getMetadata()); } public QJpaNifiRelatedRootFlowFiles_NifiRelatedFlowFilesPK(PathMetadata metadata) { super(JpaNifiRelatedRootFlowFiles.NifiRelatedFlowFilesPK.class, metadata); } }
/** * Creates a new PathBuilder instance * * @param type type of the expression * @param variable variable name */ public PathBuilder(Class<? extends T> type, String variable) { this(type, PathMetadataFactory.forVariable(variable), PathBuilderValidator.DEFAULT); }
protected ListPath(Class<? super E> elementType, Class<Q> queryType, Path<?> parent, String property) { this(elementType, queryType, PathMetadataFactory.forProperty(parent, property)); }
@Override public SimplePath<E> get(Expression<Integer> index) { PathMetadata md = PathMetadataFactory.forArrayAccess(pathMixin, index); return Expressions.path(componentType, md); }
/** * QAbstractAuditedEntity is a Querydsl query type for AbstractAuditedEntity */ @Generated("com.querydsl.codegen.SupertypeSerializer") public class QAbstractAuditedEntity extends EntityPathBase<AbstractAuditedEntity> { private static final long serialVersionUID = 1539290213L; public static final QAbstractAuditedEntity abstractAuditedEntity = new QAbstractAuditedEntity("abstractAuditedEntity"); public final DateTimePath<org.joda.time.DateTime> createdTime = createDateTime("createdTime", org.joda.time.DateTime.class); public final DateTimePath<org.joda.time.DateTime> modifiedTime = createDateTime("modifiedTime", org.joda.time.DateTime.class); public QAbstractAuditedEntity(String variable) { super(AbstractAuditedEntity.class, forVariable(variable)); } public QAbstractAuditedEntity(Path<? extends AbstractAuditedEntity> path) { super(path.getType(), path.getMetadata()); } public QAbstractAuditedEntity(PathMetadata metadata) { super(AbstractAuditedEntity.class, metadata); } }
@SuppressWarnings("unchecked") public GeometryCollectionPath(String var) { this((Class<? extends T>) GeometryCollection.class, PathMetadataFactory.forVariable(var)); }
protected SetPath(Class<? super E> type, Class<Q> queryType, Path<?> parent, String property) { this(type, queryType, PathMetadataFactory.forProperty(parent, property)); }
@Override public SimplePath<E> get(Expression<Integer> index) { PathMetadata md = PathMetadataFactory.forArrayAccess(pathMixin, index); return Expressions.path(componentType, md); }
/** * QJpaNiFiFlowCacheClusterSync_NiFiFlowCacheKey is a Querydsl query type for NiFiFlowCacheKey */ @Generated("com.querydsl.codegen.EmbeddableSerializer") public class QJpaNiFiFlowCacheClusterSync_NiFiFlowCacheKey extends BeanPath<JpaNiFiFlowCacheClusterSync.NiFiFlowCacheKey> { private static final long serialVersionUID = -436241664L; public static final QJpaNiFiFlowCacheClusterSync_NiFiFlowCacheKey niFiFlowCacheKey = new QJpaNiFiFlowCacheClusterSync_NiFiFlowCacheKey("niFiFlowCacheKey"); public final StringPath clusterAddress = createString("clusterAddress"); public final StringPath updateKey = createString("updateKey"); public QJpaNiFiFlowCacheClusterSync_NiFiFlowCacheKey(String variable) { super(JpaNiFiFlowCacheClusterSync.NiFiFlowCacheKey.class, forVariable(variable)); } public QJpaNiFiFlowCacheClusterSync_NiFiFlowCacheKey(Path<? extends JpaNiFiFlowCacheClusterSync.NiFiFlowCacheKey> path) { super(path.getType(), path.getMetadata()); } public QJpaNiFiFlowCacheClusterSync_NiFiFlowCacheKey(PathMetadata metadata) { super(JpaNiFiFlowCacheClusterSync.NiFiFlowCacheKey.class, metadata); } }
@SuppressWarnings("unchecked") public JTSLinearRingPath(String var) { this((Class<? extends T>) LinearRing.class, PathMetadataFactory.forVariable(var)); }
public MultiPointPath(Class<? extends T> type, Path<?> parent, String property) { this(type, PathMetadataFactory.forProperty(parent, property)); }
@Override public SimplePath<E> get(@Nonnegative int index) { PathMetadata md = PathMetadataFactory.forArrayAccess(pathMixin, index); return Expressions.path(componentType, md); }
@Generated("com.querydsl.codegen.EntitySerializer") public class QJpaServiceLevelAgreementDescription extends EntityPathBase<JpaServiceLevelAgreementDescription> { this(JpaServiceLevelAgreementDescription.class, forVariable(variable), INITS); this(path.getType(), path.getMetadata(), PathInits.getFor(path.getMetadata(), INITS));