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