Package org.apache.openjpa.meta
Class NonPersistentMetaData
- java.lang.Object
-
- 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
Fields Modifier and Type Field Description static intTYPE_NON_MAPPED_INTERFACEstatic intTYPE_PERSISTENCE_AWARE-
Fields inherited from interface org.apache.openjpa.lib.xml.Commentable
EMPTY_COMMENTS
-
Fields inherited from interface org.apache.openjpa.lib.meta.SourceTracker
SRC_ANNOTATIONS, SRC_OTHER, SRC_XML
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedNonPersistentMetaData(Class cls, MetaDataRepository repos, int type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(Object o)intgetColNumber()String[]getComments()ClassgetDescribedType()Persistence-aware type.intgetLineNumber()intgetListingIndex()The index in which this class was listed in the metadata.MetaDataRepositorygetRepository()Owning repository.StringgetResourceName()FilegetSourceFile()ObjectgetSourceScope()intgetSourceType()intgetType()The type of metadata.voidsetColNumber(int colNum)voidsetComments(String[] comments)voidsetLineNumber(int lineNum)voidsetListingIndex(int index)The index in which this field was listed in the metadata.voidsetSource(File file, int srcType)
-
-
-
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:
getRepositoryin interfaceMetaDataContext
-
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-1if 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-1if this class was not listed in the metadata.
-
getSourceFile
public File getSourceFile()
- Specified by:
getSourceFilein interfaceSourceTracker
-
getSourceScope
public Object getSourceScope()
- Specified by:
getSourceScopein interfaceSourceTracker
-
getSourceType
public int getSourceType()
- Specified by:
getSourceTypein interfaceSourceTracker
-
setSource
public void setSource(File file, int srcType)
-
getLineNumber
public int getLineNumber()
- Specified by:
getLineNumberin interfaceSourceTracker
-
setLineNumber
public void setLineNumber(int lineNum)
-
getColNumber
public int getColNumber()
- Specified by:
getColNumberin interfaceSourceTracker
-
setColNumber
public void setColNumber(int colNum)
-
getResourceName
public String getResourceName()
- Specified by:
getResourceNamein interfaceSourceTracker
-
getComments
public String[] getComments()
- Specified by:
getCommentsin interfaceCommentable
-
setComments
public void setComments(String[] comments)
- Specified by:
setCommentsin interfaceCommentable
-
compareTo
public int compareTo(Object o)
- Specified by:
compareToin interfaceComparable
-
-