org.apache.openjpa.meta
Class NonPersistentMetaData

java.lang.Object
  extended by org.apache.openjpa.meta.NonPersistentMetaData
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable, org.apache.openjpa.lib.meta.SourceTracker, org.apache.openjpa.lib.xml.Commentable, MetaDataContext

public class NonPersistentMetaData
extends java.lang.Object
implements java.lang.Comparable, org.apache.openjpa.lib.meta.SourceTracker, org.apache.openjpa.lib.xml.Commentable, MetaDataContext, java.io.Serializable

Metadata about a persistence-aware type.

Author:
Pinaki Poddar
See Also:
Serialized Form

Field Summary
static int TYPE_NON_MAPPED_INTERFACE
           
static int TYPE_PERSISTENCE_AWARE
           
 
Fields inherited from interface org.apache.openjpa.lib.meta.SourceTracker
SRC_ANNOTATIONS, SRC_OTHER, SRC_XML
 
Fields inherited from interface org.apache.openjpa.lib.xml.Commentable
EMPTY_COMMENTS
 
Constructor Summary
protected NonPersistentMetaData(java.lang.Class cls, MetaDataRepository repos, int type)
           
 
Method Summary
 int compareTo(java.lang.Object o)
           
 java.lang.String[] getComments()
           
 java.lang.Class getDescribedType()
          Persistence-aware type.
 int getListingIndex()
          The index in which this class was listed in the metadata.
 MetaDataRepository getRepository()
          Owning repository.
 java.lang.String getResourceName()
           
 java.io.File getSourceFile()
           
 java.lang.Object getSourceScope()
           
 int getSourceType()
           
 int getType()
          The type of metadata.
 void setComments(java.lang.String[] comments)
           
 void setListingIndex(int index)
          The index in which this field was listed in the metadata.
 void setSource(java.io.File file, int srcType)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_PERSISTENCE_AWARE

public static final int TYPE_PERSISTENCE_AWARE
See Also:
Constant Field Values

TYPE_NON_MAPPED_INTERFACE

public static final int TYPE_NON_MAPPED_INTERFACE
See Also:
Constant Field Values
Constructor Detail

NonPersistentMetaData

protected NonPersistentMetaData(java.lang.Class cls,
                                MetaDataRepository repos,
                                int type)
Method Detail

getRepository

public MetaDataRepository getRepository()
Owning repository.

Specified by:
getRepository in interface MetaDataContext

getDescribedType

public java.lang.Class getDescribedType()
Persistence-aware type.


getType

public int getType()
The type of metadata.


getListingIndex

public int getListingIndex()
The index in which this class was listed in the metadata. Defaults to -1 if this class was not listed in the metadata.


setListingIndex

public void setListingIndex(int index)
The index in which this field was listed in the metadata. Defaults to -1 if this class was not listed in the metadata.


getSourceFile

public java.io.File getSourceFile()
Specified by:
getSourceFile in interface org.apache.openjpa.lib.meta.SourceTracker

getSourceScope

public java.lang.Object getSourceScope()
Specified by:
getSourceScope in interface org.apache.openjpa.lib.meta.SourceTracker

getSourceType

public int getSourceType()
Specified by:
getSourceType in interface org.apache.openjpa.lib.meta.SourceTracker

setSource

public void setSource(java.io.File file,
                      int srcType)

getResourceName

public java.lang.String getResourceName()
Specified by:
getResourceName in interface org.apache.openjpa.lib.meta.SourceTracker

getComments

public java.lang.String[] getComments()
Specified by:
getComments in interface org.apache.openjpa.lib.xml.Commentable

setComments

public void setComments(java.lang.String[] comments)
Specified by:
setComments in interface org.apache.openjpa.lib.xml.Commentable

compareTo

public int compareTo(java.lang.Object o)
Specified by:
compareTo in interface java.lang.Comparable