Checkstyle fixups
This commit is contained in:
parent
58473c87dd
commit
2b66cd72bb
|
@ -19,6 +19,9 @@ public interface Metamodel extends javax.persistence.metamodel.Metamodel {
|
|||
*/
|
||||
SessionFactory getSessionFactory();
|
||||
|
||||
/**
|
||||
* @deprecated since 5.2
|
||||
*/
|
||||
@Deprecated
|
||||
default EntityType getEntityTypeByName(String entityName) {
|
||||
return entity( entityName );
|
||||
|
|
|
@ -444,6 +444,7 @@ public interface Query<R> extends org.hibernate.BasicQueryContract, TypedQuery<R
|
|||
*
|
||||
* @deprecated (since 5.2) use {@link ParameterMetadata#getNamedParameterNames()}
|
||||
*/
|
||||
@Deprecated
|
||||
String[] getNamedParameters();
|
||||
|
||||
/**
|
||||
|
|
|
@ -818,6 +818,9 @@ public class SessionFactoryBuilderImpl implements SessionFactoryBuilderImplement
|
|||
return transactionCoordinatorBuilder.getDefaultConnectionHandlingMode();
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since 5.2
|
||||
*/
|
||||
@Deprecated
|
||||
private PhysicalConnectionHandlingMode interpretConnectionHandlingMode(
|
||||
ConnectionAcquisitionMode specifiedAcquisitionMode,
|
||||
|
|
|
@ -860,6 +860,7 @@ public interface AvailableSettings {
|
|||
* Proxool/Hibernate property prefix
|
||||
* @deprecated Use {@link #PROXOOL_CONFIG_PREFIX} instead
|
||||
*/
|
||||
@Deprecated
|
||||
String PROXOOL_PREFIX = PROXOOL_CONFIG_PREFIX;
|
||||
|
||||
/**
|
||||
|
|
|
@ -121,8 +121,7 @@ public class CopyIdentifierComponentSecondPass implements SecondPass {
|
|||
|
||||
|
||||
Iterator<Property> propertyIterator = referencedValue.getPropertyIterator();
|
||||
while(propertyIterator.hasNext())
|
||||
{
|
||||
while(propertyIterator.hasNext()) {
|
||||
Property referencedComponentProperty = propertyIterator.next();
|
||||
|
||||
if ( referencedComponentProperty.isComposite() ) {
|
||||
|
|
|
@ -220,7 +220,8 @@ public final class Environment implements AvailableSettings {
|
|||
synchronized (systemProperties) {
|
||||
GLOBAL_PROPERTIES.putAll(systemProperties);
|
||||
}
|
||||
} catch (SecurityException se) {
|
||||
}
|
||||
catch (SecurityException se) {
|
||||
LOG.unableToCopySystemProperties();
|
||||
}
|
||||
|
||||
|
|
|
@ -316,8 +316,7 @@ public abstract class ExternalSessionFactoryConfig {
|
|||
}
|
||||
}
|
||||
|
||||
private void verifyInt(String value)
|
||||
{
|
||||
private void verifyInt(String value) {
|
||||
if ( value != null ) {
|
||||
Integer.parseInt( value );
|
||||
}
|
||||
|
|
|
@ -82,9 +82,11 @@ public class IndexOrUniqueKeySecondPass implements SecondPass {
|
|||
"@Index references a unknown column: " + columnName
|
||||
);
|
||||
}
|
||||
if ( unique )
|
||||
if ( unique ) {
|
||||
table.getOrCreateUniqueKey( indexName ).addColumn( column );
|
||||
else
|
||||
}
|
||||
else {
|
||||
table.getOrCreateIndex( indexName ).addColumn( column );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -240,9 +240,10 @@ public class InheritanceState {
|
|||
for (XClass xclass = clazz; xclass != null; xclass = xclass.getSuperclass()) {
|
||||
if ( ( xclass.getSuperclass() == null || Object.class.getName().equals( xclass.getSuperclass().getName() ) )
|
||||
&& ( xclass.isAnnotationPresent( Entity.class ) || xclass.isAnnotationPresent( MappedSuperclass.class ) )
|
||||
&& xclass.isAnnotationPresent(Access.class))
|
||||
&& xclass.isAnnotationPresent( Access.class ) ) {
|
||||
return AccessType.getAccessStrategy( xclass.getAnnotation( Access.class ).value() );
|
||||
}
|
||||
}
|
||||
// Guess from identifier.
|
||||
// FIX: Shouldn't this be determined by the first attribute (i.e., field or property) with annotations, but without an
|
||||
// explicit Access annotation, according to JPA 2.0 spec 2.3.1: Default Access Type?
|
||||
|
|
|
@ -46,5 +46,3 @@ public enum MetadataSourceType {
|
|||
throw new HibernateException( "Unknown metadata source type value [" + value + "]" );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -308,4 +308,3 @@ public class OneToOneSecondPass implements SecondPass {
|
|||
return join;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ public class PkDrivenByDefaultMapsIdSecondPass implements SecondPass {
|
|||
throw new AnnotationException(
|
||||
"Unknown entity name: " + referencedEntityName
|
||||
);
|
||||
};
|
||||
}
|
||||
TableBinder.linkJoinColumnWithValueOverridingNameIfImplicit(
|
||||
referencedEntity,
|
||||
referencedEntity.getKey().getColumnIterator(),
|
||||
|
|
|
@ -401,5 +401,3 @@ class PropertyContainer {
|
|||
|| "org.hibernate.bytecode.internal.javassist.FieldHandler".equals( property.getType().getName() );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -54,5 +54,3 @@ public class VerifyFetchProfileReferenceSecondPass implements SecondPass {
|
|||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -53,15 +53,17 @@ public class ListBinder extends CollectionBinder {
|
|||
|
||||
@Override
|
||||
public void setSqlOrderBy(OrderBy orderByAnn) {
|
||||
if ( orderByAnn != null )
|
||||
if ( orderByAnn != null ) {
|
||||
LOG.orderByAnnotationIndexedCollection();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSort(Sort sortAnn) {
|
||||
if ( sortAnn != null )
|
||||
if ( sortAnn != null ) {
|
||||
LOG.sortAnnotationIndexedCollection();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public SecondPass getSecondPass(
|
||||
|
|
|
@ -310,11 +310,21 @@ public class XMLContext implements Serializable {
|
|||
|
||||
public void override(Default globalDefault) {
|
||||
if ( globalDefault != null ) {
|
||||
if ( globalDefault.getAccess() != null ) access = globalDefault.getAccess();
|
||||
if ( globalDefault.getPackageName() != null ) packageName = globalDefault.getPackageName();
|
||||
if ( globalDefault.getSchema() != null ) schema = globalDefault.getSchema();
|
||||
if ( globalDefault.getCatalog() != null ) catalog = globalDefault.getCatalog();
|
||||
if ( globalDefault.getDelimitedIdentifier() != null ) delimitedIdentifier = globalDefault.getDelimitedIdentifier();
|
||||
if ( globalDefault.getAccess() != null ) {
|
||||
access = globalDefault.getAccess();
|
||||
}
|
||||
if ( globalDefault.getPackageName() != null ) {
|
||||
packageName = globalDefault.getPackageName();
|
||||
}
|
||||
if ( globalDefault.getSchema() != null ) {
|
||||
schema = globalDefault.getSchema();
|
||||
}
|
||||
if ( globalDefault.getCatalog() != null ) {
|
||||
catalog = globalDefault.getCatalog();
|
||||
}
|
||||
if ( globalDefault.getDelimitedIdentifier() != null ) {
|
||||
delimitedIdentifier = globalDefault.getDelimitedIdentifier();
|
||||
}
|
||||
if ( globalDefault.getMetadataComplete() != null ) {
|
||||
metadataComplete = globalDefault.getMetadataComplete();
|
||||
}
|
||||
|
|
|
@ -42,8 +42,10 @@ import org.jboss.logging.Logger;
|
|||
public class BeanValidationEventListener
|
||||
implements PreInsertEventListener, PreUpdateEventListener, PreDeleteEventListener {
|
||||
|
||||
private static final CoreMessageLogger LOG = Logger.getMessageLogger(CoreMessageLogger.class,
|
||||
BeanValidationEventListener.class.getName());
|
||||
private static final CoreMessageLogger LOG = Logger.getMessageLogger(
|
||||
CoreMessageLogger.class,
|
||||
BeanValidationEventListener.class.getName()
|
||||
);
|
||||
|
||||
private ValidatorFactory factory;
|
||||
private ConcurrentHashMap<EntityPersister, Set<String>> associationsPerEntityPersister =
|
||||
|
|
|
@ -60,7 +60,8 @@ public class HibernateTraversableResolver implements TraversableResolver {
|
|||
//ToOne association
|
||||
else if ( type.isEntityType() || type.isAnyType() ) {
|
||||
associations.add( prefix + name );
|
||||
} else if ( type.isComponentType() ) {
|
||||
}
|
||||
else if ( type.isComponentType() ) {
|
||||
CompositeType componentType = (CompositeType) type;
|
||||
addAssociationsToTheSetForAllProperties(
|
||||
componentType.getPropertyNames(),
|
||||
|
|
|
@ -163,7 +163,8 @@ public class ParameterParser {
|
|||
// colon character has been escaped
|
||||
recognizer.other( c );
|
||||
indx++;
|
||||
} else if ( c == ':' ) {
|
||||
}
|
||||
else if ( c == ':' ) {
|
||||
// named parameter
|
||||
final int right = StringHelper.firstIndexOfChar( sqlString, ParserHelper.HQL_SEPARATORS_BITSET, indx + 1 );
|
||||
final int chopLocation = right < 0 ? sqlString.length() : right;
|
||||
|
|
|
@ -367,6 +367,7 @@ public interface SessionFactoryImplementor extends Mapping, SessionFactory, Quer
|
|||
* @param entityName The entity name for which to get the collection roles.
|
||||
* @return set of all the collection roles in which the given entityName participates.
|
||||
*/
|
||||
@Deprecated
|
||||
default Set<String> getCollectionRolesByEntityParticipant(String entityName) {
|
||||
return getMetamodel().getCollectionRolesByEntityParticipant( entityName );
|
||||
}
|
||||
|
|
|
@ -47,15 +47,20 @@ public class GetterFieldImpl implements Getter {
|
|||
if ( type.isPrimitive() ) {
|
||||
if ( type == Boolean.TYPE ) {
|
||||
return Boolean.valueOf( field.getBoolean( owner ) );
|
||||
} else if ( type == Byte.TYPE ) {
|
||||
}
|
||||
else if ( type == Byte.TYPE ) {
|
||||
return Byte.valueOf( field.getByte( owner ) );
|
||||
} else if ( type == Character.TYPE ) {
|
||||
}
|
||||
else if ( type == Character.TYPE ) {
|
||||
return Character.valueOf( field.getChar( owner ) );
|
||||
} else if ( type == Integer.TYPE ) {
|
||||
}
|
||||
else if ( type == Integer.TYPE ) {
|
||||
return Integer.valueOf( field.getInt( owner ) );
|
||||
} else if ( type == Long.TYPE ) {
|
||||
}
|
||||
else if ( type == Long.TYPE ) {
|
||||
return Long.valueOf( field.getLong( owner ) );
|
||||
} else if ( type == Short.TYPE ) {
|
||||
}
|
||||
else if ( type == Short.TYPE ) {
|
||||
return Short.valueOf( field.getShort( owner ) );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -120,9 +120,10 @@ public class BindingTypeHelper {
|
|||
public BasicType resolveDateTemporalTypeVariant(Class javaType, Type baseType) {
|
||||
// prefer to use any Type already known
|
||||
if ( baseType != null && baseType instanceof BasicType ) {
|
||||
if ( baseType.getReturnedClass().isAssignableFrom( javaType ) )
|
||||
if ( baseType.getReturnedClass().isAssignableFrom( javaType ) ) {
|
||||
return (BasicType) baseType;
|
||||
}
|
||||
}
|
||||
|
||||
if ( Calendar.class.isAssignableFrom( javaType ) ) {
|
||||
return CalendarDateType.INSTANCE;
|
||||
|
|
|
@ -10,7 +10,6 @@ import java.util.HashMap;
|
|||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.hibernate.envers.boot.internal.EnversService;
|
||||
import org.hibernate.envers.configuration.EnversSettings;
|
||||
import org.hibernate.envers.strategy.DefaultAuditStrategy;
|
||||
import org.hibernate.internal.util.config.ConfigurationHelper;
|
||||
|
|
|
@ -375,7 +375,7 @@ public final class MetadataTools {
|
|||
/**
|
||||
* An iterator over column names.
|
||||
*/
|
||||
public static abstract class ColumnNameIterator implements Iterator<String> {
|
||||
public abstract static class ColumnNameIterator implements Iterator<String> {
|
||||
}
|
||||
|
||||
public static ColumnNameIterator getColumnNameIterator(final Iterator<Selectable> selectableIterator) {
|
||||
|
|
|
@ -20,8 +20,8 @@ import org.hibernate.envers.internal.tools.MutableInteger;
|
|||
* @author Adam Warski (adam at warski dot org)
|
||||
*/
|
||||
public class Parameters {
|
||||
public final static String AND = "and";
|
||||
public final static String OR = "or";
|
||||
public static final String AND = "and";
|
||||
public static final String OR = "or";
|
||||
|
||||
/**
|
||||
* Main alias of the entity.
|
||||
|
|
|
@ -69,7 +69,7 @@ public class ValidityAuditStrategy implements AuditStrategy {
|
|||
/**
|
||||
* getter for the revision entity field annotated with @RevisionTimestamp
|
||||
*/
|
||||
private Getter revisionTimestampGetter = null;
|
||||
private Getter revisionTimestampGetter;
|
||||
|
||||
private final SessionCacheCleaner sessionCacheCleaner;
|
||||
|
||||
|
|
Loading…
Reference in New Issue