|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.melati.poem.StandardIntegrityFix
public abstract class StandardIntegrityFix
A class which defines the three standard integrity fixes of delete, clear and prevent.
These correspond to the SQL ON DELETE CASCADE, ON DELETE SET NULL and ON DELETE NO ACTION.
Nested Class Summary | |
---|---|
static class |
StandardIntegrityFix.NameUnrecognisedException
Thrown when an invalid StandardIntegrityFix is specified,
by a typing mistake in the DSD for example. |
Field Summary | |
---|---|
static StandardIntegrityFix |
clear
Clear (make null) field in referring object. |
static StandardIntegrityFix |
delete
Delete referred objects. |
static StandardIntegrityFix |
prevent
Disallow the deletion. |
Method Summary | |
---|---|
static int |
count()
|
static StandardIntegrityFix |
forIndex(int i)
Get a fix by its index. |
Integer |
getIndex()
|
String |
getName()
Integrity fixes are set in the DSD by name. |
static StandardIntegrityFix |
named(String name)
Find by name. |
abstract Enumeration |
referencesTo(Persistent referee,
Column column,
Enumeration refs,
Map referenceFixOfColumn)
Each StandardIntegrityFix differs from another by the
way they implement referencesTo(org.melati.poem.Persistent, org.melati.poem.Column, java.util.Enumeration, java.util.Map) . |
String |
toString()
Return the name and index. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final StandardIntegrityFix delete
public static final StandardIntegrityFix clear
public static final StandardIntegrityFix prevent
Method Detail |
---|
public String getName()
IntegrityFix
getName
in interface IntegrityFix
public Integer getIndex()
public abstract Enumeration referencesTo(Persistent referee, Column column, Enumeration refs, Map referenceFixOfColumn)
StandardIntegrityFix
differs from another by the
way they implement referencesTo(org.melati.poem.Persistent, org.melati.poem.Column, java.util.Enumeration, java.util.Map)
.
delete deletes all references to this Persistent
.
referencesTo
in interface IntegrityFix
referee
- the Persistent
we are deletingcolumn
- the Column
of the reference to Persistent
we are deleting, used in clearrefs
- an Enumeration
of the objects which contain
a reference to the Persistent
we are deleting,
each is deleted, cleared or returned respectivelyreferenceFixOfColumn
- a Map
keyed on Column
giving the associated IntegrityFix
, passed in to
the Persistent
referer to delete itself
Enumeration
of the remaining referers, which if
not empty will prevent deletionPersistent.delete(Map)
public static StandardIntegrityFix forIndex(int i)
i
- the index
public static int count()
public static StandardIntegrityFix named(String name)
name
- the name
public String toString()
toString
in class Object
Object.toString()
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |