Polishing
This commit is contained in:
@@ -599,7 +599,7 @@ public interface HibernateOperations {
|
||||
* @throws org.springframework.dao.DataAccessException in case of Hibernate errors
|
||||
* @see org.hibernate.Session#createQuery
|
||||
*/
|
||||
List<?> find(String queryString) throws DataAccessException;
|
||||
List<Object> find(String queryString) throws DataAccessException;
|
||||
|
||||
/**
|
||||
* Execute an HQL query, binding one value to a "?" parameter in the
|
||||
|
||||
@@ -485,7 +485,7 @@ public class HibernateTemplate extends HibernateAccessor implements HibernateOpe
|
||||
* @see #prepareCriteria
|
||||
*/
|
||||
protected Session createSessionProxy(Session session) {
|
||||
Class<?>[] sessionIfcs = null;
|
||||
Class<?>[] sessionIfcs;
|
||||
Class<?> mainIfc = (session instanceof org.hibernate.classic.Session ?
|
||||
org.hibernate.classic.Session.class : Session.class);
|
||||
if (session instanceof EventSource) {
|
||||
@@ -518,7 +518,7 @@ public class HibernateTemplate extends HibernateAccessor implements HibernateOpe
|
||||
|
||||
return executeWithNativeSession(new HibernateCallback<T>() {
|
||||
@Override
|
||||
@SuppressWarnings({ "unchecked" })
|
||||
@SuppressWarnings("unchecked")
|
||||
public T doInHibernate(Session session) throws HibernateException {
|
||||
if (lockMode != null) {
|
||||
return (T) session.get(entityClass, id, lockMode);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2013 the original author or authors.
|
||||
* Copyright 2002-2014 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -246,7 +246,7 @@ public class LocalSessionFactoryBean extends AbstractSessionFactoryBean implemen
|
||||
* resources are specified locally via this bean.
|
||||
* @see org.hibernate.cfg.Configuration#configure(java.net.URL)
|
||||
*/
|
||||
public void setConfigLocations(Resource[] configLocations) {
|
||||
public void setConfigLocations(Resource... configLocations) {
|
||||
this.configLocations = configLocations;
|
||||
}
|
||||
|
||||
@@ -260,7 +260,7 @@ public class LocalSessionFactoryBean extends AbstractSessionFactoryBean implemen
|
||||
* @see #setMappingLocations
|
||||
* @see org.hibernate.cfg.Configuration#addResource
|
||||
*/
|
||||
public void setMappingResources(String[] mappingResources) {
|
||||
public void setMappingResources(String... mappingResources) {
|
||||
this.mappingResources = mappingResources;
|
||||
}
|
||||
|
||||
@@ -273,7 +273,7 @@ public class LocalSessionFactoryBean extends AbstractSessionFactoryBean implemen
|
||||
* or to specify all mappings locally.
|
||||
* @see org.hibernate.cfg.Configuration#addInputStream
|
||||
*/
|
||||
public void setMappingLocations(Resource[] mappingLocations) {
|
||||
public void setMappingLocations(Resource... mappingLocations) {
|
||||
this.mappingLocations = mappingLocations;
|
||||
}
|
||||
|
||||
@@ -286,7 +286,7 @@ public class LocalSessionFactoryBean extends AbstractSessionFactoryBean implemen
|
||||
* or to specify all mappings locally.
|
||||
* @see org.hibernate.cfg.Configuration#addCacheableFile(java.io.File)
|
||||
*/
|
||||
public void setCacheableMappingLocations(Resource[] cacheableMappingLocations) {
|
||||
public void setCacheableMappingLocations(Resource... cacheableMappingLocations) {
|
||||
this.cacheableMappingLocations = cacheableMappingLocations;
|
||||
}
|
||||
|
||||
@@ -297,7 +297,7 @@ public class LocalSessionFactoryBean extends AbstractSessionFactoryBean implemen
|
||||
* or to specify all mappings locally.
|
||||
* @see org.hibernate.cfg.Configuration#addJar(java.io.File)
|
||||
*/
|
||||
public void setMappingJarLocations(Resource[] mappingJarLocations) {
|
||||
public void setMappingJarLocations(Resource... mappingJarLocations) {
|
||||
this.mappingJarLocations = mappingJarLocations;
|
||||
}
|
||||
|
||||
@@ -308,7 +308,7 @@ public class LocalSessionFactoryBean extends AbstractSessionFactoryBean implemen
|
||||
* or to specify all mappings locally.
|
||||
* @see org.hibernate.cfg.Configuration#addDirectory(java.io.File)
|
||||
*/
|
||||
public void setMappingDirectoryLocations(Resource[] mappingDirectoryLocations) {
|
||||
public void setMappingDirectoryLocations(Resource... mappingDirectoryLocations) {
|
||||
this.mappingDirectoryLocations = mappingDirectoryLocations;
|
||||
}
|
||||
|
||||
@@ -408,7 +408,7 @@ public class LocalSessionFactoryBean extends AbstractSessionFactoryBean implemen
|
||||
* @see TypeDefinitionBean
|
||||
* @see org.hibernate.cfg.Mappings#addTypeDef(String, String, java.util.Properties)
|
||||
*/
|
||||
public void setTypeDefinitions(TypeDefinitionBean[] typeDefinitions) {
|
||||
public void setTypeDefinitions(TypeDefinitionBean... typeDefinitions) {
|
||||
this.typeDefinitions = typeDefinitions;
|
||||
}
|
||||
|
||||
@@ -422,7 +422,7 @@ public class LocalSessionFactoryBean extends AbstractSessionFactoryBean implemen
|
||||
* @see FilterDefinitionFactoryBean
|
||||
* @see org.hibernate.cfg.Configuration#addFilterDefinition
|
||||
*/
|
||||
public void setFilterDefinitions(FilterDefinition[] filterDefinitions) {
|
||||
public void setFilterDefinitions(FilterDefinition... filterDefinitions) {
|
||||
this.filterDefinitions = filterDefinitions;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2013 the original author or authors.
|
||||
* Copyright 2002-2014 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -99,19 +99,19 @@ public class AnnotationSessionFactoryBean extends LocalSessionFactoryBean implem
|
||||
|
||||
/**
|
||||
* Specify annotated classes, for which mappings will be read from
|
||||
* class-level JDK 1.5+ annotation metadata.
|
||||
* class-level annotation metadata.
|
||||
* @see org.hibernate.cfg.Configuration#addAnnotatedClass(Class)
|
||||
*/
|
||||
public void setAnnotatedClasses(Class<?>[] annotatedClasses) {
|
||||
public void setAnnotatedClasses(Class<?>... annotatedClasses) {
|
||||
this.annotatedClasses = annotatedClasses;
|
||||
}
|
||||
|
||||
/**
|
||||
* Specify the names of annotated packages, for which package-level
|
||||
* JDK 1.5+ annotation metadata will be read.
|
||||
* annotation metadata will be read.
|
||||
* @see org.hibernate.cfg.Configuration#addPackage(String)
|
||||
*/
|
||||
public void setAnnotatedPackages(String[] annotatedPackages) {
|
||||
public void setAnnotatedPackages(String... annotatedPackages) {
|
||||
this.annotatedPackages = annotatedPackages;
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ public class AnnotationSessionFactoryBean extends LocalSessionFactoryBean implem
|
||||
* classes in the classpath. This is analogous to Spring's component-scan feature
|
||||
* ({@link org.springframework.context.annotation.ClassPathBeanDefinitionScanner}).
|
||||
*/
|
||||
public void setPackagesToScan(String[] packagesToScan) {
|
||||
public void setPackagesToScan(String... packagesToScan) {
|
||||
this.packagesToScan = packagesToScan;
|
||||
}
|
||||
|
||||
@@ -134,7 +134,7 @@ public class AnnotationSessionFactoryBean extends LocalSessionFactoryBean implem
|
||||
* Hibernate's special {@code @org.hibernate.annotations.Entity}.
|
||||
* @see #setPackagesToScan
|
||||
*/
|
||||
public void setEntityTypeFilters(TypeFilter[] entityTypeFilters) {
|
||||
public void setEntityTypeFilters(TypeFilter... entityTypeFilters) {
|
||||
this.entityTypeFilters = entityTypeFilters;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user