org.apache.openjpa.jdbc.schema
Class FileSchemaFactory

java.lang.Object
  extended by org.apache.openjpa.jdbc.schema.FileSchemaFactory
All Implemented Interfaces:
SchemaFactory, org.apache.openjpa.lib.conf.Configurable

public class FileSchemaFactory
extends Object
implements SchemaFactory, org.apache.openjpa.lib.conf.Configurable

Factory that uses an XML schema file to construct the system schema.

Author:
Abe White

Constructor Summary
FileSchemaFactory()
           
 
Method Summary
 void endConfiguration()
           
 String getFile()
          Return the XML resource defining this schema.
 SchemaGroup readSchema()
          Return the schema group for the current object model and database.
 void setConfiguration(org.apache.openjpa.lib.conf.Configuration conf)
           
 void setFile(String fileName)
          Set the XML resource defining this schema.
 void setFileName(String name)
          Deprecated. Use setFile(java.lang.String). Retained for backwards-compatible auto-configuration.
 void startConfiguration()
           
 void storeSchema(SchemaGroup schema)
          Record the schema group after changes may have been made.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileSchemaFactory

public FileSchemaFactory()
Method Detail

getFile

public String getFile()
Return the XML resource defining this schema. Defaults to package.schema.


setFile

public void setFile(String fileName)
Set the XML resource defining this schema. Defaults to package.schema.


setFileName

public void setFileName(String name)
Deprecated. Use setFile(java.lang.String). Retained for backwards-compatible auto-configuration.


setConfiguration

public void setConfiguration(org.apache.openjpa.lib.conf.Configuration conf)
Specified by:
setConfiguration in interface org.apache.openjpa.lib.conf.Configurable

startConfiguration

public void startConfiguration()
Specified by:
startConfiguration in interface org.apache.openjpa.lib.conf.Configurable

endConfiguration

public void endConfiguration()
Specified by:
endConfiguration in interface org.apache.openjpa.lib.conf.Configurable

readSchema

public SchemaGroup readSchema()
Description copied from interface: SchemaFactory
Return the schema group for the current object model and database.

Specified by:
readSchema in interface SchemaFactory

storeSchema

public void storeSchema(SchemaGroup schema)
Description copied from interface: SchemaFactory
Record the schema group after changes may have been made.

Specified by:
storeSchema in interface SchemaFactory
Parameters:
schema - the schema definition for the entire system


Copyright © 2006-2012 Apache Software Foundation. All Rights Reserved.