Best code examples for Hibernate ORM AssociationType class (org.hibernate.type.AssociationType)

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Hibernate ORM AssociationType class.
You can now enable Codota on your own code to easily search and navigate your Java codebase.

Hibernate ORM AssociationType examples from Open Source projects
This code example shows how to use the following methods: getLHSPropertyName, useLHSPrimaryKey, getColumnSpan
			} 
			else { 
				//handle a property-ref 
				String propertyRefTable = lhsPersister.getPropertyTableName(propertyName);
				if (propertyRefTable==null) {
					//it is possible that the tree-walking in OuterJoinLoader can get to 
					//an association defined by a subclass, in which case the property-ref 
					//might refer to a property defined on a subclass of the current class 
					//in this case, the table name is not known - this temporary solution  
					//assumes that the property-ref refers to a property of the subclass 
					//table that the association belongs to (a reasonable guess) 
					//TODO: fix this, add: OuterJoinLoadable.getSubclassPropertyTableName(String propertyName) 
					propertyRefTable = lhsPersister.getSubclassPropertyTableName(property);
				} 
				return propertyRefTable;
			} 
		} 
	} 
	 
	/** 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getAssociatedJoinable, getOnCondition, getRHSUniqueKeyPropertyName
		this.lhsAlias = lhsAlias;
		this.lhsColumns = lhsColumns;
		this.rhsAlias = rhsAlias;
		this.joinType = joinType;
		this.joinable = joinableType.getAssociatedJoinable(factory);
		this.rhsColumns = JoinHelper.getRHSColumnNames(joinableType, factory);
		this.on = joinableType.getOnCondition(rhsAlias, factory, enabledFilters)
			+ ( withClause == null || withClause.trim().length() == 0 ? "" : " and ( " + withClause + " )" );
		this.hasRestriction = hasRestriction;
		this.enabledFilters = enabledFilters; // needed later for many-to-many/filter application
	} 
 
	public PropertyPath getPropertyPath() {
		return propertyPath;
	} 
 
	public JoinType getJoinType() {
		return joinType;
	} 
 

5
CodeRank
This code example shows how to use the following methods: isCollectionType, isEntityType
	} 
 
	@Override 
    protected boolean isJoinedFetchEnabled(AssociationType type, FetchMode config, CascadeStyle cascadeStyle) {
		return ( type.isEntityType() || type.isCollectionType() ) &&
				( cascadeStyle==null || cascadeStyle.doCascade(cascadeAction) );
	} 
 
	@Override 
    protected boolean isTooManyCollections() { 
		return countCollectionPersisters(associations)>0;
	} 
 
	@Override 
    public String getComment() {
		return "load " + getPersister().getEntityName();
	} 
	 
} 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getLHSPropertyName, useLHSPrimaryKey
 
		if ( type.isAssociationType() ) { 
			AssociationType actype = (AssociationType) type; 
			if ( actype.useLHSPrimaryKey() ) { 
				columns = getIdentifierColumnNames(); 
				columnReaders = getIdentifierColumnReaders(); 
				columnReaderTemplates = getIdentifierColumnReaderTemplates(); 
			} 
			else { 
				String foreignKeyProperty = actype.getLHSPropertyName(); 
				if ( foreignKeyProperty!=null && !path.equals(foreignKeyProperty) ) { 
					//TODO: this requires that the collection is defined after the 
					//      referenced property in the mapping file (ok?) 
					columns = (String[]) columnsByPropertyPath.get(foreignKeyProperty); 
					if (columns==null) return; //get em on the second pass! 
					columnReaders = (String[]) columnReadersByPropertyPath.get(foreignKeyProperty); 
					columnReaderTemplates = (String[]) columnReaderTemplatesByPropertyPath.get(foreignKeyProperty); 
				} 
			} 
		} 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getAssociatedJoinable
See Code Examples for Hibernate ORM AssociationType Methods: