当前位置: 首页>>代码示例>>Java>>正文


Java Criteria.equals方法代码示例

本文整理汇总了Java中org.hibernate.Criteria.equals方法的典型用法代码示例。如果您正苦于以下问题:Java Criteria.equals方法的具体用法?Java Criteria.equals怎么用?Java Criteria.equals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.hibernate.Criteria的用法示例。


在下文中一共展示了Criteria.equals方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getWholeAssociationPath

import org.hibernate.Criteria; //导入方法依赖的package包/类
private String getWholeAssociationPath(CriteriaImpl.Subcriteria subcriteria) {
	String path = subcriteria.getPath();

	// some messy, complex stuff here, since createCriteria() can take an
	// aliased path, or a path rooted at the creating criteria instance
	Criteria parent = null;
	if ( path.indexOf( '.' ) > 0 ) {
		// if it is a compound path
		String testAlias = StringHelper.root( path );
		if ( !testAlias.equals( subcriteria.getAlias() ) ) {
			// and the qualifier is not the alias of this criteria
			//      -> check to see if we belong to some criteria other
			//          than the one that created us
			parent = aliasCriteriaMap.get( testAlias );
		}
	}
	if ( parent == null ) {
		// otherwise assume the parent is the the criteria that created us
		parent = subcriteria.getParent();
	}
	else {
		path = StringHelper.unroot( path );
	}

	if ( parent.equals( rootCriteria ) ) {
		// if its the root criteria, we are done
		return path;
	}
	else {
		// otherwise, recurse
		return getWholeAssociationPath( ( CriteriaImpl.Subcriteria ) parent ) + '.' + path;
	}
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:34,代码来源:CriteriaQueryTranslator.java

示例2: getWholeAssociationPath

import org.hibernate.Criteria; //导入方法依赖的package包/类
private String getWholeAssociationPath(CustomCriteriaImpl.Subcriteria subcriteria) {
	String path = subcriteria.getPath();

	// some messy, complex stuff here, since createCriteria() can take an
	// aliased path, or a path rooted at the creating criteria instance
	Criteria parent = null;
	if ( path.indexOf( '.' ) > 0 ) {
		// if it is a compound path
		String testAlias = StringHelper.root( path );
		if ( !testAlias.equals( subcriteria.getAlias() ) ) {
			// and the qualifier is not the alias of this criteria
			//      -> check to see if we belong to some criteria other
			//          than the one that created us
			parent = aliasCriteriaMap.get( testAlias );
		}
	}
	if ( parent == null ) {
		// otherwise assume the parent is the the criteria that created us
		parent = subcriteria.getParent();
	}
	else {
		path = StringHelper.unroot( path );
	}

	if ( parent.equals( rootCriteria ) ) {
		// if its the root criteria, we are done
		return path;
	}
	else {
		// otherwise, recurse
		return getWholeAssociationPath( (CustomCriteriaImpl.Subcriteria) parent ) + '.' + path;
	}
}
 
开发者ID:geodir,项目名称:Layer-Query,代码行数:34,代码来源:CustomCriteriaQueryTranslator.java


注:本文中的org.hibernate.Criteria.equals方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。