Examples of strategy()


Examples of javax.persistence.GeneratedValue.strategy()

    final boolean isComponent = returnedClass.isAnnotationPresent( Embeddable.class )
        || property.isAnnotationPresent( EmbeddedId.class );

    GeneratedValue generatedValue = property.getAnnotation( GeneratedValue.class );
    String generatorType = generatedValue != null ?
        generatorType( generatedValue.strategy(), mappings ) :
        "assigned";
    String generatorName = generatedValue != null ?
        generatedValue.generator() :
        BinderHelper.ANNOTATION_STRING_DEFAULT;
    if ( isComponent ) {
View Full Code Here

Examples of javax.persistence.GeneratedValue.strategy()

        Map<String, IdGenerator> localGenerators = new HashMap<String, IdGenerator>();
        localGenerators.putAll( buildLocalGenerators( property, mappings ) );

        GeneratedValue generatedValue = property.getAnnotation( GeneratedValue.class );
        String generatorType = generatedValue != null ? generatorType(
            generatedValue.strategy(), mappings
        ) : "assigned";
        String generator = generatedValue != null ? generatedValue.generator() : BinderHelper.ANNOTATION_STRING_DEFAULT;

        BinderHelper.makeIdGenerator(
            ( SimpleValue ) comp.getProperty( property.getName() ).getValue(),
View Full Code Here

Examples of javax.persistence.GeneratedValue.strategy()

    protected void setupColumnInfo(Class<?> clazz, AttributeOverride[] overrides, String tableName, boolean isEmbedded, boolean isId) {
        flags = Flag.Selectable.setTrue(flags);
        GeneratedValue gv = field.getAnnotation(GeneratedValue.class);
        if (gv != null) {
            if (gv.strategy() == GenerationType.IDENTITY) {
                flags = Flag.DbGenerated.setTrue(flags);
            } else if (gv.strategy() == GenerationType.SEQUENCE) {
                assert (false) : "Sequence generation not supported.";
                flags = Flag.DaoGenerated.setTrue(flags);
                flags = Flag.Insertable.setTrue(flags);
View Full Code Here

Examples of javax.persistence.GeneratedValue.strategy()

        flags = Flag.Selectable.setTrue(flags);
        GeneratedValue gv = field.getAnnotation(GeneratedValue.class);
        if (gv != null) {
            if (gv.strategy() == GenerationType.IDENTITY) {
                flags = Flag.DbGenerated.setTrue(flags);
            } else if (gv.strategy() == GenerationType.SEQUENCE) {
                assert (false) : "Sequence generation not supported.";
                flags = Flag.DaoGenerated.setTrue(flags);
                flags = Flag.Insertable.setTrue(flags);
                flags = Flag.SequenceGV.setTrue(flags);
            } else if (gv.strategy() == GenerationType.TABLE) {
View Full Code Here

Examples of javax.persistence.GeneratedValue.strategy()

            } else if (gv.strategy() == GenerationType.SEQUENCE) {
                assert (false) : "Sequence generation not supported.";
                flags = Flag.DaoGenerated.setTrue(flags);
                flags = Flag.Insertable.setTrue(flags);
                flags = Flag.SequenceGV.setTrue(flags);
            } else if (gv.strategy() == GenerationType.TABLE) {
                flags = Flag.DaoGenerated.setTrue(flags);
                flags = Flag.Insertable.setTrue(flags);
                flags = Flag.TableGV.setTrue(flags);
            } else if (gv.strategy() == GenerationType.AUTO) {
                flags = Flag.DaoGenerated.setTrue(flags);
View Full Code Here

Examples of javax.persistence.Inheritance.strategy()

    XAnnotatedElement element = getClazz();
    Inheritance inhAnn = element.getAnnotation( Inheritance.class );
    MappedSuperclass mappedSuperClass = element.getAnnotation( MappedSuperclass.class );
    if ( mappedSuperClass != null ) {
      setEmbeddableSuperclass( true );
      setType( inhAnn == null ? null : inhAnn.strategy() );
    }
    else {
      setType( inhAnn == null ? InheritanceType.SINGLE_TABLE : inhAnn.strategy() );
    }
  }
View Full Code Here

Examples of javax.persistence.Inheritance.strategy()

    if ( mappedSuperClass != null ) {
      setEmbeddableSuperclass( true );
      setType( inhAnn == null ? null : inhAnn.strategy() );
    }
    else {
      setType( inhAnn == null ? InheritanceType.SINGLE_TABLE : inhAnn.strategy() );
    }
  }

  boolean hasTable() {
    return !hasParents() || !InheritanceType.SINGLE_TABLE.equals( getType() );
View Full Code Here

Examples of javax.persistence.Inheritance.strategy()

    XAnnotatedElement element = clazz;
    Inheritance inhAnn = element.getAnnotation( Inheritance.class );
    MappedSuperclass mappedSuperClass = element.getAnnotation( MappedSuperclass.class );
    if ( mappedSuperClass != null ) {
      isEmbeddableSuperclass = true;
      type = inhAnn == null ? null : inhAnn.strategy();
    }
    else {
      type = inhAnn == null ? InheritanceType.SINGLE_TABLE : inhAnn.strategy();
    }
  }
View Full Code Here

Examples of javax.persistence.Inheritance.strategy()

    if ( mappedSuperClass != null ) {
      isEmbeddableSuperclass = true;
      type = inhAnn == null ? null : inhAnn.strategy();
    }
    else {
      type = inhAnn == null ? InheritanceType.SINGLE_TABLE : inhAnn.strategy();
    }
  }

  boolean hasTable() {
    return !hasParents || !InheritanceType.SINGLE_TABLE.equals( type );
View Full Code Here

Examples of javax.persistence.Inheritance.strategy()

    XAnnotatedElement element = getClazz();
    Inheritance inhAnn = element.getAnnotation( Inheritance.class );
    MappedSuperclass mappedSuperClass = element.getAnnotation( MappedSuperclass.class );
    if ( mappedSuperClass != null ) {
      setEmbeddableSuperclass( true );
      setType( inhAnn == null ? null : inhAnn.strategy() );
    }
    else {
      setType( inhAnn == null ? InheritanceType.SINGLE_TABLE : inhAnn.strategy() );
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.