SolarMetric Kodo JDO 2.5.8 generated on January 11 2004

com.solarmetric.kodo.impl.jdbc.ormapping
Class MetaDataVerifier

java.lang.Object
  |
  +--com.solarmetric.kodo.impl.jdbc.ormapping.MetaDataVerifier
All Implemented Interfaces:
Verifier

public class MetaDataVerifier
extends Object
implements Verifier

Verifies that metadata for persistence capable types is consistent with the capabilities of the O/R mapping layer. The generic JDO subsystem can handle the full JDO specification, but the JDBC O/R layer cannot yet map the full range of Java objects. As the capabilities of the O/R layer are enhanced, this class should be trimmed to reflect them.


Inner classes inherited from class com.solarmetric.kodo.enhance.Verifier
Verifier.Error, Verifier.Msg, Verifier.Warning
 
Constructor Summary
MetaDataVerifier()
           
MetaDataVerifier(Configuration conf, ClassMetaData meta)
          Constructor.
 
Method Summary
 void clearMessages()
          Clears the messages that have been accumulated from the verification thus far.
 com.solarmetric.kodo.impl.jdbc.ormapping.Msg[] getMessages()
          Returns the accumulated messages from the verification that has been performed thus far.
 boolean isPostVerifier()
          Returns true if this verifier should be run after enhancement.
 boolean isPreVerifier()
          Returns true if this verifier should be run before enhancement.
static void main(String[] args)
          Usage: java com.solarmetric.kodo.impl.jdbc.MetaDataVerifier [class name | .class file | .jdo file]+
static void main(String[] args, PrintStream out)
           
 void reset()
          Resets the state of this verifier to a clean state.
 void setConfiguration(Configuration conf)
          Sets the Configuration that this verifier should use for any settings.
 void setMetaData(ClassMetaData meta)
          Sets the ClassMetaData that this verifier should verify.
 void verify()
          Verifies the given metadata against he current capabilities of the O/R layer.
 void verifyFields()
          Checks that field types are persistable.
 void verifyImplicitPersistence()
          Checks that the field meta datas are not being implicitly set to persistent, possibly causing unexpected serialization behavior.
 void verifyPrimaryKeys()
          Warns if the user has specified primary key fields that are not persistable as simple value mappings.
 void verifySuperclass()
          Warns if the described type has a persistence-capable superclass but does not appear to specify it in the metadata.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetaDataVerifier

public MetaDataVerifier(Configuration conf,
                        ClassMetaData meta)
Constructor.
Parameters:
meta - the metadata to verify

MetaDataVerifier

public MetaDataVerifier()
Method Detail

main

public static void main(String[] args)
                 throws ClassNotFoundException,
                        IOException

Usage: java com.solarmetric.kodo.impl.jdbc.MetaDataVerifier [class name | .class file | .jdo file]+

Each argument can be either the full class name of a persistence capable type, the path to the .class file for the type, or the path to a .jdo file listing one or more types. If a given type has JDO metadata, it will be verified against the current capabilities of the O/R mapping layer. If not, it will be ignored.


main

public static void main(String[] args,
                        PrintStream out)
                 throws ClassNotFoundException,
                        IOException

setConfiguration

public void setConfiguration(Configuration conf)
Description copied from interface: Verifier
Sets the Configuration that this verifier should use for any settings.
Specified by:
setConfiguration in interface Verifier

setMetaData

public void setMetaData(ClassMetaData meta)
Description copied from interface: Verifier
Sets the ClassMetaData that this verifier should verify.
Specified by:
setMetaData in interface Verifier

verify

public void verify()
Verifies the given metadata against he current capabilities of the O/R layer.
Specified by:
verify in interface Verifier

clearMessages

public void clearMessages()
Clears the messages that have been accumulated from the verification thus far.
Specified by:
clearMessages in interface Verifier

getMessages

public com.solarmetric.kodo.impl.jdbc.ormapping.Msg[] getMessages()
Returns the accumulated messages from the verification that has been performed thus far.
Specified by:
getMessages in interface Verifier

isPreVerifier

public boolean isPreVerifier()
Description copied from interface: Verifier
Returns true if this verifier should be run before enhancement. It is valid for a verifier to return true from both Verifier.isPostVerifier() and this method.
Specified by:
isPreVerifier in interface Verifier

isPostVerifier

public boolean isPostVerifier()
Description copied from interface: Verifier
Returns true if this verifier should be run after enhancement. It is valid for a verifier to return true from both Verifier.isPreVerifier() and this method.
Specified by:
isPostVerifier in interface Verifier

reset

public void reset()
Description copied from interface: Verifier
Resets the state of this verifier to a clean state. This allows the enhancer to use a single verifier instance for multiple metadatas.
Specified by:
reset in interface Verifier

verifySuperclass

public void verifySuperclass()
Warns if the described type has a persistence-capable superclass but does not appear to specify it in the metadata.

verifyPrimaryKeys

public void verifyPrimaryKeys()
Warns if the user has specified primary key fields that are not persistable as simple value mappings.

verifyFields

public void verifyFields()
Checks that field types are persistable.

verifyImplicitPersistence

public void verifyImplicitPersistence()
Checks that the field meta datas are not being implicitly set to persistent, possibly causing unexpected serialization behavior.

SolarMetric Kodo JDO 2.5.8 generated on January 11 2004

Copyright 2001,2002,2003 SolarMetric, Inc. All Rights Reserved.