/** * Get a new Comparable typed path * * @param <A> * @param property property name * @param type * @return */ public <A extends Comparable<?>> ComparablePath<A> getComparable(String property, Class<A> type) { Class<? extends A> vtype = validate(property, type); return super.createComparable(property, (Class)vtype); }
/** * Get a new Date path * * @param <A> * @param property property name * @param type * @return */ public <A extends Comparable<?>> DatePath<A> getDate(String property, Class<A> type) { Class<? extends A> vtype = validate(property, type); return super.createDate(property, (Class)vtype); }
/** * Get a new DateTime path * * @param <A> * @param property property name * @param type * @return */ public <A extends Comparable<?>> DateTimePath<A> getDateTime(String property, Class<A> type) { Class<? extends A> vtype = validate(property, type); return super.createDateTime(property, (Class)vtype); }
/** * Get a new Enum path * * @param <A> * @param property property name * @param type * @return */ public <A extends Enum<A>> EnumPath<A> getEnum(String property, Class<A> type) { validate(property, type); return super.createEnum(property, type); }
/** * Get a new Time typed path * * @param <A> * @param property property name * @param type * @return */ public <A extends Comparable<?>> TimePath<A> getTime(String property, Class<A> type) { Class<? extends A> vtype = validate(property, type); return super.createTime(property, (Class)vtype); }
/** * Get a new Boolean typed path * * @param propertyName property name * @return */ public BooleanPath getBoolean(String propertyName) { validate(propertyName, Boolean.class); return super.createBoolean(propertyName); }
/** * Get a new Collection typed path * * @param <A> * @param property property name * @param type * @return */ public <A> CollectionPath<A, PathBuilder<A>> getCollection(String property, Class<A> type) { validate(property, Collection.class); return super.<A, PathBuilder<A>>createCollection(property, type, PathBuilder.class, PathInits.DIRECT); }
/** * Get a new Number typed path * * @param <A> * @param property property name * @param type * @return */ public <A extends Number & Comparable<?>> NumberPath<A> getNumber(String property, Class<A> type) { Class<? extends A> vtype = validate(property, type); return super.createNumber(property, (Class)vtype); }
/** * Get a new Simple path * * @param <A> * @param property property name * @param type * @return */ public <A> SimplePath<A> getSimple(String property, Class<A> type) { Class<? extends A> vtype = validate(property, type); return super.createSimple(property, (Class)vtype); }
/** * Get a new List typed path * * @param <A> * @param property property name * @param type * @return */ public <A> ListPath<A, PathBuilder<A>> getList(String property, Class<A> type) { validate(property, List.class); return super.<A, PathBuilder<A>>createList(property, type, PathBuilder.class, PathInits.DIRECT); }
/** * Get a new Set typed path * * @param <A> * @param property property name * @param type * @return */ public <A> SetPath<A, PathBuilder<A>> getSet(String property, Class<A> type) { validate(property, Set.class); return super.<A, PathBuilder<A>>createSet(property, type, PathBuilder.class, PathInits.DIRECT); }
/** * Get a new String typed path * * @param property property name * @return */ public StringPath getString(String property) { validate(property, String.class); return super.createString(property); }
/** * Get a new List typed path * * @param <A> * @param <E> * @param property property name * @param type * @param queryType * @return */ public <A, E extends SimpleExpression<A>> ListPath<A, E> getList(String property, Class<A> type, Class<E> queryType) { validate(property, List.class); return super.<A, E>createList(property, type, queryType, PathInits.DIRECT); }
/** * Get a new Set typed path * * @param <A> * @param <E> * @param property property name * @param type * @param queryType * @return */ public <A, E extends SimpleExpression<A>> SetPath<A, E> getSet(String property, Class<A> type, Class<E> queryType) { validate(property, Set.class); return super.<A, E>createSet(property, type, queryType, PathInits.DIRECT); }
/** * Get a PArray instance for the given property and the given array type * * @param <A> * @param <E> * @param property property name * @param type * @return */ public <A, E> ArrayPath<A, E> getArray(String property, Class<A> type) { validate(property, Array.newInstance(type, 0).getClass()); return super.createArray(property, type); }
/** * Get a new Map typed path * * @param <K> * @param <V> * @param <E> * @param property property name * @param key * @param value * @param queryType * @return */ public <K, V, E extends SimpleExpression<V>> MapPath<K, V, E> getMap(String property, Class<K> key, Class<V> value, Class<E> queryType) { validate(property, Map.class); return super.<K,V,E>createMap(property, key, value, queryType); }
/** * Get a new Collection typed path * * @param <A> * @param <E> * @param property property name * @param type * @param queryType * @return */ public <A, E extends SimpleExpression<A>> CollectionPath<A, E> getCollection(String property, Class<A> type, Class<E> queryType) { validate(property, Collection.class); return super.<A, E>createCollection(property, type, queryType, PathInits.DIRECT); }
/** * Get a new Map typed path * * @param <K> * @param <V> * @param property property name * @param key * @param value * @return */ public <K, V> MapPath<K, V, PathBuilder<V>> getMap(String property, Class<K> key, Class<V> value) { validate(property, Map.class); return super.<K,V,PathBuilder<V>>createMap(property, key, value, PathBuilder.class); }
/** * Get a PathBuilder instance for the given property * * @param property property name * @return */ @SuppressWarnings("unchecked") public PathBuilder<Object> get(String property) { PathBuilder<Object> path = (PathBuilder) properties.get(property); if (path == null) { Class<?> vtype = validate(property, Object.class); path = new PathBuilder<Object>(vtype, forProperty(property), validator); properties.put(property, path); } return path; }
/** * Get a PathBuilder for the given property with the given type * * @param <A> * @param property property name * @param type * @return */ @SuppressWarnings("unchecked") public <A> PathBuilder<A> get(String property, Class<A> type) { PathBuilder<A> path = (PathBuilder<A>) properties.get(property); if (path == null || !type.isAssignableFrom(path.getType())) { Class<? extends A> vtype = validate(property, type); path = new PathBuilder<A>(vtype, forProperty(property), validator); properties.put(property, path); } return path; }