01: /*
02: * Copyright 2002 (C) TJDO.
03: * All rights reserved.
04: *
05: * This software is distributed under the terms of the TJDO License version 1.0.
06: * See the terms of the TJDO License in the documentation provided with this software.
07: *
08: * $Id: SchemaManagerFactory.java,v 1.2 2002/10/17 21:00:52 pierreg0 Exp $
09: */
10:
11: package com.triactive.jdo;
12:
13: import javax.jdo.JDOUserException;
14: import javax.jdo.PersistenceManager;
15:
16: public class SchemaManagerFactory {
17: private SchemaManagerFactory() {
18: }
19:
20: public static SchemaManager getSchemaManager(PersistenceManager pm) {
21: if (pm instanceof com.triactive.jdo.PersistenceManagerImpl)
22: return ((com.triactive.jdo.PersistenceManagerImpl) pm)
23: .getStoreManager();
24:
25: throw new JDOUserException(
26: "No schema manager available for this JDO implementation: "
27: + pm.getClass().getName());
28: }
29: }
|