Package org.teiid.metadata
Class AbstractMetadataRecord
- java.lang.Object
-
- org.teiid.metadata.AbstractMetadataRecord
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
BaseColumn,ColumnSet,Database,Datatype,DataWrapper,FunctionMethod,Grant,Permission,Policy,Procedure,Role,Schema,Server,Trigger
public abstract class AbstractMetadataRecord extends Object implements Serializable
AbstractMetadataRecord- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceAbstractMetadataRecord.DataModifiablestatic interfaceAbstractMetadataRecord.Modifiable
-
Field Summary
Fields Modifier and Type Field Description static charNAME_DELIM_CHARstatic StringRELATIONAL_PREFIX
-
Constructor Summary
Constructors Constructor Description AbstractMetadataRecord()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanequals(Object obj)Compare two records for equality.StringgetAnnotation()StringgetCanonicalName()StringgetFullName()WARNING - The name returned by this method may be ambiguous and is not SQL safe - it may need quoted/escapedStringgetIdentifier()Get a context unique identifier for this object.Collection<AbstractMetadataRecord>getIncomingObjects()Objects used to make this object.StringgetName()StringgetNameInSource()AbstractMetadataRecordgetParent()Map<String,String>getProperties()Return the extension properties for this record - may be unmodifiable ifsetProperties(Map)orsetProperty(String, String)has not been called.StringgetProperty(String key)Get the property value for the given key.StringgetProperty(String key, boolean checkUnqualified)Deprecated.StringgetSourceName()Get the name in source or the name if the name in source is not set.StringgetSQLString()Get the full name as a SQL safe stringvoidgetSQLString(StringBuilder sb)StringgetUUID()inthashCode()booleanisUUIDSet()voidsetAnnotation(String annotation)voidsetIncomingObjects(Collection<AbstractMetadataRecord> incomingObjects)voidsetName(String name)voidsetNameInSource(String nameInSource)voidsetProperties(Map<String,String> properties)StringsetProperty(String key, String value)The preferred setter for extension properties.voidsetUUID(String uuid)StringtoString()
-
-
-
Field Detail
-
NAME_DELIM_CHAR
public static final char NAME_DELIM_CHAR
- See Also:
- Constant Field Values
-
RELATIONAL_PREFIX
public static final String RELATIONAL_PREFIX
- See Also:
- Constant Field Values
-
-
Method Detail
-
getUUID
public String getUUID()
-
setUUID
public void setUUID(String uuid)
-
getNameInSource
public String getNameInSource()
-
setNameInSource
public void setNameInSource(String nameInSource)
-
getSourceName
public String getSourceName()
Get the name in source or the name if the name in source is not set.- Returns:
-
getFullName
public String getFullName()
WARNING - The name returned by this method may be ambiguous and is not SQL safe - it may need quoted/escaped
-
getSQLString
public void getSQLString(StringBuilder sb)
-
getSQLString
public String getSQLString()
Get the full name as a SQL safe string- Returns:
-
getParent
public AbstractMetadataRecord getParent()
-
getName
public String getName()
-
setName
public void setName(String name)
-
getCanonicalName
public String getCanonicalName()
-
getProperties
public Map<String,String> getProperties()
Return the extension properties for this record - may be unmodifiable ifsetProperties(Map)orsetProperty(String, String)has not been called.- Returns:
-
getProperty
public String getProperty(String key)
Get the property value for the given key.
If the key is in the form of a legacy uri fqn, the prefix version will also be checked. This behavior will be removed in a later release.- Parameters:
key-- Returns:
-
getProperty
@Deprecated public String getProperty(String key, boolean checkUnqualified)
Deprecated.- Parameters:
key-checkUnqualified-- Returns:
- See Also:
getProperty(String)
-
setProperty
public String setProperty(String key, String value)
The preferred setter for extension properties.- Parameters:
key-value- if null the property will be removed
-
getAnnotation
public String getAnnotation()
-
setAnnotation
public void setAnnotation(String annotation)
-
equals
public boolean equals(Object obj)
Compare two records for equality.
-
getIncomingObjects
public Collection<AbstractMetadataRecord> getIncomingObjects()
Objects used to make this object. Never null.- Returns:
-
setIncomingObjects
public void setIncomingObjects(Collection<AbstractMetadataRecord> incomingObjects)
-
isUUIDSet
public boolean isUUIDSet()
-
getIdentifier
public String getIdentifier()
Get a context unique identifier for this object. Typically it's just the name.- Returns:
-
-