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:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
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
ModifierConstructorDescriptionprotected
NonPersistentMetaData
(Class cls, MetaDataRepository repos, int type) -
Method Summary
Modifier and TypeMethodDescriptionint
int
Return the column number in the line of the file at which this instance was parsed.String[]
Return comments, or empty array if none.Persistence-aware type.int
Return the line number of the file at which this instance was parsed.int
The index in which this class was listed in the metadata.Owning repository.Return the domain-meaningful name of the resource that was loaded from this source.Return the file from which this instance was parsed.Return the domain-dependent scope of this instance within its file.int
Return the type of source.int
getType()
The type of metadata.void
setColNumber
(int colNum) void
setComments
(String[] comments) Set comments.void
setLineNumber
(int lineNum) void
setListingIndex
(int index) The index in which this field was listed in the metadata.void
-
Field Details
-
TYPE_PERSISTENCE_AWARE
public static final int TYPE_PERSISTENCE_AWARE- See Also:
-
TYPE_NON_MAPPED_INTERFACE
public static final int TYPE_NON_MAPPED_INTERFACE- See Also:
-
-
Constructor Details
-
NonPersistentMetaData
-
-
Method Details
-
getRepository
Owning repository.- Specified by:
getRepository
in interfaceMetaDataContext
-
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
Description copied from interface:SourceTracker
Return the file from which this instance was parsed.- Specified by:
getSourceFile
in interfaceSourceTracker
-
getSourceScope
Description copied from interface:SourceTracker
Return the domain-dependent scope of this instance within its file.- Specified by:
getSourceScope
in interfaceSourceTracker
-
getSourceType
public int getSourceType()Description copied from interface:SourceTracker
Return the type of source.- Specified by:
getSourceType
in interfaceSourceTracker
-
setSource
-
getLineNumber
public int getLineNumber()Description copied from interface:SourceTracker
Return the line number of the file at which this instance was parsed.- Specified by:
getLineNumber
in interfaceSourceTracker
-
setLineNumber
public void setLineNumber(int lineNum) -
getColNumber
public int getColNumber()Description copied from interface:SourceTracker
Return the column number in the line of the file at which this instance was parsed.- Specified by:
getColNumber
in interfaceSourceTracker
-
setColNumber
public void setColNumber(int colNum) -
getResourceName
Description copied from interface:SourceTracker
Return the domain-meaningful name of the resource that was loaded from this source. I.e., if we had loaded the source for a Java class, this would return the name of the class.- Specified by:
getResourceName
in interfaceSourceTracker
-
getComments
Description copied from interface:Commentable
Return comments, or empty array if none.- Specified by:
getComments
in interfaceCommentable
-
setComments
Description copied from interface:Commentable
Set comments.- Specified by:
setComments
in interfaceCommentable
-
compareTo
- Specified by:
compareTo
in interfaceComparable
-