org.apache.openjpa.meta
Class NonPersistentMetaData

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

public class NonPersistentMetaData
extends Object
implements Comparable, SourceTracker, Commentable, MetaDataContext, 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(Class cls, MetaDataRepository repos, int type)
           
 
Method Summary
 int compareTo(Object o)
           
 int getColNumber()
           
 String[] getComments()
           
 Class getDescribedType()
          Persistence-aware type.
 int getLineNumber()
           
 int getListingIndex()
          The index in which this class was listed in the metadata.
 MetaDataRepository getRepository()
          Owning repository.
 String getResourceName()
           
 File getSourceFile()
           
 Object getSourceScope()
           
 int getSourceType()
           
 int getType()
          The type of metadata.
 void setColNumber(int colNum)
           
 void setComments(String[] comments)
           
 void setLineNumber(int lineNum)
           
 void setListingIndex(int index)
          The index in which this field was listed in the metadata.
 void setSource(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(Class cls,
                                MetaDataRepository repos,
                                int type)
Method Detail

getRepository

public MetaDataRepository getRepository()
Owning repository.

Specified by:
getRepository in interface MetaDataContext

getDescribedType

public 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 File getSourceFile()
Specified by:
getSourceFile in interface SourceTracker

getSourceScope

public Object getSourceScope()
Specified by:
getSourceScope in interface SourceTracker

getSourceType

public int getSourceType()
Specified by:
getSourceType in interface SourceTracker

setSource

public void setSource(File file,
                      int srcType)

getLineNumber

public int getLineNumber()
Specified by:
getLineNumber in interface SourceTracker

setLineNumber

public void setLineNumber(int lineNum)

getColNumber

public int getColNumber()
Specified by:
getColNumber in interface SourceTracker

setColNumber

public void setColNumber(int colNum)

getResourceName

public String getResourceName()
Specified by:
getResourceName in interface SourceTracker

getComments

public String[] getComments()
Specified by:
getComments in interface Commentable

setComments

public void setComments(String[] comments)
Specified by:
setComments in interface Commentable

compareTo

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


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