use of org.apache.cayenne.access.types.ExtendedTypeFactory in project cayenne by apache.
the class PerAdapterProviderTest method before.
@Before
public void before() {
ResourceLocator locator = new ClassLoaderResourceLocator(new DefaultClassLoaderManager());
RuntimeProperties runtimeProperties = mock(RuntimeProperties.class);
ValueObjectTypeRegistry valueObjectTypeRegistry = mock(ValueObjectTypeRegistry.class);
this.oracleAdapter = new OracleAdapter(runtimeProperties, Collections.<ExtendedType>emptyList(), Collections.<ExtendedType>emptyList(), Collections.<ExtendedTypeFactory>emptyList(), locator, valueObjectTypeRegistry);
this.derbyAdapter = new DerbyAdapter(runtimeProperties, Collections.<ExtendedType>emptyList(), Collections.<ExtendedType>emptyList(), Collections.<ExtendedTypeFactory>emptyList(), locator, valueObjectTypeRegistry);
this.autoDerbyAdapter = new AutoAdapter(new Provider<DbAdapter>() {
@Override
public DbAdapter get() throws DIRuntimeException {
return derbyAdapter;
}
}, new Slf4jJdbcEventLogger(runtimeProperties));
}
use of org.apache.cayenne.access.types.ExtendedTypeFactory in project cayenne by apache.
the class JdbcAdapter method initExtendedTypes.
/**
* @since 3.1
*/
protected void initExtendedTypes(List<ExtendedType> defaultExtendedTypes, List<ExtendedType> userExtendedTypes, List<ExtendedTypeFactory> extendedTypeFactories, ValueObjectTypeRegistry valueObjectTypeRegistry) {
for (ExtendedType type : defaultExtendedTypes) {
extendedTypes.registerType(type);
}
// loading adapter specific extended types
configureExtendedTypes(extendedTypes);
for (ExtendedType type : userExtendedTypes) {
extendedTypes.registerType(type);
}
for (ExtendedTypeFactory typeFactory : extendedTypeFactories) {
extendedTypes.addFactory(typeFactory);
}
extendedTypes.addFactory(new ValueObjectTypeFactory(extendedTypes, valueObjectTypeRegistry));
}
Aggregations