| java.lang.Object org.netbeans.modules.sql.framework.model.impl.PrimaryKeyImpl
PrimaryKeyImpl | public class PrimaryKeyImpl implements Cloneable,PrimaryKey(Code) | | Implements PrimaryKey interface.
author: Jonathan Giron version: $Revision$ |
Constructor Summary | |
public | PrimaryKeyImpl(ResultSet rs) | public | PrimaryKeyImpl(Element keyElement) Creates a new instance of PrimaryKeyImpl, using the keyElement as a source for
reconstituting its contents. | public | PrimaryKeyImpl(PrimaryKey src) Creates a new instance of PrimaryKeyImpl, cloning the contents of the given
PrimaryKey implementation instance. | public | PrimaryKeyImpl(String keyName, List<String> keyColumnNames) Creates a new instance of PrimaryKey with the given key name and referencing the
column names in the given List. |
COLUMNS_ATTR | final public static String COLUMNS_ATTR(Code) | | Name of attribute used for marshalling out PK column names to XML
|
ELEMENT_TAG | final public static String ELEMENT_TAG(Code) | | Document element tag name for marshalling out this object to XML
|
NAME_ATTR | final public static String NAME_ATTR(Code) | | Name of attribute used for marshalling out primary key name to XML
|
RS_KEY_NAME | final protected static String RS_KEY_NAME(Code) | | DatabaseMetaData ResultSet column name used to decode name of associated primary key
|
RS_SEQUENCE_NUM | final protected static String RS_SEQUENCE_NUM(Code) | | DatabaseMetaData ResultSet column name used to decode key sequence number
|
PrimaryKeyImpl | public PrimaryKeyImpl(Element keyElement)(Code) | | Creates a new instance of PrimaryKeyImpl, using the keyElement as a source for
reconstituting its contents. Caller must invoke parseXml() after this constructor
returns in order to unmarshal and reconstitute the instance object.
Parameters: keyElement - DOM element containing XML marshalled version of a PrimaryKeyImplinstance |
PrimaryKeyImpl | public PrimaryKeyImpl(PrimaryKey src)(Code) | | Creates a new instance of PrimaryKeyImpl, cloning the contents of the given
PrimaryKey implementation instance.
Parameters: src - PrimaryKey to be cloned |
PrimaryKeyImpl | public PrimaryKeyImpl(String keyName, List<String> keyColumnNames)(Code) | | Creates a new instance of PrimaryKey with the given key name and referencing the
column names in the given List.
Parameters: keyName - name, if any, of this PrimaryKey Parameters: keyColumnNames - List of Column objects, or column names in key sequenceorder, depending on state of isStringList Parameters: isStringList - true if keyColumnName contains column names in key sequenceorder, false if it contains Column objects which need to be sorted in keysequence order. |
clone | public Object clone()(Code) | | Create a clone of this PrimaryKeyImpl.
cloned copy of DBColumn. |
contains | public boolean contains(DBColumn col)(Code) | | See Also: org.netbeans.modules.model.database.PrimaryKey.contains(DBColumn) |
contains | public boolean contains(String columnName)(Code) | | See Also: org.netbeans.modules.model.database.PrimaryKey.contains(java.lang.String) |
equals | public boolean equals(Object refObj)(Code) | | Overrides default implementation to return value based on memberwise comparison.
Parameters: refObj - Object against which we compare this instance true if refObj is functionally identical to this instance; false otherwise |
getColumnCount | public int getColumnCount()(Code) | | See Also: org.netbeans.modules.model.database.PrimaryKey.getColumnCount |
getColumnNames | public List<String> getColumnNames()(Code) | | See Also: org.netbeans.modules.model.database.PrimaryKey.getColumnNames |
getDBColumnName | public String getDBColumnName(int iColumn)(Code) | | See Also: org.netbeans.modules.model.database.PrimaryKey.getDBColumnName |
getName | public String getName()(Code) | | See Also: org.netbeans.modules.model.database.PrimaryKey.getName |
getParent | public DBTable getParent()(Code) | | See Also: org.netbeans.modules.model.database.PrimaryKey.getParent |
getSequence | public int getSequence(DBColumn col)(Code) | | See Also: org.netbeans.modules.model.database.PrimaryKey.getSequence(DBColumn) |
getSequence | public int getSequence(String columnName)(Code) | | See Also: org.netbeans.modules.model.database.PrimaryKey.getSequence(java.lang.String) |
hashCode | public int hashCode()(Code) | | Overrides default implementation to compute hashCode value for those members used
in equals() for comparison.
hash code for this object See Also: java.lang.Object.hashCode |
isReferencedBy | public boolean isReferencedBy(ForeignKey fk)(Code) | | See Also: org.netbeans.modules.model.database.PrimaryKey.isReferencedBy |
parseXML | public void parseXML() throws BaseException(Code) | | Parses the XML content, if any, represented by the DOM element member variable.
exception: BaseException - thrown while parsing XML, or if member variable element isnull |
setColumnNames | public void setColumnNames(String[] newColNames)(Code) | | Replaces the current List of column names with the contents of the given String
array.
Parameters: newColNames - array of names to supplant current list of column names |
setParent | void setParent(DBTable newParent)(Code) | | Sets reference to DBTable that owns this primary key.
Parameters: newParent - new parent of this primary key. |
toXMLString | public synchronized String toXMLString()(Code) | | Writes contents of this PrimaryKeyImpl instance out as an XML element, using the
default prefix.
String containing XML representation of this PrimaryKeyImpl instance |
toXMLString | public synchronized String toXMLString(String prefix)(Code) | | Writes contents of this PrimaryKeyImpl instance out as an XML element, using the
given prefix String.
Parameters: prefix - String used to prefix each new line of the XML output String containing XML representation of this PrimaryKeyImpl instance |
|
|