Search in sources :

Example 1 with ParamDef

use of org.hibernate.annotations.ParamDef in project hibernate-orm by hibernate.

the class AnnotationBinder method bindFilterDef.

private static void bindFilterDef(FilterDef defAnn, MetadataBuildingContext context) {
    Map<String, org.hibernate.type.Type> params = new HashMap<String, org.hibernate.type.Type>();
    for (ParamDef param : defAnn.parameters()) {
        params.put(param.name(), context.getMetadataCollector().getTypeResolver().heuristicType(param.type()));
    }
    FilterDefinition def = new FilterDefinition(defAnn.name(), defAnn.defaultCondition(), params);
    LOG.debugf("Binding filter definition: %s", def.getFilterName());
    context.getMetadataCollector().addFilterDefinition(def);
}
Also used : FilterDefinition(org.hibernate.engine.spi.FilterDefinition) InheritanceType(javax.persistence.InheritanceType) FetchType(javax.persistence.FetchType) GenerationType(javax.persistence.GenerationType) DiscriminatorType(javax.persistence.DiscriminatorType) CascadeType(org.hibernate.annotations.CascadeType) MapKeyType(org.hibernate.annotations.MapKeyType) ParamDef(org.hibernate.annotations.ParamDef) HashMap(java.util.HashMap)

Aggregations

HashMap (java.util.HashMap)1 DiscriminatorType (javax.persistence.DiscriminatorType)1 FetchType (javax.persistence.FetchType)1 GenerationType (javax.persistence.GenerationType)1 InheritanceType (javax.persistence.InheritanceType)1 CascadeType (org.hibernate.annotations.CascadeType)1 MapKeyType (org.hibernate.annotations.MapKeyType)1 ParamDef (org.hibernate.annotations.ParamDef)1 FilterDefinition (org.hibernate.engine.spi.FilterDefinition)1