org.devaki.nextobjects.workspace.models.objects
Class Constraint

java.lang.Object
  extended byorg.devaki.nextobjects.workspace.models.objects.BaseObject
      extended byorg.devaki.nextobjects.workspace.models.objects.BaseLine
          extended byorg.devaki.nextobjects.workspace.models.objects.Constraint
All Implemented Interfaces:
java.io.Serializable

public class Constraint
extends BaseLine
implements java.io.Serializable

A constraint

Author:
Emmanuel Florent
See Also:
Serialized Form

Constructor Summary
Constraint(Constraint pCst)
          Clone a 'Constraint' object
Constraint(PhysicalModel pModel, Table pPrtClass, java.util.List pLocalKeys, Table pChdClass, java.util.List pDistantKeys)
          Construct a new 'Constraint' object
 
Method Summary
 void addReference(Column localColumn, Column foreignColumn)
          Add a reference ti the constraint
 java.util.List getLocalColumns()
          Get the local columns
 ObjectView getObjectView()
          get the ConstraintView
 java.lang.String getOnDelete()
          Get the onDelete
 java.lang.String getOnUpdate()
          Get the onUpdate
 java.util.List getReferences()
          Get all the foreigns key for this constraint
 boolean isSelfRef()
          Say if the constraint is self reference a table
 void setOnDelete(java.lang.String pDelete)
          Set the onDelete
 void setOnUpdate(java.lang.String pUpdate)
          Set the onUpdate
 
Methods inherited from class org.devaki.nextobjects.workspace.models.objects.BaseLine
getChildClass, getParentClass, setChildClass, setParentClass
 
Methods inherited from class org.devaki.nextobjects.workspace.models.objects.BaseObject
getCode, getColumns, getData, getDataChanged, getDescription, getDynamicTreeNode, getMyModel, getName, getNotes, resetModelStatus, setCode, setColumns, setDataChanged, setDescription, setDynamicTreeNode, setMyModel, setName, setNotes, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Constraint

public Constraint(PhysicalModel pModel,
                  Table pPrtClass,
                  java.util.List pLocalKeys,
                  Table pChdClass,
                  java.util.List pDistantKeys)
Construct a new 'Constraint' object

Parameters:
pModel - the context model
pPrtClass - The parent class, the one who owns the constraint (*)
pLocalKeys - the primary keys
pChdClass - The child class, the one who is master (1)
pDistantKeys - the foreign keys

Constraint

public Constraint(Constraint pCst)
Clone a 'Constraint' object

Parameters:
pCst - the constraint to clone
Method Detail

getObjectView

public final ObjectView getObjectView()
get the ConstraintView

Specified by:
getObjectView in class BaseLine
Returns:
constraintView

getReferences

public final java.util.List getReferences()
Get all the foreigns key for this constraint

Returns:
the foreign keys

getLocalColumns

public final java.util.List getLocalColumns()
Get the local columns

Returns:
the local column

addReference

public final void addReference(Column localColumn,
                               Column foreignColumn)
Add a reference ti the constraint

Parameters:
localColumn - local column
foreignColumn - fioreign column

isSelfRef

public final boolean isSelfRef()
Say if the constraint is self reference a table

Returns:
is self referenced

getOnUpdate

public final java.lang.String getOnUpdate()
Get the onUpdate

Returns:
onUpdate

getOnDelete

public final java.lang.String getOnDelete()
Get the onDelete

Returns:
onDelete

setOnUpdate

public final void setOnUpdate(java.lang.String pUpdate)
Set the onUpdate

Parameters:
pUpdate - onUpdate

setOnDelete

public final void setOnDelete(java.lang.String pDelete)
Set the onDelete

Parameters:
pDelete - The new onDelete value


Copyright © 2002-2004 devaki.org. All Rights Reserved.