Package org.hibernate.annotations

Examples of org.hibernate.annotations.GenericGenerator


  private static HashMap<String, IdGenerator> buildLocalGenerators(XAnnotatedElement annElt, Mappings mappings) {
    HashMap<String, IdGenerator> generators = new HashMap<String, IdGenerator>();
    TableGenerator tabGen = annElt.getAnnotation( TableGenerator.class );
    SequenceGenerator seqGen = annElt.getAnnotation( SequenceGenerator.class );
    GenericGenerator genGen = annElt.getAnnotation( GenericGenerator.class );
    if ( tabGen != null ) {
      IdGenerator idGen = buildIdGenerator( tabGen, mappings );
      generators.put( idGen.getName(), idGen );
    }
    if ( seqGen != null ) {
View Full Code Here


    bindFetchProfiles( pckg, mappings );
    BinderHelper.bindAnyMetaDefs( pckg, mappings );
  }

  private static void bindGenericGenerators(XAnnotatedElement annotatedElement, Mappings mappings) {
    GenericGenerator defAnn = annotatedElement.getAnnotation( GenericGenerator.class );
    GenericGenerators defsAnn = annotatedElement.getAnnotation( GenericGenerators.class );
    if ( defAnn != null ) {
      bindGenericGenerator( defAnn, mappings );
    }
    if ( defsAnn != null ) {
View Full Code Here

        idGen.addParam( SequenceHiLoGenerator.MAX_LO, String.valueOf( seqGen.allocationSize() - 1 ) );
        log.trace( "Add sequence generator with name: {}", idGen.getName() );
      }
    }
    else if ( ann instanceof GenericGenerator ) {
      GenericGenerator genGen = ( GenericGenerator ) ann;
      idGen.setName( genGen.name() );
      idGen.setIdentifierGeneratorStrategy( genGen.strategy() );
      Parameter[] params = genGen.parameters();
      for ( Parameter parameter : params ) {
        idGen.addParam( parameter.name(), parameter.value() );
      }
      log.trace( "Add generic generator with name: {}", idGen.getName() );
    }
View Full Code Here

  private static HashMap<String, IdGenerator> buildLocalGenerators(XAnnotatedElement annElt, Mappings mappings) {
    HashMap<String, IdGenerator> generators = new HashMap<String, IdGenerator>();
    TableGenerator tabGen = annElt.getAnnotation( TableGenerator.class );
    SequenceGenerator seqGen = annElt.getAnnotation( SequenceGenerator.class );
    GenericGenerator genGen = annElt.getAnnotation( GenericGenerator.class );
    if ( tabGen != null ) {
      IdGenerator idGen = buildIdGenerator( tabGen, mappings );
      generators.put( idGen.getName(), idGen );
    }
    if ( seqGen != null ) {
View Full Code Here

    bindFetchProfiles( pckg, mappings );
    BinderHelper.bindAnyMetaDefs( pckg, mappings );
  }

  private static void bindGenericGenerators(XAnnotatedElement annotatedElement, Mappings mappings) {
    GenericGenerator defAnn = annotatedElement.getAnnotation( GenericGenerator.class );
    GenericGenerators defsAnn = annotatedElement.getAnnotation( GenericGenerators.class );
    if ( defAnn != null ) {
      bindGenericGenerator( defAnn, mappings );
    }
    if ( defsAnn != null ) {
View Full Code Here

          LOG.tracev( "Add sequence generator with name: {0}", idGen.getName() );
        }
      }
    }
    else if ( ann instanceof GenericGenerator ) {
      GenericGenerator genGen = ( GenericGenerator ) ann;
      idGen.setName( genGen.name() );
      idGen.setIdentifierGeneratorStrategy( genGen.strategy() );
      Parameter[] params = genGen.parameters();
      for ( Parameter parameter : params ) {
        idGen.addParam( parameter.name(), parameter.value() );
      }
      if ( LOG.isTraceEnabled() ) {
        LOG.tracev( "Add generic generator with name: {0}", idGen.getName() );
View Full Code Here

  private static HashMap<String, IdGenerator> buildLocalGenerators(XAnnotatedElement annElt, Mappings mappings) {
    HashMap<String, IdGenerator> generators = new HashMap<String, IdGenerator>();
    TableGenerator tabGen = annElt.getAnnotation( TableGenerator.class );
    SequenceGenerator seqGen = annElt.getAnnotation( SequenceGenerator.class );
    GenericGenerator genGen = annElt.getAnnotation( GenericGenerator.class );
    if ( tabGen != null ) {
      IdGenerator idGen = buildIdGenerator( tabGen, mappings );
      generators.put( idGen.getName(), idGen );
    }
    if ( seqGen != null ) {
View Full Code Here

    bindFetchProfiles( pckg, mappings );
    BinderHelper.bindAnyMetaDefs( pckg, mappings );
  }

  private static void bindGenericGenerators(XAnnotatedElement annotatedElement, Mappings mappings) {
    GenericGenerator defAnn = annotatedElement.getAnnotation( GenericGenerator.class );
    GenericGenerators defsAnn = annotatedElement.getAnnotation( GenericGenerators.class );
    if ( defAnn != null ) {
      bindGenericGenerator( defAnn, mappings );
    }
    if ( defsAnn != null ) {
View Full Code Here

        idGen.addParam( SequenceHiLoGenerator.MAX_LO, String.valueOf( seqGen.allocationSize() - 1 ) );
        log.trace( "Add sequence generator with name: {}", idGen.getName() );
      }
    }
    else if ( ann instanceof GenericGenerator ) {
      GenericGenerator genGen = ( GenericGenerator ) ann;
      idGen.setName( genGen.name() );
      idGen.setIdentifierGeneratorStrategy( genGen.strategy() );
      Parameter[] params = genGen.parameters();
      for ( Parameter parameter : params ) {
        idGen.addParam( parameter.name(), parameter.value() );
      }
      log.trace( "Add generic generator with name: {}", idGen.getName() );
    }
View Full Code Here

  private static HashMap<String, IdGenerator> buildLocalGenerators(XAnnotatedElement annElt, Mappings mappings) {
    HashMap<String, IdGenerator> generators = new HashMap<String, IdGenerator>();
    TableGenerator tabGen = annElt.getAnnotation( TableGenerator.class );
    SequenceGenerator seqGen = annElt.getAnnotation( SequenceGenerator.class );
    GenericGenerator genGen = annElt.getAnnotation( GenericGenerator.class );
    if ( tabGen != null ) {
      IdGenerator idGen = buildIdGenerator( tabGen, mappings );
      generators.put( idGen.getName(), idGen );
    }
    if ( seqGen != null ) {
View Full Code Here

TOP

Related Classes of org.hibernate.annotations.GenericGenerator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.