Examples of wasInitialized()


Examples of org.hibernate.collection.spi.PersistentCollection.wasInitialized()

    final LoadingCollectionEntry loadingCollectionEntry = loadContexts.locateLoadingCollectionEntry( collectionKey );
    if ( loadingCollectionEntry == null ) {
      // look for existing collection as part of the persistence context
      PersistentCollection collection = loadContexts.getPersistenceContext().getCollection( collectionKey );
      if ( collection != null ) {
        if ( collection.wasInitialized() ) {
          LOG.trace( "Collection already initialized; ignoring" );
          return null; // ignore this row of results! Note the early exit
        }
        LOG.trace( "Collection not yet initialized; initializing" );
      }
View Full Code Here

Examples of org.springframework.beans.DerivedTestBean.wasInitialized()

    DerivedTestBean inherits = (DerivedTestBean) child.getBean("inheritsWithDifferentClass");
    // Name property value is overridden
    assertTrue(inherits.getName().equals("override"));
    // Age property is inherited from bean in parent factory
    assertTrue(inherits.getAge() == 1);
    assertTrue(inherits.wasInitialized());
  }

  public void testInheritanceWithClass() throws Exception {
    XmlBeanFactory parent = new XmlBeanFactory(new ClassPathResource("parent.xml", getClass()));
    XmlBeanFactory child = new XmlBeanFactory(new ClassPathResource("child.xml", getClass()), parent);
View Full Code Here

Examples of org.springframework.beans.DerivedTestBean.wasInitialized()

    DerivedTestBean inherits = (DerivedTestBean) child.getBean("inheritsWithClass");
    // Name property value is overridden
    assertTrue(inherits.getName().equals("override"));
    // Age property is inherited from bean in parent factory
    assertTrue(inherits.getAge() == 1);
    assertTrue(inherits.wasInitialized());
  }

  public void testPrototypeInheritanceFromParentFactoryPrototype() throws Exception {
    XmlBeanFactory parent = new XmlBeanFactory(new ClassPathResource("parent.xml", getClass()));
    XmlBeanFactory child = new XmlBeanFactory(new ClassPathResource("child.xml", getClass()), parent);
View Full Code Here

Examples of org.springframework.tests.sample.beans.DerivedTestBean.wasInitialized()

    DerivedTestBean inherits = (DerivedTestBean) child.getBean("inheritsWithDifferentClass");
    // Name property value is overridden
    assertTrue(inherits.getName().equals("override"));
    // Age property is inherited from bean in parent factory
    assertTrue(inherits.getAge() == 1);
    assertTrue(inherits.wasInitialized());
  }

  @Test
  public void testInheritanceWithClass() throws Exception {
    DefaultListableBeanFactory parent = new DefaultListableBeanFactory();
View Full Code Here

Examples of org.springframework.tests.sample.beans.factory.DummyFactory.wasInitialized()

   */
  public void testFactoryIsInitialized() throws Exception {
    TestBean tb = (TestBean) getBeanFactory().getBean("singletonFactory");
    assertNotNull(tb);
    DummyFactory factory = (DummyFactory) getBeanFactory().getBean("&singletonFactory");
    assertTrue("Factory was initialized because it implemented InitializingBean", factory.wasInitialized());
  }

  /**
   * It should be illegal to dereference a normal bean
   * as a factory
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.