public static Environment createEnvironment(Map<String, Object> context) { Environment env = EnvironmentFactory.newEnvironment(); UserTransaction ut = (UserTransaction) context.get(TRANSACTION); if( ut != null ) { env.set( TRANSACTION, ut); } env.set( ENTITY_MANAGER_FACTORY, context.get(ENTITY_MANAGER_FACTORY) ); env.set( TRANSACTION_MANAGER, com.arjuna.ats.jta.TransactionManager.transactionManager() ); env.set( GLOBALS, new MapGlobalResolver() ); return env; }
@Before public void setUp() throws Exception { ClassFieldAccessorStore store = new ClassFieldAccessorStore(); store.setClassFieldAccessorCache( new ClassFieldAccessorCache( Thread.currentThread().getContextClassLoader() ) ); store.setEagerWire( true ); this.reader = store.getReader( TestBean.class, "shortAttr" ); }
@Before public void setUp() throws Exception { store.setClassFieldAccessorCache( new ClassFieldAccessorCache( Thread.currentThread().getContextClassLoader() ) ); store.setEagerWire( true ); }
public AlphaNodeFieldConstraint getLiteralConstraint(final Pattern pattern, final String fieldName, final String evaluatorString, final String value) { final Class<?> clazz = ((ClassObjectType) pattern.getObjectType()).getClassType(); final InternalReadAccessor extractor = store.getReader(clazz, fieldName); FieldValue fieldValue = FieldFactory.getInstance().getFieldValue(value, extractor.getValueType()); return new MvelConstraintTestUtil(fieldName + evaluatorString + value, fieldValue, extractor); }
@Test public void testMultipleInterfaces() throws Exception { final ConcreteChild obj = new ConcreteChild(); final ClassFieldReader ext = store.getReader( InterfaceChild.class, "foo" ); assertEquals( 42, ((Number) ext.getValue( null, obj )).intValue() ); }
@Before public void setUp() throws Exception { ClassFieldAccessorStore store = new ClassFieldAccessorStore(); store.setClassFieldAccessorCache( new ClassFieldAccessorCache( Thread.currentThread().getContextClassLoader() ) ); store.setEagerWire( true ); this.reader = store.getReader( TestBean.class, "listAttr" ); }
@Before public void setUp() throws Exception { store.setClassFieldAccessorCache( new ClassFieldAccessorCache( Thread.currentThread().getContextClassLoader() ) ); store.setEagerWire( true ); }
@Before public void setUp() throws Exception { ClassFieldAccessorStore store = new ClassFieldAccessorStore(); store.setClassFieldAccessorCache( new ClassFieldAccessorCache( Thread.currentThread().getContextClassLoader() ) ); store.setEagerWire( true ); this.reader = store.getReader( TestBean.class, "byteAttr" ); }
@Before public void setUp() throws Exception { store.setClassFieldAccessorCache( new ClassFieldAccessorCache( Thread.currentThread().getContextClassLoader() ) ); store.setEagerWire( true ); }
@Before public void setUp() throws Exception { ClassFieldAccessorStore store = new ClassFieldAccessorStore(); store.setClassFieldAccessorCache( new ClassFieldAccessorCache( Thread.currentThread().getContextClassLoader() ) ); store.setEagerWire( true ); this.reader = store.getReader( TestBean.class, "intAttr" ); }
@Before public void setUp() throws Exception { store.setClassFieldAccessorCache( new ClassFieldAccessorCache( Thread.currentThread().getContextClassLoader() ) ); store.setEagerWire( true ); }
@Before public void setUp() throws Exception { ClassFieldAccessorStore store = new ClassFieldAccessorStore(); store.setClassFieldAccessorCache( new ClassFieldAccessorCache( Thread.currentThread().getContextClassLoader() ) ); store.setEagerWire( true ); this.reader = store.getReader( TestBean.class, "charAttr" ); }
@Before public void setUp() throws Exception { store.setClassFieldAccessorCache( new ClassFieldAccessorCache( Thread.currentThread().getContextClassLoader() ) ); store.setEagerWire( true ); }
@Before public void setUp() throws Exception { ClassFieldAccessorStore store = new ClassFieldAccessorStore(); store.setClassFieldAccessorCache( new ClassFieldAccessorCache( Thread.currentThread().getContextClassLoader() ) ); store.setEagerWire( true ); this.reader = store.getReader( TestBean.class, "floatAttr" ); }
@Before public void setUp() throws Exception { store.setClassFieldAccessorCache( new ClassFieldAccessorCache( Thread.currentThread().getContextClassLoader() ) ); store.setEagerWire( true ); }
@Before public void setUp() throws Exception { ClassFieldAccessorStore store = new ClassFieldAccessorStore(); store.setClassFieldAccessorCache( new ClassFieldAccessorCache( Thread.currentThread().getContextClassLoader() ) ); store.setEagerWire( true ); this.reader = store.getReader( TestBean.class, "booleanAttr" ); }
@Before public void setUp() throws Exception { store.setClassFieldAccessorCache( new ClassFieldAccessorCache( Thread.currentThread().getContextClassLoader() ) ); store.setEagerWire( true ); }
@Before public void setUp() throws Exception { ClassFieldAccessorStore store = new ClassFieldAccessorStore(); store.setClassFieldAccessorCache( new ClassFieldAccessorCache( Thread.currentThread().getContextClassLoader() ) ); store.setEagerWire( true ); extractor = store.getReader( TestBean.class, "longAttr" ); }
@Before public void setUp() throws Exception { store.setClassFieldAccessorCache( new ClassFieldAccessorCache( Thread.currentThread().getContextClassLoader() ) ); store.setEagerWire( true ); }
@Before public void setUp() throws Exception { ClassFieldAccessorStore store = new ClassFieldAccessorStore(); store.setClassFieldAccessorCache( new ClassFieldAccessorCache( Thread.currentThread().getContextClassLoader() ) ); store.setEagerWire( true ); this.reader = store.getReader( TestBean.class, "doubleAttr" ); }