Examples of instantiate()


Examples of org.hibernate.persister.entity.EntityPersister.instantiate()

            null;
    if ( copyCache.containsKey( entity ) ) {
      persister.setIdentifier( copyCache.get( entity ), id, source.getEntityMode() );
    }
    else {
      ( ( EventCache ) copyCache ).put( entity, persister.instantiate( id, source.getEntityMode() ), true ); //before cascade!
      //TODO: should this be Session.instantiate(Persister, ...)?
    }
    final Object copy = copyCache.get( entity );

    // cascade first, so that all unsaved objects get their
View Full Code Here

Examples of org.hibernate.persister.entity.EntityPersister.instantiate()

            null;
    if ( copyCache.containsKey( entity ) ) {
      persister.setIdentifier( copyCache.get( entity ), id, source.getEntityMode() );
    }
    else {
      ( ( EventCache ) copyCache ).put( entity, persister.instantiate( id, source.getEntityMode() ), true ); //before cascade!
      //TODO: should this be Session.instantiate(Persister, ...)?
    }
    final Object copy = copyCache.get( entity );

    // cascade first, so that all unsaved objects get their
View Full Code Here

Examples of org.hibernate.type.CollectionType.instantiate()

      if (type instanceof CollectionType) {
        CollectionType ct = (CollectionType) type;
        Collection coll = (Collection) metadata.getPropertyValue(object, name, EntityMode.POJO);
        if (coll == null) {
          // normally should not happen, hibernate instantiates it automatically
          coll = (Collection) ct.instantiate(0);
          metadata.setPropertyValue(object, name, coll, EntityMode.POJO);
        }
        String entityName = ct.getAssociatedEntityName((SessionFactoryImplementor) sessionFactory);
        ClassMetadata childMetadata = sessionFactory.getClassMetadata(entityName);
        return new HibernateEntityCollection(metadata, childMetadata, object, coll);
View Full Code Here

Examples of org.hibernate.type.ComponentType.instantiate()

        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

Examples of org.hibernate.type.ComponentType.instantiate()

        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

Examples of org.hibernate.type.ComponentType.instantiate()

        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

Examples of org.hibernate.type.ComponentType.instantiate()

        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

Examples of org.hibernate.type.ComponentType.instantiate()

        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

Examples of org.jboss.metatype.api.values.InstanceFactory.instantiate()

/*      */     {
/*  811 */       InstanceFactory instanceFactory = (InstanceFactory)this.instanceFactoryMap.get(classInfo.getType());
/*  812 */       if (instanceFactory == null) {
/*  813 */         throw new IllegalArgumentException("Cannot instantiate interface BeanInfo, missing InstanceFactory: " + classInfo);
/*      */       }
/*  815 */       return instanceFactory.instantiate(beanInfo);
/*      */     }
/*  817 */     return beanInfo.newInstance();
/*      */   }
/*      */
/*      */   protected Object newArrayInstance(TypeInfo typeInfo, int size)
View Full Code Here

Examples of org.jbpm.instantiation.Delegation.instantiate()

   
    Decision decision = (Decision) processDefinition.getNode("d");
    Delegation decisionDelegation = decision.decisionDelegation;
    assertNotNull(decisionDelegation);
    assertEquals("org.jbpm.graph.node.JpdlDbTest$MyDecisionHandler", decisionDelegation.getClassName());
    MyDecisionHandler decisionHandler = (MyDecisionHandler) decisionDelegation.instantiate();
    assertEquals("testing... one, two... testing", decisionHandler.decisionHandlerConfigText);
  }

  public void testFork() {
    ProcessDefinition processDefinition = ProcessDefinition.parseXmlString(
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.