Hibernate ORM AssociationType - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Hibernate ORM AssociationType class.

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
Connect your IDE to all the code out there  Get Codota for Java
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
Connect your IDE to all the code out there  Get Codota for Java
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
Connect your IDE to all the code out there  Get Codota for Java
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
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods: getAssociatedJoinable
This code example shows how to use the following methods: getAssociatedJoinable
This code example shows how to use the following methods: getAssociatedJoinable
		return type;
	} 
 
	public String getName() {
		return currentName == null ? collectionName : currentName;
	} 
 
 
	public String getCollectionSubquery(Map enabledFilters) throws QueryException {
		return CollectionSubqueryFactory.createCollectionSubquery( joinSequence, enabledFilters, currentColumns() );
	} 
 
	public boolean isCollectionValued() throws QueryException {
		//TODO: is there a better way? 
		return collectionName != null && !getPropertyType().isCollectionType();
	} 
 
	public void addAssociation(QueryTranslatorImpl q) throws QueryException {
		q.addJoin( getName(), joinSequence );
	} 
Full Snippet Info
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
See Code Examples for Hibernate ORM AssociationType Methods: