Package org.hibernate.type

Examples of org.hibernate.type.ComponentType


    ComponentMetamodel metamodel = new ComponentMetamodel( this );
    if ( isEmbedded() ) {
      return new EmbeddedComponentType( metamodel );
    }
    else {
      return new ComponentType( metamodel );
    }
  }
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

    }
    else if ( idSetter != null ) {
      idSetter.set( entity, id, getFactory() );
    }
    else if ( identifierMapperType != null ) {
      ComponentType extractor = (ComponentType) entityMetamodel.getIdentifierProperty().getType();
      ComponentType copier = (ComponentType) identifierMapperType;
      copier.setPropertyValues( entity, extractor.getPropertyValues( id, getEntityMode() ), getEntityMode() );
    }
  }
View Full Code Here

    // the current "WHERE COL = ?" (fails for null for most DBs).  Note that
    // the param would have to be bound twice.  Until we eventually add "parameter bind points" concepts to the
    // AST in ORM 5+, handling this type of condition is either extremely difficult or impossible.  Forcing
    // recreation isn't ideal, but not really any other option in ORM 4.
    if (persister.getElementType() instanceof ComponentType) {
      ComponentType componentType = (ComponentType) persister.getElementType();
      return !componentType.hasNotNullProperty();
    }
    return false;
  }
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.