javax.persistence.NamedStoredProcedureQuery#name ( )源码实例Demo

下面列出了javax.persistence.NamedStoredProcedureQuery#name ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: lams   文件: NamedProcedureCallDefinition.java
NamedProcedureCallDefinition(NamedStoredProcedureQuery annotation) {
	this.registeredName = annotation.name();
	this.procedureName = annotation.procedureName();
	this.hints = new QueryHintDefinition( annotation.hints() ).getHintsMap();
	this.resultClasses = annotation.resultClasses();
	this.resultSetMappings = annotation.resultSetMappings();

	this.parameterDefinitions = new ParameterDefinitions( annotation.parameters(), hints );

	final boolean specifiesResultClasses = resultClasses != null && resultClasses.length > 0;
	final boolean specifiesResultSetMappings = resultSetMappings != null && resultSetMappings.length > 0;

	if ( specifiesResultClasses && specifiesResultSetMappings ) {
		throw new MappingException(
				String.format(
						"NamedStoredProcedureQuery [%s] specified both resultClasses and resultSetMappings",
						registeredName
				)
		);
	}
}
 
源代码2 项目: lams   文件: JPAOverriddenAnnotationReader.java
private void addNamedStoredProcedureQueryIfNeeded(NamedStoredProcedureQuery annotation, List<NamedStoredProcedureQuery> queries) {
	if ( annotation != null ) {
		String queryName = annotation.name();
		boolean present = false;
		for ( NamedStoredProcedureQuery current : queries ) {
			if ( current.name().equals( queryName ) ) {
				present = true;
				break;
			}
		}
		if ( !present ) {
			queries.add( annotation );
		}
	}
}
 
 同类方法