Class QualifiedDBIdentifier
java.lang.Object
org.apache.openjpa.lib.identifier.IdentifierImpl
org.apache.openjpa.jdbc.identifier.DBIdentifier
org.apache.openjpa.jdbc.identifier.QualifiedDBIdentifier
- All Implemented Interfaces:
Serializable,Cloneable,Comparable<Identifier>,Identifier
public class QualifiedDBIdentifier
extends DBIdentifier
implements Identifier, Cloneable, Serializable
This class extends DBIdentifier to provide support for qualified identifiers
such as schema qualified tables and table qualified columns. It provides methods
to create qualified identifiers from individual identifiers.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.openjpa.jdbc.identifier.DBIdentifier
DBIdentifier.DBIdentifierType -
Field Summary
Fields inherited from class org.apache.openjpa.jdbc.identifier.DBIdentifier
_ignoreCase, NULL -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()Creates a clone of this identifier.intCompares this identifier with another identifier.booleanEquality operator.Returns the base name of this qualified name.Returns this object as a DBIdentifier.getName()Returns the fully qualified name as a stringGets the object table name component of the path, if the path is a table qualified identifier such as a constraint or column.static QualifiedDBIdentifiergetPath(DBIdentifier sName) Creates a qualified path from an identifier.Gets the schema component of the path.Returns a new unqualified name based on this instance.booleanReturns true if all identifiers within this compound identifier are delimited.booleanReturns true if this object is not qualified by a table or schema component.booleanReturns true if this object is not qualified by a schema component.intlength()Returns the length of the qualified identifier, including delimiters and name separators.static QualifiedDBIdentifiernewPath(DBIdentifier... names) Creates a qualified identifier based upon an array of DBIdentifiers.static booleanpathEqual(QualifiedDBIdentifier path1, QualifiedDBIdentifier path2) Compares two qualified identifiers for equality.protected voidsetBaseName(String name) Set the base name component of this compound identifiervoidSet the name of this qualified identifier.voidsetObjectTableName(DBIdentifier objectName) Sets the object table name component of the path, if the path is a table qualified identifier such as a constraint or column.voidsetPath(DBIdentifier... sNames) Set the identifiers that make up the path.voidsetSchemaName(DBIdentifier schemaName) Sets the schema component of the path.static DBIdentifier[]splitPath(DBIdentifier sName) Splits a qualified path into separate identifiers.toString()Returns a fully qualified name as a string.Methods inherited from class org.apache.openjpa.jdbc.identifier.DBIdentifier
append, combine, combine, equal, equalsIgnoreCase, equalsIgnoreCase, getIgnoreCase, getType, isEmpty, isNull, isNull, join, newCatalog, newCatalog, newColumn, newColumn, newColumnDefinition, newConstant, newConstraint, newConstraint, newDefault, newForeignKey, newForeignKey, newIdentifier, newIdentifier, newIdentifier, newIdentifier, newIndex, newIndex, newProcedure, newSchema, newSchema, newSequence, newSequence, newTable, newTable, preCombine, removeDelimiters, removeDelimitersAndMakeUpper, removeHungarianNotation, removeLeading, setIgnoreCase, setName, setName, setType, split, split, toArray, toArray, toLower, toLower, toStringArray, toUpper, toUpper, trim, trimToNull, truncateMethods inherited from class org.apache.openjpa.lib.identifier.IdentifierImpl
hashCode, isNameDelimited, setNameDelimited
-
Constructor Details
-
QualifiedDBIdentifier
-
-
Method Details
-
newPath
Creates a qualified identifier based upon an array of DBIdentifiers. Identifiers must be specified in order.- Parameters:
names-
-
setPath
Set the identifiers that make up the path. Identifiers must be specified in path order. (ex. [ table, column ] )- Parameters:
sNames-
-
splitPath
Splits a qualified path into separate identifiers.- Parameters:
sName-
-
getPath
Creates a qualified path from an identifier.- Parameters:
sName-
-
setSchemaName
Sets the schema component of the path. -
getSchemaName
Gets the schema component of the path. -
setObjectTableName
Sets the object table name component of the path, if the path is a table qualified identifier such as a constraint or column. -
getObjectTableName
Gets the object table name component of the path, if the path is a table qualified identifier such as a constraint or column. -
isUnqualifiedObject
public boolean isUnqualifiedObject()Returns true if this object is not qualified by a schema component. -
isUnqualifiedColumn
public boolean isUnqualifiedColumn()Returns true if this object is not qualified by a table or schema component. -
equals
Equality operator.- Overrides:
equalsin classDBIdentifier
-
pathEqual
Compares two qualified identifiers for equality.- Parameters:
path1-path2-
-
toString
Returns a fully qualified name as a string.- Overrides:
toStringin classIdentifierImpl
-
getName
Returns the fully qualified name as a string- Specified by:
getNamein interfaceIdentifier- Overrides:
getNamein classIdentifierImpl
-
getBaseName
Returns the base name of this qualified name. For example, if the qualified name is a schema qualified table, the table name is returned. -
getIdentifier
Returns this object as a DBIdentifier. -
setName
Set the name of this qualified identifier. Splits the string into multiple components. This method assumes the type does not change.- Specified by:
setNamein interfaceIdentifier- Overrides:
setNamein classDBIdentifier
-
setBaseName
Set the base name component of this compound identifier- Parameters:
name-
-
length
public int length()Returns the length of the qualified identifier, including delimiters and name separators.- Specified by:
lengthin interfaceIdentifier- Overrides:
lengthin classDBIdentifier
-
compareTo
Compares this identifier with another identifier.- Specified by:
compareToin interfaceComparable<Identifier>- Overrides:
compareToin classDBIdentifier
-
isDelimited
public boolean isDelimited()Returns true if all identifiers within this compound identifier are delimited. Otherwise, false.- Overrides:
isDelimitedin classDBIdentifier
-
getUnqualifiedName
Returns a new unqualified name based on this instance.- Overrides:
getUnqualifiedNamein classDBIdentifier
-
clone
Creates a clone of this identifier.- Overrides:
clonein classDBIdentifier
-