congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
FilterDefinition.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.hibernate.engine.spi.FilterDefinition
constructor

Best Java code snippets using org.hibernate.engine.spi.FilterDefinition.<init> (Showing top 15 results out of 315)

origin: hibernate/hibernate-orm

private static void bindFilterDef(FilterDef defAnn, MetadataBuildingContext context) {
  Map<String, org.hibernate.type.Type> params = new HashMap<>();
  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 );
}
origin: hibernate/hibernate-orm

new FilterDefinition(
    jaxbFilterDefinitionMapping.getName(),
    condition,
origin: riotfamily/riot

public void afterPropertiesSet() {
  this.filterDefinition =
      new FilterDefinition(this.filterName, this.defaultFilterCondition, this.parameterTypeMap);
}
origin: org.hibernate/com.springsource.org.hibernate

private static void parseFilterDef(Element element, Mappings mappings) {
  String name = element.attributeValue( "name" );
  LOG.debugf( "Parsing filter-def [%s]", name );
  String defaultCondition = element.getTextTrim();
  if ( StringHelper.isEmpty( defaultCondition ) ) {
    defaultCondition = element.attributeValue( "condition" );
  }
  HashMap paramMappings = new HashMap();
  Iterator params = element.elementIterator( "filter-param" );
  while ( params.hasNext() ) {
    final Element param = (Element) params.next();
    final String paramName = param.attributeValue( "name" );
    final String paramType = param.attributeValue( "type" );
    LOG.debugf( "Adding filter parameter : %s -> %s", paramName, paramType );
    final Type heuristicType = mappings.getTypeResolver().heuristicType( paramType );
    LOG.debugf( "Parameter heuristic type : %s", heuristicType );
    paramMappings.put( paramName, heuristicType );
  }
  LOG.debugf( "Parsed filter-def [%s]", name );
  FilterDefinition def = new FilterDefinition( name, defaultCondition, paramMappings );
  mappings.addFilterDefinition( def );
}
origin: org.jspresso.framework/jspresso-hibernate

/**
 * Registers the default Jspresso Filter.
 * <p>
 * {@inheritDoc}
 */
@Override
protected SessionFactory buildSessionFactory(LocalSessionFactoryBuilder sfb) {
 Map<String, Type> filterParameters = new HashMap<>();
 filterParameters.put(
   HibernateBackendController.JSPRESSO_SESSION_GLOBALS_LOGIN, sfb
     .getTypeResolver().heuristicType("string"));
 filterParameters.put(
   HibernateBackendController.JSPRESSO_SESSION_GLOBALS_LANGUAGE, sfb
     .getTypeResolver().heuristicType("string"));
 sfb.addFilterDefinition(new FilterDefinition(
   HibernateBackendController.JSPRESSO_SESSION_GLOBALS, null,
   filterParameters));
 return super.buildSessionFactory(sfb);
}
origin: org.hibernate/com.springsource.org.hibernate.core

private static void parseFilterDef(Element element, Mappings mappings) {
  String name = element.attributeValue( "name" );
  LOG.debugf( "Parsing filter-def [%s]", name );
  String defaultCondition = element.getTextTrim();
  if ( StringHelper.isEmpty( defaultCondition ) ) {
    defaultCondition = element.attributeValue( "condition" );
  }
  HashMap paramMappings = new HashMap();
  Iterator params = element.elementIterator( "filter-param" );
  while ( params.hasNext() ) {
    final Element param = (Element) params.next();
    final String paramName = param.attributeValue( "name" );
    final String paramType = param.attributeValue( "type" );
    LOG.debugf( "Adding filter parameter : %s -> %s", paramName, paramType );
    final Type heuristicType = mappings.getTypeResolver().heuristicType( paramType );
    LOG.debugf( "Parameter heuristic type : %s", heuristicType );
    paramMappings.put( paramName, heuristicType );
  }
  LOG.debugf( "Parsed filter-def [%s]", name );
  FilterDefinition def = new FilterDefinition( name, defaultCondition, paramMappings );
  mappings.addFilterDefinition( def );
}
origin: org.hibernate/com.springsource.org.hibernate.core

private static void bindFilterDef(FilterDef defAnn, Mappings mappings) {
  Map<String, org.hibernate.type.Type> params = new HashMap<String, org.hibernate.type.Type>();
  for ( ParamDef param : defAnn.parameters() ) {
    params.put( param.name(), mappings.getTypeResolver().heuristicType( param.type() ) );
  }
  FilterDefinition def = new FilterDefinition( defAnn.name(), defAnn.defaultCondition(), params );
  LOG.debugf( "Binding filter definition: %s", def.getFilterName() );
  mappings.addFilterDefinition( def );
}
origin: org.hibernate/com.springsource.org.hibernate

private static void bindFilterDef(FilterDef defAnn, Mappings mappings) {
  Map<String, org.hibernate.type.Type> params = new HashMap<String, org.hibernate.type.Type>();
  for ( ParamDef param : defAnn.parameters() ) {
    params.put( param.name(), mappings.getTypeResolver().heuristicType( param.type() ) );
  }
  FilterDefinition def = new FilterDefinition( defAnn.name(), defAnn.defaultCondition(), params );
  LOG.debugf( "Binding filter definition: %s", def.getFilterName() );
  mappings.addFilterDefinition( def );
}
origin: org.hibernate/com.springsource.org.hibernate

private static void bind(MetadataImplementor metadata, AnnotationInstance filterDef) {
  String name = JandexHelper.getValue( filterDef, "name", String.class );
  Map<String, Type> prms = new HashMap<String, Type>();
  for ( AnnotationInstance prm : JandexHelper.getValue( filterDef, "parameters", AnnotationInstance[].class ) ) {
    prms.put(
        JandexHelper.getValue( prm, "name", String.class ),
        metadata.getTypeResolver().heuristicType( JandexHelper.getValue( prm, "type", String.class ) )
    );
  }
  metadata.addFilterDefinition(
      new FilterDefinition(
          name,
          JandexHelper.getValue( filterDef, "defaultCondition", String.class ),
          prms
      )
  );
  LOG.debugf( "Binding filter definition: %s", name );
}
origin: org.hibernate/com.springsource.org.hibernate.core

private static void bind(MetadataImplementor metadata, AnnotationInstance filterDef) {
  String name = JandexHelper.getValue( filterDef, "name", String.class );
  Map<String, Type> prms = new HashMap<String, Type>();
  for ( AnnotationInstance prm : JandexHelper.getValue( filterDef, "parameters", AnnotationInstance[].class ) ) {
    prms.put(
        JandexHelper.getValue( prm, "name", String.class ),
        metadata.getTypeResolver().heuristicType( JandexHelper.getValue( prm, "type", String.class ) )
    );
  }
  metadata.addFilterDefinition(
      new FilterDefinition(
          name,
          JandexHelper.getValue( filterDef, "defaultCondition", String.class ),
          prms
      )
  );
  LOG.debugf( "Binding filter definition: %s", name );
}
origin: org.hibernate.orm/hibernate-core

new FilterDefinition(
    jaxbFilterDefinitionMapping.getName(),
    condition,
origin: org.hibernate.orm/hibernate-core

private static void bindFilterDef(FilterDef defAnn, MetadataBuildingContext context) {
  Map<String, Type> params = new HashMap<>();
  for ( ParamDef param : defAnn.parameters() ) {
    params.put(
        param.name(),
        context.getMetadataCollector()
            .getTypeConfiguration()
            .getBasicTypeRegistry()
            .getBasicTypeByName( param.type() )
    );
  }
  FilterDefinition def = new FilterDefinition( defAnn.name(), defAnn.defaultCondition(), params );
  LOG.debugf( "Binding filter definition: %s", def.getFilterName() );
  context.getMetadataCollector().addFilterDefinition( def );
}
origin: org.hibernate/com.springsource.org.hibernate.core

  condition = filterDefinition.getCondition();
metadata.addFilterDefinition( new FilterDefinition( name, condition, parameters ) );
origin: org.hibernate/com.springsource.org.hibernate

  condition = filterDefinition.getCondition();
metadata.addFilterDefinition( new FilterDefinition( name, condition, parameters ) );
origin: org.grails/grails-datastore-gorm-hibernate-core

String filterCondition = getMultiTenantFilterCondition(sessionFactoryBeanName, entity);
root.addFilter(GormProperties.TENANT_IDENTITY,filterCondition, true, Collections.<String, String>emptyMap(), Collections.<String, String>emptyMap());
mappings.addFilterDefinition(new FilterDefinition(
    GormProperties.TENANT_IDENTITY,
    filterCondition,
org.hibernate.engine.spiFilterDefinition<init>

Javadoc

Construct a new FilterDefinition instance.

Popular methods of FilterDefinition

  • getDefaultFilterCondition
  • getFilterName
    Get the name of the filter this configuration defines.
  • getParameterNames
    Get a set of the parameters defined by this configuration.
  • getParameterType
    Retrieve the type of the named parameter defined for this filter.
  • getParameterTypes

Popular in Java

  • Making http post requests using okhttp
  • getResourceAsStream (ClassLoader)
  • scheduleAtFixedRate (Timer)
  • putExtra (Intent)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now