Examples of Persister


Examples of org.hibernate.annotations.Persister

    }

    collection.setMutable( !property.isAnnotationPresent( Immutable.class ) );
    OptimisticLock lockAnn = property.getAnnotation( OptimisticLock.class );
    if ( lockAnn != null ) collection.setOptimisticLocked( !lockAnn.excluded() );
    Persister persisterAnn = property.getAnnotation( Persister.class );
    if ( persisterAnn != null ) collection.setCollectionPersisterClass( persisterAnn.impl() );

    // set ordering
    if ( orderBy != null ) collection.setOrderBy( orderBy );
    if ( isSorted ) {
      collection.setSorted( true );
View Full Code Here

Examples of org.hibernate.annotations.Persister

    }
    persistentClass.setOptimisticLockMode( getVersioning( optimisticLockType ) );
    persistentClass.setSelectBeforeUpdate( selectBeforeUpdate );

    //set persister if needed
    Persister persisterAnn = annotatedClass.getAnnotation( Persister.class );
    Class persister = null;
    if ( persisterAnn != null ) {
      persister = persisterAnn.impl();
    }
    else {
      org.hibernate.annotations.Entity entityAnn = annotatedClass.getAnnotation( org.hibernate.annotations.Entity.class );
      if ( entityAnn != null && !BinderHelper.isEmptyAnnotationValue( entityAnn.persister() ) ) {
        try {
View Full Code Here

Examples of org.hibernate.annotations.Persister

    final boolean includeInOptimisticLockChecks = ( lockAnn != null )
        ? ! lockAnn.excluded()
        : ! isMappedBy;
    collection.setOptimisticLocked( includeInOptimisticLockChecks );

    Persister persisterAnn = property.getAnnotation( Persister.class );
    if ( persisterAnn != null ) {
      collection.setCollectionPersisterClass( persisterAnn.impl() );
    }

    // set ordering
    if ( orderBy != null ) collection.setOrderBy( orderBy );
    if ( isSorted ) {
View Full Code Here

Examples of org.hibernate.annotations.Persister

    persistentClass.setOptimisticLockMode( getVersioning( optimisticLockType ) );
    persistentClass.setSelectBeforeUpdate( selectBeforeUpdate );

    //set persister if needed
    //@Persister has precedence over @Entity.persister
    Persister persisterAnn = annotatedClass.getAnnotation( Persister.class );
    Class persister = null;
    if ( persisterAnn != null ) {
      persister = persisterAnn.impl();
    }
    else {
      org.hibernate.annotations.Entity entityAnn = annotatedClass.getAnnotation( org.hibernate.annotations.Entity.class );
      if ( entityAnn != null && !BinderHelper.isDefault( entityAnn.persister() ) ) {
        try {
View Full Code Here

Examples of org.hibernate.annotations.Persister

    }

    collection.setMutable( !property.isAnnotationPresent( Immutable.class ) );
    OptimisticLock lockAnn = property.getAnnotation( OptimisticLock.class );
    if ( lockAnn != null ) collection.setOptimisticLocked( !lockAnn.excluded() );
    Persister persisterAnn = property.getAnnotation( Persister.class );
    if ( persisterAnn != null ) collection.setCollectionPersisterClass( persisterAnn.impl() );

    // set ordering
    if ( orderBy != null ) collection.setOrderBy( orderBy );
    if ( isSorted ) {
      collection.setSorted( true );
View Full Code Here

Examples of org.hibernate.annotations.Persister

    }
    persistentClass.setOptimisticLockMode( getVersioning( optimisticLockType ) );
    persistentClass.setSelectBeforeUpdate( selectBeforeUpdate );

    //set persister if needed
    Persister persisterAnn = annotatedClass.getAnnotation( Persister.class );
    Class persister = null;
    if ( persisterAnn != null ) {
      persister = persisterAnn.impl();
    }
    else {
      org.hibernate.annotations.Entity entityAnn = annotatedClass.getAnnotation( org.hibernate.annotations.Entity.class );
      if ( entityAnn != null && !BinderHelper.isEmptyAnnotationValue( entityAnn.persister() ) ) {
        try {
View Full Code Here

Examples of org.hibernate.annotations.Persister

    final boolean includeInOptimisticLockChecks = ( lockAnn != null )
        ? ! lockAnn.excluded()
        : ! isMappedBy;
    collection.setOptimisticLocked( includeInOptimisticLockChecks );

    Persister persisterAnn = property.getAnnotation( Persister.class );
    if ( persisterAnn != null ) {
      collection.setCollectionPersisterClass( persisterAnn.impl() );
    }

    // set ordering
    if ( orderBy != null ) collection.setOrderBy( orderBy );
    if ( isSorted ) {
View Full Code Here

Examples of org.hibernate.annotations.Persister

    OptimisticLock lockAnn = property.getAnnotation( OptimisticLock.class );
    if ( lockAnn != null ) collection.setOptimisticLocked( !lockAnn.excluded() );

    //@Persister has priority over PersisterClassProvider
    //if all fail, left null and Hibernate defaults kick in
    Persister persisterAnn = property.getAnnotation( Persister.class );
    if ( persisterAnn != null ) {
      collection.setCollectionPersisterClass( persisterAnn.impl() );
    }
    else {
      final PersisterClassProvider persisterClassProvider = mappings.getPersisterClassProvider();
      if (persisterClassProvider != null) {
        final Class<? extends CollectionPersister> persister =
View Full Code Here

Examples of org.hibernate.annotations.Persister

    //set persister if needed
    //@Persister has precedence over @Entity.persister
    //in both fail we look for the PersisterClassProvider
    //if all fail, the persister is left null and the Hibernate defaults kick in
    Persister persisterAnn = annotatedClass.getAnnotation( Persister.class );
    Class persister = null;
    if ( persisterAnn != null ) {
      persister = persisterAnn.impl();
    }
    else {
      org.hibernate.annotations.Entity entityAnn = annotatedClass.getAnnotation( org.hibernate.annotations.Entity.class );
      if ( entityAnn != null && !BinderHelper.isEmptyAnnotationValue( entityAnn.persister() ) ) {
        try {
View Full Code Here

Examples of org.hibernate.annotations.Persister

    collection.setMutable( !property.isAnnotationPresent( Immutable.class ) );
    OptimisticLock lockAnn = property.getAnnotation( OptimisticLock.class );
    if ( lockAnn != null ) collection.setOptimisticLocked( !lockAnn.excluded() );

    Persister persisterAnn = property.getAnnotation( Persister.class );
    if ( persisterAnn != null ) {
      collection.setCollectionPersisterClass( persisterAnn.impl() );
    }

    // set ordering
    if ( orderBy != null ) collection.setOrderBy( orderBy );
    if ( isSorted ) {
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.