Examples of namedQuery()


Examples of org.hibernate.annotations.Loader.namedQuery()

      collection.setCustomSQLDeleteAll( sqlDeleteAll.sql(), sqlDeleteAll.callable(),
          ExecuteUpdateResultCheckStyle.parse( sqlDeleteAll.check().toString().toLowerCase() )
      );
    }
    if ( loader != null ) {
      collection.setLoaderName( loader.namedQuery() );
    }

    //work on association
    boolean isMappedBy = !BinderHelper.isDefault( mappedBy );
    if (isMappedBy
View Full Code Here

Examples of org.hibernate.annotations.Loader.namedQuery()

      persistentClass.setCustomSQLDelete( sqlDeleteAll.sql(), sqlDeleteAll.callable(),
          ExecuteUpdateResultCheckStyle.parse( sqlDeleteAll.check().toString().toLowerCase() )
      );
    }
    if ( loader != null ) {
      persistentClass.setLoaderName( loader.namedQuery() );
    }

    //tuplizers
    if ( annotatedClass.isAnnotationPresent( Tuplizers.class ) ) {
      for (Tuplizer tuplizer : annotatedClass.getAnnotation( Tuplizers.class ).value()) {
View Full Code Here

Examples of org.hibernate.annotations.Loader.namedQuery()

      collection.setCustomSQLDeleteAll( sqlDeleteAll.sql(), sqlDeleteAll.callable(),
          ExecuteUpdateResultCheckStyle.fromExternalName( sqlDeleteAll.check().toString().toLowerCase() )
      );
    }
    if ( loader != null ) {
      collection.setLoaderName( loader.namedQuery() );
    }

    if (isMappedBy
        && (property.isAnnotationPresent( JoinColumn.class )
          || property.isAnnotationPresent( JoinColumns.class )
View Full Code Here

Examples of org.hibernate.annotations.Loader.namedQuery()

      collection.setCustomSQLDeleteAll( sqlDeleteAll.sql(), sqlDeleteAll.callable(),
          ExecuteUpdateResultCheckStyle.parse( sqlDeleteAll.check().toString().toLowerCase() )
      );
    }
    if ( loader != null ) {
      collection.setLoaderName( loader.namedQuery() );
    }

    //work on association
    boolean isMappedBy = !BinderHelper.isDefault( mappedBy );
   
View Full Code Here

Examples of org.jrest4guice.dao.annotations.Find.namedQuery()

    }
  }

  private Query getQuery() {
    Find find = getAnnotation();
    if (StringUtils.isNotBlank(find.namedQuery()))
      return getSession().getNamedQuery(find.namedQuery());
    if (find.nativeQuery())
      return getSession().createSQLQuery(find.query());
    else
      return getSession().createQuery(find.query());
View Full Code Here

Examples of org.jrest4guice.dao.annotations.Find.namedQuery()

  }

  private Query getQuery() {
    Find find = getAnnotation();
    if (StringUtils.isNotBlank(find.namedQuery()))
      return getSession().getNamedQuery(find.namedQuery());
    if (find.nativeQuery())
      return getSession().createSQLQuery(find.query());
    else
      return getSession().createQuery(find.query());
  }
View Full Code Here

Examples of org.jrest4guice.dao.annotations.Find.namedQuery()

  }
 
  private Query getQuery() {
    Find find = getAnnotation();
    EntityManager em = getContext().getEntityManager();
    if (StringUtils.isNotBlank(find.namedQuery()))
      return em.createNamedQuery(find.namedQuery());
    if (find.nativeQuery()) {
      if (find.resultClass().equals(void.class))
        return em.createNativeQuery(find.query());
      else
View Full Code Here

Examples of org.jrest4guice.dao.annotations.Find.namedQuery()

 
  private Query getQuery() {
    Find find = getAnnotation();
    EntityManager em = getContext().getEntityManager();
    if (StringUtils.isNotBlank(find.namedQuery()))
      return em.createNamedQuery(find.namedQuery());
    if (find.nativeQuery()) {
      if (find.resultClass().equals(void.class))
        return em.createNativeQuery(find.query());
      else
        return em.createNativeQuery(find.query(), find.resultClass());
View Full Code Here

Examples of org.jrest4guice.dao.annotations.Retrieve.namedQuery()

   */
  private boolean hasQuerySetting() {
    Retrieve retrieve = getAnnotation();
    if (StringUtils.isNotBlank(retrieve.query()))
      return true;
    if (StringUtils.isNotBlank(retrieve.namedQuery()))
      return true;
    return false;
  }
 
  /**
 
View Full Code Here

Examples of org.jrest4guice.dao.annotations.Retrieve.namedQuery()

  }
 
  private Query getQuery() {
    Retrieve retrieve = getAnnotation();
    EntityManager em = getContext().getEntityManager();
    if (StringUtils.isNotBlank(retrieve.namedQuery()))
      return em.createNamedQuery(retrieve.namedQuery());
    if (retrieve.nativeQuery()) {
      if (retrieve.resultClass().equals(void.class))
        return em.createNativeQuery(retrieve.query());
      else
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.