Package org.hibernate.mapping

Examples of org.hibernate.mapping.Component


            mappings
          );
        bindManyToManySubelements( collection, subnode, mappings );
      }
      else if ( "composite-element".equals( name ) ) {
        Component element = new Component( collection );
        collection.setElement( element );
        bindComposite(
            subnode,
            element,
            collection.getRole() + ".element",
View Full Code Here


    }
    else {
      proxyFactory = null;
    }
   
    Component mapper = mappingInfo.getIdentifierMapper();
    identifierMapperType = mapper==null ? null : (AbstractComponentType) mapper.getType();
  }
View Full Code Here

        int dotIndex = name.lastIndexOf( '.' );
        String reducedName = name.substring( 0, dotIndex );
        Value value = pc.getRecursiveProperty( reducedName ).getValue();
        Iterator parentPropIter;
        if ( value instanceof Component ) {
          Component comp = (Component) value;
          parentPropIter = comp.getPropertyIterator();
        }
        else if ( value instanceof ToOne ) {
          ToOne toOne = (ToOne) value;
          PersistentClass referencedPc = mappings.getClass( toOne.getReferencedEntityName() );
          if ( toOne.getReferencedPropertyName() != null ) {
View Full Code Here

    while ( propertyIterator.hasNext() ) {

      Property prop = ( Property ) propertyIterator.next();
      String propname = path == null ? prop.getName() : path + "." + prop.getName();
      if ( prop.isComposite() ) {
        Component component = ( Component ) prop.getValue();
        Iterator compProps = component.getPropertyIterator();
        internalInitSubclassPropertyAliasesMap( propname, compProps );
      }
      else {
        String[] aliases = new String[prop.getColumnSpan()];
        String[] cols = new String[prop.getColumnSpan()];
View Full Code Here

  }

  private static void bindCompositeId(Element idNode, RootClass entity, Mappings mappings,
      java.util.Map inheritedMetas) throws MappingException {
    String propertyName = idNode.attributeValue( "name" );
    Component id = new Component( entity );
    entity.setIdentifier( id );
    bindCompositeId( idNode, id, entity, propertyName, mappings, inheritedMetas );
    if ( propertyName == null ) {
      entity.setEmbeddedIdentifier( id.isEmbedded() );
      if ( id.isEmbedded() ) {
        // todo : what is the implication of this?
        id.setDynamic( !entity.hasPojoRepresentation() );
        /*
         * Property prop = new Property(); prop.setName("id");
         * prop.setPropertyAccessorName("embedded"); prop.setValue(id);
         * entity.setIdentifierProperty(prop);
         */
 
View Full Code Here

        value = new SimpleValue( table );
        bindSimpleValue( subnode, (SimpleValue) value, true, propertyName, mappings );
      }
      else if ( "component".equals( name ) || "dynamic-component".equals( name ) ) {
        String subpath = StringHelper.qualify( path, propertyName );
        value = new Component( join );
        bindComponent(
            subnode,
            (Component) value,
            join.getPersistentClass().getClassName(),
            propertyName,
View Full Code Here

    if ( "true".equals( node.attributeValue("mapped") ) ) {
      if ( propertyName!=null ) {
        throw new MappingException("cannot combine mapped=\"true\" with specified name");
      }
      Component mapper = new Component(persistentClass);
      bindComponent(
          node,
          mapper,
          persistentClass.getClassName(),
          null,
View Full Code Here

        bindSimpleValue( subnode, (SimpleValue) value, isNullable, relativePath, mappings );
      }
      else if ( "component".equals( name )
        || "dynamic-component".equals( name )
        || "nested-composite-element".equals( name ) ) {
        value = new Component( component ); // a nested composite element
        bindComponent(
            subnode,
            (Component) value,
            component.getComponentClassName(),
            propertyName,
View Full Code Here

      }
      else if ( "component".equals( name )
        || "dynamic-component".equals( name )
        || "properties".equals( name ) ) {
        String subpath = StringHelper.qualify( entityName, propertyName );
        value = new Component( persistentClass );

        bindComponent(
            subnode,
            (Component) value,
            persistentClass.getClassName(),
View Full Code Here

          );
        map.setIndex( mto );

      }
      else if ( "composite-index".equals( name ) || "composite-map-key".equals( name ) ) {
        Component component = new Component( map );
        bindComposite(
            subnode,
            component,
            map.getRole() + ".index",
            map.isOneToMany(),
View Full Code Here

TOP

Related Classes of org.hibernate.mapping.Component

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.