Package org.hibernate.property

Examples of org.hibernate.property.PropertyAccessor


    return result;
  }

  private void initialize(String[] aliases) {
    PropertyAccessor propertyAccessor = new ChainedPropertyAccessor(
        new PropertyAccessor[] {
            PropertyAccessorFactory.getPropertyAccessor( resultClass, null ),
            PropertyAccessorFactory.getPropertyAccessor( "field" )
        }
    );
    this.aliases = new String[ aliases.length ];
    setters = new Setter[ aliases.length ];
    for ( int i = 0; i < aliases.length; i++ ) {
      String alias = aliases[ i ];
      if ( alias != null ) {
        this.aliases[ i ] = alias;
        setters[ i ] = propertyAccessor.getSetter( resultClass, alias );
      }
    }
    isInitialized = true;
  }
View Full Code Here


    if ( parentPropertyName == null ) {
      parentSetter = null;
      parentGetter = null;
    }
    else {
      PropertyAccessor pa = PropertyAccessorFactory.getPropertyAccessor( null );
      parentSetter = pa.getSetter( componentClass, parentPropertyName );
      parentGetter = pa.getGetter( componentClass, parentPropertyName );
    }

    if ( hasCustomAccessors || !Environment.useReflectionOptimizer() ) {
      optimizer = null;
    }
View Full Code Here

  private static Getter getGetter(Property mappingProperty) {
    if ( mappingProperty == null || !mappingProperty.getPersistentClass().hasPojoRepresentation() ) {
      return null;
    }

    PropertyAccessor pa = PropertyAccessorFactory.getPropertyAccessor( mappingProperty, EntityMode.POJO );
    return pa.getGetter( mappingProperty.getPersistentClass().getMappedClass(), mappingProperty.getName() );
  }
View Full Code Here

    if ( parentPropertyName == null ) {
      parentSetter = null;
      parentGetter = null;
    }
    else {
      PropertyAccessor pa = PropertyAccessorFactory.getPropertyAccessor( null );
      parentSetter = pa.getSetter( componentClass, parentPropertyName );
      parentGetter = pa.getGetter( componentClass, parentPropertyName );
    }

    if ( hasCustomAccessors || !Environment.useReflectionOptimizer() ) {
      optimizer = null;
    }
View Full Code Here

  private static Getter getGetter(Property mappingProperty) {
    if ( mappingProperty == null || !mappingProperty.getPersistentClass().hasPojoRepresentation() ) {
      return null;
    }

    PropertyAccessor pa = PropertyAccessorFactory.getPropertyAccessor( mappingProperty, EntityMode.POJO );
    return pa.getGetter( mappingProperty.getPersistentClass().getMappedClass(), mappingProperty.getName() );
  }
View Full Code Here

  private static Getter getGetter(AttributeBinding mappingProperty) {
    if ( mappingProperty == null || mappingProperty.getContainer().getClassReference() == null ) {
      return null;
    }

    PropertyAccessor pa = PropertyAccessorFactory.getPropertyAccessor( mappingProperty, EntityMode.POJO );
    return pa.getGetter(
        mappingProperty.getContainer().getClassReference(),
        mappingProperty.getAttribute().getName()
    );
  }
View Full Code Here

  private static Getter getGetter(Property mappingProperty) {
    if ( mappingProperty == null || !mappingProperty.getPersistentClass().hasPojoRepresentation() ) {
      return null;
    }

    PropertyAccessor pa = PropertyAccessorFactory.getPropertyAccessor( mappingProperty, EntityMode.POJO );
    return pa.getGetter( mappingProperty.getPersistentClass().getMappedClass(), mappingProperty.getName() );
  }
View Full Code Here

    if ( parentPropertyName == null ) {
      parentSetter = null;
      parentGetter = null;
    }
    else {
      PropertyAccessor pa = PropertyAccessorFactory.getPropertyAccessor( null );
      parentSetter = pa.getSetter( componentClass, parentPropertyName );
      parentGetter = pa.getGetter( componentClass, parentPropertyName );
    }

    if ( hasCustomAccessors || !Environment.useReflectionOptimizer() ) {
      optimizer = null;
    }
View Full Code Here

   * @param mappedProperty
   * @return
   */
  private PropertyAccessor buildPropertyAccessor(Property mappedProperty) {
    if ( mappedProperty.isBackRef() ) {
      PropertyAccessor ac = mappedProperty.getPropertyAccessor(null);
      if(ac!=null) return ac;
    }
    return accessor;
  }
View Full Code Here

  private static Getter getGetter(Property mappingProperty) {
    if ( mappingProperty == null || !mappingProperty.getPersistentClass().hasPojoRepresentation() ) {
      return null;
    }

    PropertyAccessor pa = PropertyAccessorFactory.getPropertyAccessor( mappingProperty, EntityMode.POJO );
    return pa.getGetter( mappingProperty.getPersistentClass().getMappedClass(), mappingProperty.getName() );
  }
View Full Code Here

TOP

Related Classes of org.hibernate.property.PropertyAccessor

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.