Package org.hibernate.metamodel.domain

Examples of org.hibernate.metamodel.domain.Entity


      name = configuredClass.getName();
    }
    else {
      name = jpaEntityAnnotation.value( "name" ).asString();
    }
    entityBinding.setEntity( new Entity( name, getSuperType() ) );
  }
View Full Code Here


  protected void basicEntityBinding(
      XMLHibernateMapping.XMLClass entityClazz,
      EntityBinding entityBinding,
      Hierarchical superType) {
    entityBinding.setEntity( new Entity( bindingContext.extractEntityName( entityClazz ), superType ) );
    entityBinding.initialize( new HbmEntityBindingState( isRoot(), getInheritanceType(), bindingContext, entityClazz ) );

    // TODO: move this stuff out
    // transfer an explicitly defined lazy attribute
    bindPojoRepresentation( entityClazz, entityBinding );
View Full Code Here

    this.metadata = metadata;
  }

  public void resolve(EntityBinding entityBinding) {
    // TODO: this only deals w/ POJO...
    Entity entity = entityBinding.getEntity();
    if ( entity == null ) {
      throw new MappingException(
          "Cannot resolve Java type names because the domain model has not been bound to EntityBinding." );
    }
    String entityClassName =
        entity.getPojoEntitySpecifics().getClassName() != null ?
            entity.getPojoEntitySpecifics().getClassName() :
            entity.getPojoEntitySpecifics().getProxyInterfaceName();
    if ( entityClassName == null ) {
      throw new MappingException( "No Java class or interface defined for: " + entityBinding.getEntity().getName() );
    }

    for ( Attribute attribute : entity.getAttributes() ) {
      if ( attribute.isSingular() ) {
        SingularAttribute singularAttribute = SingularAttribute.class.cast( attribute );
        if ( singularAttribute.getSingularAttributeType().getName() == null ) {

        }
View Full Code Here

TOP

Related Classes of org.hibernate.metamodel.domain.Entity

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.