Skip to content

Commit

Permalink
Make it possible to use an expression in the from statement. Start on…
Browse files Browse the repository at this point in the history
… Spring support.
  • Loading branch information
dandiep committed Mar 9, 2011
1 parent acbbc1f commit fbb3702
Showing 1 changed file with 31 additions and 0 deletions.
@@ -0,0 +1,31 @@
/*
* $Id$
* --------------------------------------------------------------------------------------
* Copyright (c) MuleSoft, Inc. All rights reserved. http://www.mulesoft.com
*
* The software in this package is published under the terms of the CPAL v1.0
* license, a copy of which has been included with this distribution in the
* LICENSE.txt file.
*/
package com.mulesoft.mql.spring;

import com.mulesoft.mql.LazyResolvingContext;

import org.springframework.context.ApplicationContext;

public class SpringLazyLoadingContext extends LazyResolvingContext {
private ApplicationContext applicationContext;

public SpringLazyLoadingContext(ApplicationContext applicationContext) {
super();
this.applicationContext = applicationContext;
}

@Override
public Object load(String key) {
if (applicationContext.containsBean(key)) {
return applicationContext.getBean(key);
}
return null;
}
}

0 comments on commit fbb3702

Please sign in to comment.