Class MetaStatement
java.lang.Object
org.pgcodekeeper.core.schema.meta.MetaStatement
- All Implemented Interfaces:
Serializable,IStatement
- Direct Known Subclasses:
MetaCast,MetaCompositeType,MetaConstraint,MetaFunction,MetaOperator,MetaRelation
Base class for all database metadata statement objects.
Provides common functionality for accessing object location, names, and comments.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionMetaStatement(GenericColumn column) Creates a new metadata statement from a generic column.MetaStatement(PgObjLocation object) Creates a new metadata statement with location information. -
Method Summary
Modifier and TypeMethodDescriptionGets the bare name without qualifiers or arguments.Gets the comment associated with this statement.Returns the database containing this statement.Returns the file path where this object is defined.Returns the generic column information for this statement.intReturns the line number where this object is defined.getName()Gets the name of this statement.Returns the object location information.intReturns the length of the object in the source file.intReturns the offset of the object in the source file.Returns the parent statement of this object.Gets the fully qualified name of this statement.Gets the type of this database object.voidsetComment(String comment)
-
Constructor Details
-
MetaStatement
Creates a new metadata statement with location information.- Parameters:
object- the object location information
-
MetaStatement
Creates a new metadata statement from a generic column.- Parameters:
column- the generic column information
-
-
Method Details
-
getName
Description copied from interface:IStatementGets the name of this statement.- Specified by:
getNamein interfaceIStatement- Returns:
- the statement name
-
getBareName
Description copied from interface:IStatementGets the bare name without qualifiers or arguments.- Specified by:
getBareNamein interfaceIStatement- Returns:
- the bare name
-
getStatementType
Description copied from interface:IStatementGets the type of this database object.- Specified by:
getStatementTypein interfaceIStatement- Returns:
- the database object type
-
getGenericColumn
Returns the generic column information for this statement.- Returns:
- the generic column
-
getObject
Returns the object location information.- Returns:
- the object location
-
getQualifiedName
Description copied from interface:IStatementGets the fully qualified name of this statement.- Specified by:
getQualifiedNamein interfaceIStatement- Returns:
- the qualified name
-
getComment
Description copied from interface:IStatementGets the comment associated with this statement.- Specified by:
getCommentin interfaceIStatement- Returns:
- the comment, or null if no comment is set
-
setComment
-
getObjLength
public int getObjLength()Returns the length of the object in the source file.- Returns:
- the object length
-
getOffset
public int getOffset()Returns the offset of the object in the source file.- Returns:
- the object offset
-
getFilePath
Returns the file path where this object is defined.- Returns:
- the file path
-
getLineNumber
public int getLineNumber()Returns the line number where this object is defined.- Returns:
- the line number
-
getParent
Returns the parent statement of this object. This operation is not supported for metadata statements.- Specified by:
getParentin interfaceIStatement- Returns:
- never returns normally
- Throws:
IllegalStateException- always thrown as this operation is unsupported
-
getDatabase
Returns the database containing this statement. This operation is not supported for metadata statements.- Specified by:
getDatabasein interfaceIStatement- Returns:
- never returns normally
- Throws:
IllegalStateException- always thrown as this operation is unsupported
-