Package org.hibernate.criterion

Examples of org.hibernate.criterion.Projection


  public String[] getColumnsUsingProjection(
      Criteria subcriteria,
          String propertyName) throws HibernateException {

    //first look for a reference to a projection alias
    final Projection projection = rootCriteria.getProjection();
    String[] projectionColumns = projection == null ?
                                 null :
                                 projection.getColumnAliases( propertyName, 0 );

    if ( projectionColumns == null ) {
      //it does not refer to an alias of a projection,
      //look for a property
      try {
View Full Code Here


  public Type getTypeUsingProjection(Criteria subcriteria, String propertyName)
      throws HibernateException {

    //first look for a reference to a projection alias
    final Projection projection = rootCriteria.getProjection();
    Type[] projectionTypes = projection == null ?
                             null :
                             projection.getTypes( propertyName, subcriteria, this );

    if ( projectionTypes == null ) {
      try {
        //it does not refer to an alias of a projection,
        //look for a property
View Full Code Here

  public String[] getColumnsUsingProjection(
      Criteria subcriteria,
          String propertyName) throws HibernateException {

    //first look for a reference to a projection alias
    final Projection projection = rootCriteria.getProjection();
    String[] projectionColumns = projection == null ?
                                 null :
                                 projection.getColumnAliases( propertyName, 0 );

    if ( projectionColumns == null ) {
      //it does not refer to an alias of a projection,
      //look for a property
      try {
View Full Code Here

  public Type getTypeUsingProjection(Criteria subcriteria, String propertyName)
      throws HibernateException {

    //first look for a reference to a projection alias
    final Projection projection = rootCriteria.getProjection();
    Type[] projectionTypes = projection == null ?
                             null :
                             projection.getTypes( propertyName, subcriteria, this );

    if ( projectionTypes == null ) {
      try {
        //it does not refer to an alias of a projection,
        //look for a property
View Full Code Here

   */
  protected long countCriteriaResult( Criteria c) {
    CriteriaImpl impl = (CriteriaImpl) c;

    // 先把Projection、ResultTransformer、OrderBy取出来,清空三者后再执行Count操作
    Projection projection = impl.getProjection();
    ResultTransformer transformer = impl.getResultTransformer();

    List<CriteriaImpl.OrderEntry> orderEntries = null;
    try {
      orderEntries = (List) ReflectionUtils.getFieldValue(impl,"orderEntries");
View Full Code Here

  public String[] getColumnsUsingProjection(
      Criteria subcriteria,
          String propertyName) throws HibernateException {

    //first look for a reference to a projection alias
    final Projection projection = rootCriteria.getProjection();
    String[] projectionColumns = null;
    if ( projection != null ) {
      projectionColumns = ( projection instanceof EnhancedProjection ?
          ( ( EnhancedProjection ) projection ).getColumnAliases( propertyName, 0, rootCriteria, this ) :
          projection.getColumnAliases( propertyName, 0 )
      );
    }
    if ( projectionColumns == null ) {
      //it does not refer to an alias of a projection,
      //look for a property
View Full Code Here

  public Type getTypeUsingProjection(Criteria subcriteria, String propertyName)
      throws HibernateException {

    //first look for a reference to a projection alias
    final Projection projection = rootCriteria.getProjection();
    Type[] projectionTypes = projection == null ?
                             null :
                             projection.getTypes( propertyName, subcriteria, this );

    if ( projectionTypes == null ) {
      try {
        //it does not refer to an alias of a projection,
        //look for a property
View Full Code Here

  public String[] getColumnsUsingProjection(
      Criteria subcriteria,
          String propertyName) throws HibernateException {

    //first look for a reference to a projection alias
    final Projection projection = rootCriteria.getProjection();
    String[] projectionColumns = null;
    if ( projection != null ) {
      projectionColumns = ( projection instanceof EnhancedProjection ?
          ( ( EnhancedProjection ) projection ).getColumnAliases( propertyName, 0, rootCriteria, this ) :
          projection.getColumnAliases( propertyName, 0 )
      );
    }
    if ( projectionColumns == null ) {
      //it does not refer to an alias of a projection,
      //look for a property
View Full Code Here

  public Type getTypeUsingProjection(Criteria subcriteria, String propertyName)
      throws HibernateException {

    //first look for a reference to a projection alias
    final Projection projection = rootCriteria.getProjection();
    Type[] projectionTypes = projection == null ?
                             null :
                             projection.getTypes( propertyName, subcriteria, this );

    if ( projectionTypes == null ) {
      try {
        //it does not refer to an alias of a projection,
        //look for a property
View Full Code Here

  public String[] getColumnsUsingProjection(
      Criteria subcriteria,
          String propertyName) throws HibernateException {

    //first look for a reference to a projection alias
    final Projection projection = rootCriteria.getProjection();
    String[] projectionColumns = null;
    if ( projection != null ) {
      projectionColumns = ( projection instanceof EnhancedProjection ?
          ( ( EnhancedProjection ) projection ).getColumnAliases( propertyName, 0, rootCriteria, this ) :
          projection.getColumnAliases( propertyName, 0 )
      );
    }
    if ( projectionColumns == null ) {
      //it does not refer to an alias of a projection,
      //look for a property
View Full Code Here

TOP

Related Classes of org.hibernate.criterion.Projection

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.