org.alfresco.util.schemacomp.model
Class PrimaryKey

java.lang.Object
  extended by org.alfresco.util.schemacomp.model.AbstractDbObject
      extended by org.alfresco.util.schemacomp.model.PrimaryKey
All Implemented Interfaces:
DbObject

public class PrimaryKey
extends AbstractDbObject

Primary key on a table.


Field Summary
 
Fields inherited from class org.alfresco.util.schemacomp.model.AbstractDbObject
comparisonUtils
 
Constructor Summary
PrimaryKey(java.lang.String name)
           
PrimaryKey(Table table, java.lang.String name, java.util.List columnNames, java.util.List columnOrders)
          Constructor
 
Method Summary
 void accept(DbObjectVisitor visitor)
          Allows a visitor to be invoked against this DbObject.
protected  void doDiff(DbObject right, DiffContext ctx, Result.Strength strength)
          Override this method to provide subclass specific diffing logic.
 boolean equals(java.lang.Object obj)
           
 java.util.List getColumnNames()
           
 java.util.List getColumnOrders()
           
 java.lang.String getTypeName()
          Type name, e.g.
 int hashCode()
           
 void setColumnNames(java.util.List columnNames)
           
 void setColumnOrders(java.util.List columnOrders)
           
 
Methods inherited from class org.alfresco.util.schemacomp.model.AbstractDbObject
diff, getName, getNameStrength, getParent, getValidators, sameAs, setComparisonUtils, setName, setNameStrength, setParent, setValidators, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PrimaryKey

public PrimaryKey(java.lang.String name)

PrimaryKey

public PrimaryKey(Table table,
                  java.lang.String name,
                  java.util.List columnNames,
                  java.util.List columnOrders)
Constructor

Parameters:
table - the parent table
name -
columnNames -
Method Detail

getColumnNames

public java.util.List getColumnNames()
Returns:
the columnNames

setColumnNames

public void setColumnNames(java.util.List columnNames)
Parameters:
columnNames - the columnNames to set

getColumnOrders

public java.util.List getColumnOrders()
Returns:
the columnOrders

setColumnOrders

public void setColumnOrders(java.util.List columnOrders)
Parameters:
columnOrders - the columnOrders to set

hashCode

public int hashCode()
Overrides:
hashCode in class AbstractDbObject

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class AbstractDbObject

doDiff

protected void doDiff(DbObject right,
                      DiffContext ctx,
                      Result.Strength strength)
Description copied from class: AbstractDbObject
Override this method to provide subclass specific diffing logic.

Overrides:
doDiff in class AbstractDbObject

accept

public void accept(DbObjectVisitor visitor)
Description copied from interface: DbObject
Allows a visitor to be invoked against this DbObject. Implementations should ensure that child objects are visited first (by calling accept on them) before invoking the visitor on itself.


getTypeName

public java.lang.String getTypeName()
Description copied from interface: DbObject
Type name, e.g. "column", "foreign key"

Specified by:
getTypeName in interface DbObject
Overrides:
getTypeName in class AbstractDbObject
Returns:
String


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.