For IntelliJ IDEA,
Android Studio or Eclipse



public void setWhere(Where whereAnn) { if ( whereAnn != null ) { where = whereAnn.clause(); } }
public void setBatchSize(BatchSize sizeAnn) { if ( sizeAnn != null ) { batchSize = sizeAnn.size(); } else { batchSize = -1; } }
@Override public void initialize(Generated annotation, Class<?> propertyType) { this.timing = annotation.value().getEquivalent(); }
public void setExplicitType(Type typeAnn) { if ( typeAnn != null ) { explicitType = typeAnn.type(); typeParameters.clear(); for ( Parameter param : typeAnn.parameters() ) { typeParameters.setProperty( param.name(), param.value() ); } } }
private static void setVersionInformation(XProperty property, PropertyBinder propertyBinder) { propertyBinder.getSimpleValueBinder().setVersion( true ); if(property.isAnnotationPresent( Source.class )) { Source source = property.getAnnotation( Source.class ); propertyBinder.getSimpleValueBinder().setTimestampVersionType( source.value().typeName() ); } }
private static void bindFetchProfile(FetchProfile fetchProfileAnnotation, MetadataBuildingContext context) { for ( FetchProfile.FetchOverride fetch : fetchProfileAnnotation.fetchOverrides() ) { org.hibernate.annotations.FetchMode mode = fetch.mode(); if ( !mode.equals( org.hibernate.annotations.FetchMode.JOIN ) ) { throw new MappingException( "Only FetchMode.JOIN is currently supported" ); } context.getMetadataCollector().addSecondPass( new VerifyFetchProfileReferenceSecondPass( fetchProfileAnnotation.name(), fetch, context ) ); } }
public static void bindNativeQueries( org.hibernate.annotations.NamedNativeQueries queriesAnn, MetadataBuildingContext context) { if ( queriesAnn == null ) { return; } for (org.hibernate.annotations.NamedNativeQuery q : queriesAnn.value()) { bindNativeQuery( q, context ); } }
public void addIndex(Index index, boolean inSecondPass) { if ( index == null ) return; String indexName = index.name(); addIndex( indexName, inSecondPass ); }
public static void bindQueries( org.hibernate.annotations.NamedQueries queriesAnn, MetadataBuildingContext context) { if ( queriesAnn == null ) { return; } for (org.hibernate.annotations.NamedQuery q : queriesAnn.value()) { bindQuery( q, context ); } }
public void processComplementaryTableDefinitions(Tables tables) { if ( tables == null ) return; for (org.hibernate.annotations.Table table : tables.value()) { processComplementaryTableDefinitions( table ); } }
public static String getCacheConcurrencyStrategy(CacheConcurrencyStrategy strategy) { org.hibernate.cache.spi.access.AccessType accessType = strategy.toAccessType(); return accessType == null ? null : accessType.getExternalName(); }
@Override public void initialize(GeneratorType annotation, Class<?> propertyType) { Class<? extends ValueGenerator<?>> generatorType = annotation.type(); constructor = ReflectHelper.getDefaultConstructor( generatorType ); this.generationTiming = annotation.when().getEquivalent(); }
public void setBatchSize(BatchSize batchSize) { this.batchSize = batchSize == null ? -1 : batchSize.size(); }