Package org.hibernate.type

Examples of org.hibernate.type.ComponentType


      propertyPath.substring(0, loc) : propertyPath;
     
    int index = entityMetamodel.getPropertyIndex( basePropertyName );
    Object baseValue = getPropertyValue( entity, index );
    if ( loc>0 ) {
      ComponentType type = (ComponentType) entityMetamodel.getPropertyTypes()[index];
      return getComponentValue( type, baseValue, propertyPath.substring(loc+1) );
    }
    else {
      return baseValue;
    }
View Full Code Here


    }
   
    Object baseValue = type.getPropertyValue( component, index, getEntityMode() );
   
    if ( loc>0 ) {
      ComponentType subtype = (ComponentType) type.getSubtypes()[index];
      return getComponentValue( subtype, baseValue, propertyPath.substring(loc+1) );
    }
    else {
      return baseValue;
    }
View Full Code Here

      if ( idGetter == null ) {
        if (identifierMapperType==null) {
          throw new HibernateException( "The class has no identifier property: " + getEntityName() );
        }
        else {
          ComponentType copier = (ComponentType) entityMetamodel.getIdentifierProperty().getType();
          id = copier.instantiate( getEntityMode() );
          copier.setPropertyValues( id, identifierMapperType.getPropertyValues( entity, getEntityMode() ), getEntityMode() );
        }
      }
      else {
        id = idGetter.get( entity );
      }
View Full Code Here

      propertyPath.substring(0, loc) : propertyPath;
     
    int index = entityMetamodel.getPropertyIndex( basePropertyName );
    Object baseValue = getPropertyValue( entity, index );
    if ( loc>0 ) {
      ComponentType type = (ComponentType) entityMetamodel.getPropertyTypes()[index];
      return getComponentValue( type, baseValue, propertyPath.substring(loc+1) );
    }
    else {
      return baseValue;
    }
View Full Code Here

    }
   
    Object baseValue = type.getPropertyValue( component, index, getEntityMode() );
   
    if ( loc>0 ) {
      ComponentType subtype = (ComponentType) type.getSubtypes()[index];
      return getComponentValue( subtype, baseValue, propertyPath.substring(loc+1) );
    }
    else {
      return baseValue;
    }
View Full Code Here

    ComponentMetamodel metamodel = new ComponentMetamodel( this );
    if ( isEmbedded() ) {
      return new EmbeddedComponentType( metamodel );
    }
    else {
      return new ComponentType( metamodel );
    }
  }
View Full Code Here

    ComponentMetamodel metamodel = new ComponentMetamodel( this );
    if ( isEmbedded() ) {
      return new EmbeddedComponentType( metamodel );
    }
    else {
      return new ComponentType( metamodel );
    }
  }
View Full Code Here

    ComponentMetamodel metamodel = new ComponentMetamodel( this );
    if ( isEmbedded() ) {
      return new EmbeddedComponentType( metamodel );
    }
    else {
      return new ComponentType( metamodel );
    }
  }
View Full Code Here

  this.persister = persister;
  if (!persister.getElementType().isComponentType()) {
      throw new IllegalArgumentException("persister for role "+persister.getRole()+" is not a collection-of-component");
  }

  ComponentType componentType = (ComponentType)persister.getElementType();
  String[] names = componentType.getPropertyNames();
  Type[] types = componentType.getSubtypes();

  for (int i = 0; i < names.length; i++) {
      subTypes.put(names[i], types[i]);
  }
View Full Code Here

      if ( idGetter == null ) {
        if (identifierMapperType==null) {
          throw new HibernateException( "The class has no identifier property: " + getEntityName() );
        }
        else {
          ComponentType copier = (ComponentType) entityMetamodel.getIdentifierProperty().getType();
          id = copier.instantiate( getEntityMode() );
          copier.setPropertyValues( id, identifierMapperType.getPropertyValues( entity, getEntityMode() ), getEntityMode() );
        }
      }
      else {
        id = idGetter.get( entity );
      }
View Full Code Here

TOP

Related Classes of org.hibernate.type.ComponentType

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.