Revert "All SFBuilder setters return 'this' & use varargs"

This reverts commit 0e2ce565c9.
This commit is contained in:
Chris Beams 2011-10-09 07:55:33 +00:00
parent 1a8531b401
commit 0d43023571
2 changed files with 14 additions and 19 deletions

View File

@ -817,7 +817,7 @@ public abstract class SessionFactoryBuilderSupport<This extends SessionFactoryBu
* @throws SQLException if thrown by JDBC methods
* @see #executeSchemaStatement
*/
protected void executeSchemaScript(Connection con, String... sql) throws SQLException {
protected void executeSchemaScript(Connection con, String[] sql) throws SQLException {
if (sql != null && sql.length > 0) {
boolean oldAutoCommit = con.getAutoCommit();
if (!oldAutoCommit) {
@ -954,9 +954,8 @@ public abstract class SessionFactoryBuilderSupport<This extends SessionFactoryBu
* resources are specified locally via this bean.
* @see org.hibernate.cfg.Configuration#configure(java.net.URL)
*/
public This setConfigLocation(Resource configLocation) {
public void setConfigLocation(Resource configLocation) {
this.configLocations = new Resource[] {configLocation};
return this.instance;
}
/**
@ -979,9 +978,8 @@ public abstract class SessionFactoryBuilderSupport<This extends SessionFactoryBu
* or to specify all mappings locally.
* @see org.hibernate.cfg.Configuration#addCacheableFile(java.io.File)
*/
public This setCacheableMappingLocations(Resource... cacheableMappingLocations) {
public void setCacheableMappingLocations(Resource[] cacheableMappingLocations) {
this.cacheableMappingLocations = cacheableMappingLocations;
return this.instance;
}
@ -992,9 +990,8 @@ public abstract class SessionFactoryBuilderSupport<This extends SessionFactoryBu
* resources are specified locally via this bean.
* @see org.hibernate.cfg.Configuration#configure(java.net.URL)
*/
public This setConfigLocations(Resource... configLocations) {
public void setConfigLocations(Resource[] configLocations) {
this.configLocations = configLocations;
return this.instance;
}
/**
@ -1006,9 +1003,8 @@ public abstract class SessionFactoryBuilderSupport<This extends SessionFactoryBu
* @see org.springframework.orm.hibernate3.support.BlobByteArrayType
* @see org.springframework.orm.hibernate3.support.BlobSerializableType
*/
public This setLobHandler(LobHandler lobHandler) {
public void setLobHandler(LobHandler lobHandler) {
this.lobHandler = lobHandler;
return this.instance;
}
/**
@ -1170,7 +1166,7 @@ public abstract class SessionFactoryBuilderSupport<This extends SessionFactoryBu
* @see #setMappingLocations
* @see org.hibernate.cfg.Configuration#addResource
*/
public This setMappingResources(String... mappingResources) {
public This setMappingResources(String[] mappingResources) {
this.mappingResources = mappingResources;
return instance;
}
@ -1182,7 +1178,7 @@ public abstract class SessionFactoryBuilderSupport<This extends SessionFactoryBu
* or to specify all mappings locally.
* @see org.hibernate.cfg.Configuration#addJar(java.io.File)
*/
public This setMappingJarLocations(Resource... mappingJarLocations) {
public This setMappingJarLocations(Resource[] mappingJarLocations) {
this.mappingJarLocations = mappingJarLocations;
return instance;
}
@ -1194,7 +1190,7 @@ public abstract class SessionFactoryBuilderSupport<This extends SessionFactoryBu
* or to specify all mappings locally.
* @see org.hibernate.cfg.Configuration#addDirectory(java.io.File)
*/
public This setMappingDirectoryLocations(Resource... mappingDirectoryLocations) {
public This setMappingDirectoryLocations(Resource[] mappingDirectoryLocations) {
this.mappingDirectoryLocations = mappingDirectoryLocations;
return instance;
}
@ -1208,7 +1204,7 @@ public abstract class SessionFactoryBuilderSupport<This extends SessionFactoryBu
* or to specify all mappings locally.
* @see org.hibernate.cfg.Configuration#addInputStream
*/
public This setMappingLocations(Resource... mappingLocations) {
public This setMappingLocations(Resource[] mappingLocations) {
this.mappingLocations = mappingLocations;
return instance;
}
@ -1325,7 +1321,7 @@ public abstract class SessionFactoryBuilderSupport<This extends SessionFactoryBu
* @see FilterDefinitionFactoryBean
* @see org.hibernate.cfg.Configuration#addFilterDefinition
*/
public This setFilterDefinitions(FilterDefinition... filterDefinitions) {
public This setFilterDefinitions(FilterDefinition[] filterDefinitions) {
this.filterDefinitions = filterDefinitions;
return this.instance;
}
@ -1339,7 +1335,7 @@ public abstract class SessionFactoryBuilderSupport<This extends SessionFactoryBu
* @see TypeDefinitionBean
* @see org.hibernate.cfg.Mappings#addTypeDef(String, String, java.util.Properties)
*/
public This setTypeDefinitions(TypeDefinitionBean... typeDefinitions) {
public This setTypeDefinitions(TypeDefinitionBean[] typeDefinitions) {
this.typeDefinitions = typeDefinitions;
return this.instance;
}

View File

@ -167,7 +167,7 @@ public class AnnotationSessionFactoryBuilder extends SessionFactoryBuilderSuppor
* JDK 1.5+ annotation metadata will be read.
* @see org.hibernate.cfg.AnnotationConfiguration#addPackage
*/
public AnnotationSessionFactoryBuilder setAnnotatedPackages(String... annotatedPackages) {
public AnnotationSessionFactoryBuilder setAnnotatedPackages(String[] annotatedPackages) {
this.annotatedPackages = annotatedPackages;
return this;
}
@ -180,14 +180,13 @@ public class AnnotationSessionFactoryBuilder extends SessionFactoryBuilderSuppor
* Hibernate's special <code>@org.hibernate.annotations.Entity</code>.
* @see #setPackagesToScan
*/
public AnnotationSessionFactoryBuilder setEntityTypeFilters(TypeFilter... entityTypeFilters) {
public AnnotationSessionFactoryBuilder setEntityTypeFilters(TypeFilter[] entityTypeFilters) {
this.entityTypeFilters = entityTypeFilters;
return this;
}
public AnnotationSessionFactoryBuilder setResourcePatternResolver(ResourcePatternResolver resourcePatternResolver) {
public void setResourcePatternResolver(ResourcePatternResolver resourcePatternResolver) {
this.resourcePatternResolver = resourcePatternResolver;
return this;
}
/**