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
,TransformationRecordImpl
,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 interface
AbstractMetadataRecord.DataModifiable
static interface
AbstractMetadataRecord.Modifiable
-
Field Summary
Fields Modifier and Type Field Description static char
NAME_DELIM_CHAR
static String
RELATIONAL_PREFIX
-
Constructor Summary
Constructors Constructor Description AbstractMetadataRecord()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
equals(Object obj)
Compare two records for equality.String
getAnnotation()
String
getCanonicalName()
String
getFullName()
WARNING - The name returned by this method may be ambiguous and is not SQL safe - it may need quoted/escapedString
getIdentifier()
Get a context unique identifier for this object.Collection<AbstractMetadataRecord>
getIncomingObjects()
Objects used to make this object.String
getName()
String
getNameInSource()
AbstractMetadataRecord
getParent()
Map<String,String>
getProperties()
Return the extension properties for this record - may be unmodifiable ifsetProperties(Map)
orsetProperty(String, String)
has not been called.String
getProperty(String key)
Get the property value for the given key.String
getProperty(String key, boolean checkUnqualified)
Deprecated.String
getSourceName()
Get the name in source or the name if the name in source is not set.String
getSQLString()
Get the full name as a SQL safe stringvoid
getSQLString(StringBuilder sb)
String
getUUID()
int
hashCode()
boolean
isUUIDSet()
void
setAnnotation(String annotation)
void
setIncomingObjects(Collection<AbstractMetadataRecord> incomingObjects)
void
setName(String name)
void
setNameInSource(String nameInSource)
void
setProperties(Map<String,String> properties)
String
setProperty(String key, String value)
The preferred setter for extension properties.void
setUUID(String uuid)
String
toString()
-
-
-
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:
-
-