com.metamatrix.metadata.runtime.model
Class BasicKey

java.lang.Object
  extended by com.metamatrix.metadata.runtime.model.BasicMetadataObject
      extended by com.metamatrix.metadata.runtime.model.BasicKey
All Implemented Interfaces:
Key, MetadataObject, java.io.Serializable

public class BasicKey
extends BasicMetadataObject
implements Key

See Also:
Serialized Form

Constructor Summary
BasicKey(BasicKeyID keyID, BasicVirtualDatabaseID virtualDBID)
          Call constructor to instantiate a runtime object by passing the RuntimeID that identifies the entity and the VIrtualDatabaseID that identifes the Virtual Database the object will be contained.
 
Method Summary
 void addElementID(ElementID elementID)
           
 void clearElementIDs()
           
 java.lang.String getAlias()
          Return the alias.
 java.lang.String getDescription()
          Return the description.
 java.util.List getElementIDs()
          Returns an ordered list of ElementID's this key is made of.
 short getKeyType()
          Return short indicating the type of key.
 short getMatchType()
          Return short indicating the type of reference key matching.
 java.lang.String getNameInSource()
          Override the super method so that when the name is returned, it is the name and not the full path for a key
 java.lang.String getPath()
          Return the path to the key.
 MetadataID getReferencedKey()
           
 long getReferencedKeyUID()
           
 boolean isAccessPattern()
          Return boolean indicating if this is an access pattern.
 boolean isForeignKey()
          Return boolean indicating if this key is a foreign key.
 boolean isIndexed()
          Return boolean indicating if this key is indexed.
 boolean isPrimaryKey()
          Return boolean indicating if the key is the primary key.
 boolean isUniqueKey()
          Return boolean indicating if the key is a unique key.
 void setAlias(java.lang.String alias)
           
 void setDescription(java.lang.String description)
           
 void setElementIDs(java.util.List elements)
           
 void setIsIndexed(boolean isIndexed)
           
 void setKeyType(short keyType)
           
 void setMatchType(short matchType)
           
 void setPath(java.lang.String path)
           
 void setReferencedKey(MetadataID referKey)
           
 void setReferencedKeyUID(long uid)
           
 
Methods inherited from class com.metamatrix.metadata.runtime.model.BasicMetadataObject
addProperty, clone, compareTo, equals, getCurrentProperties, getFullName, getID, getName, getProperties, getVirtualDatabaseID, hashCode, hasNameInSource, setID, setProperties, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.metamatrix.metadata.runtime.api.MetadataObject
clone, compareTo, equals, getFullName, getID, getName, getProperties, getVirtualDatabaseID, toString
 

Constructor Detail

BasicKey

public BasicKey(BasicKeyID keyID,
                BasicVirtualDatabaseID virtualDBID)
Call constructor to instantiate a runtime object by passing the RuntimeID that identifies the entity and the VIrtualDatabaseID that identifes the Virtual Database the object will be contained.

Method Detail

getDescription

public java.lang.String getDescription()
Description copied from interface: Key
Return the description.

Specified by:
getDescription in interface Key
Returns:
String

getNameInSource

public java.lang.String getNameInSource()
Override the super method so that when the name is returned, it is the name and not the full path for a key

Overrides:
getNameInSource in class BasicMetadataObject

getAlias

public java.lang.String getAlias()
Description copied from interface: Key
Return the alias.

Specified by:
getAlias in interface Key
Overrides:
getAlias in class BasicMetadataObject
Returns:
String alias

setAlias

public void setAlias(java.lang.String alias)

getElementIDs

public java.util.List getElementIDs()
Description copied from interface: Key
Returns an ordered list of ElementID's this key is made of.

Specified by:
getElementIDs in interface Key
Returns:
List of ElementID's that make up the key

getReferencedKey

public MetadataID getReferencedKey()
Specified by:
getReferencedKey in interface Key

isPrimaryKey

public boolean isPrimaryKey()
Description copied from interface: Key
Return boolean indicating if the key is the primary key.

Specified by:
isPrimaryKey in interface Key
Returns:
boolean

isForeignKey

public boolean isForeignKey()
Description copied from interface: Key
Return boolean indicating if this key is a foreign key.

Specified by:
isForeignKey in interface Key
Returns:
boolean

isUniqueKey

public boolean isUniqueKey()
Description copied from interface: Key
Return boolean indicating if the key is a unique key.

Specified by:
isUniqueKey in interface Key
Returns:
boolean

isIndexed

public boolean isIndexed()
Description copied from interface: Key
Return boolean indicating if this key is indexed.

Specified by:
isIndexed in interface Key
Returns:
boolean

isAccessPattern

public boolean isAccessPattern()
Description copied from interface: Key
Return boolean indicating if this is an access pattern.

Specified by:
isAccessPattern in interface Key
Returns:
boolean

getKeyType

public short getKeyType()
Description copied from interface: Key
Return short indicating the type of key.

Specified by:
getKeyType in interface Key
Returns:
short
See Also:
MetadataConstants.KEY_TYPES

getMatchType

public short getMatchType()
Description copied from interface: Key
Return short indicating the type of reference key matching.

Specified by:
getMatchType in interface Key
Returns:
short
See Also:
MetadataConstants.MATCH_TYPES

getReferencedKeyUID

public long getReferencedKeyUID()

getPath

public java.lang.String getPath()
Description copied from interface: Key
Return the path to the key.

Specified by:
getPath in interface Key
Overrides:
getPath in class BasicMetadataObject
Returns:
String

setDescription

public void setDescription(java.lang.String description)

setIsIndexed

public void setIsIndexed(boolean isIndexed)

setKeyType

public void setKeyType(short keyType)

setMatchType

public void setMatchType(short matchType)

setReferencedKey

public void setReferencedKey(MetadataID referKey)

setReferencedKeyUID

public void setReferencedKeyUID(long uid)

setElementIDs

public void setElementIDs(java.util.List elements)

clearElementIDs

public void clearElementIDs()

setPath

public void setPath(java.lang.String path)

addElementID

public void addElementID(ElementID elementID)


Copyright © 2009. All Rights Reserved.