These code examples were ranked by Codota’s semantic indexing as the best open source examples for Hibernate ORM PropertyMapping class.
} private void setType() throws QueryException { if ( currentProperty == null ) { type = getPropertyMapping().getType(); } else { type = getPropertyType(); } } protected Type getPropertyType() throws QueryException { String propertyPath = getPropertyPath(); Type propertyType = getPropertyMapping().toType( propertyPath ); if ( propertyType == null ) { throw new QueryException( "could not resolve property type: " + propertyPath ); } return propertyType; }
if ( !type.isCollectionType() ) { throw new MappingException( "Property path [" + entityName + "." + propertyName + "] does not reference a collection" ); } String role = ( ( CollectionType ) type ).getRole(); try { return ( QueryableCollection ) factory.getCollectionPersister( role ); } catch ( ClassCastException cce ) { throw new QueryException( "collection role is not queryable: " + role ); } catch ( Exception e ) { throw new QueryException( "collection role not found: " + role ); } } public final TypedValue[] getTypedValues(Criteria criteria, CriteriaQuery criteriaQuery) throws HibernateException {
// todo: wtf! return getPropertyMapping().toType(relativePath); } }
public PropertyMapping getPropertyMapping() { return (PropertyMapping)persister; } public Type getType(String relativePath) { return persister.toType(relativePath); } }
/** * Generate a join sequence representing the given association type. * * @param implicit Should implicit joins (theta-style) or explicit joins (ANSI-style) be rendered * @param associationType The type representing the thing to be joined into. * @param tableAlias The table alias to use in qualifying the join conditions * @param joinType The type of join to render (inner, outer, etc); see {@link org.hibernate.sql.JoinFragment} * @param columns The columns making up the condition of the join. * @return The generated join sequence. */ public JoinSequence createJoinSequence(boolean implicit, AssociationType associationType, String tableAlias, JoinType joinType, String[] columns) { JoinSequence joinSequence = createJoinSequence(); joinSequence.setUseThetaStyle( implicit ); // Implicit joins use theta style (WHERE pk = fk), explicit joins use JOIN (after from) joinSequence.addJoin( associationType, tableAlias, joinType, columns ); return joinSequence; } /** * Create a join sequence rooted at the given collection.