|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.empire.db.DBObject
org.apache.empire.db.DBRelation
public class DBRelation
This class creates a DBReferene object for a foreing key relation.
| Nested Class Summary | |
|---|---|
static class |
DBRelation.DBCascadeAction
DBCascadeAction enum |
static class |
DBRelation.DBReference
|
| Constructor Summary | |
|---|---|
DBRelation(DBDatabase db,
String name,
DBRelation.DBReference[] references)
Creates a DBRelation object for a foreing key relation. |
|
DBRelation(DBDatabase db,
String name,
DBRelation.DBReference[] references,
DBRelation.DBCascadeAction onDeleteAction)
Creates a DBRelation object for a foreing key relation. |
|
| Method Summary | |
|---|---|
DBDatabase |
getDatabase()
Returns the database object to which this object belongs to. |
DBTable |
getForeignKeyTable()
Returns the table that is containing the foreign key (source table) |
String |
getFullName()
Returns the full qualified table name. |
String |
getName()
Returns the name. |
DBRelation.DBCascadeAction |
getOnDeleteAction()
return the action to perform when deleting affected records. |
DBTable |
getReferencedTable()
Returns the table that is referenced by this foreign key relation (target table) |
DBRelation.DBReference[] |
getReferences()
Returns the references. |
void |
onDeleteCascade()
short for |
void |
onDeleteCascadeRecords()
short for |
void |
setOnDeleteAction(DBRelation.DBCascadeAction onDeleteAction)
sets the action taken when deleting records that affect this foreign key relation See DBCascadeAction enum for details. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DBRelation(DBDatabase db,
String name,
DBRelation.DBReference[] references,
DBRelation.DBCascadeAction onDeleteAction)
db - the database objectname - the namereferences - the references for this relationonDeleteAction - specifies the action performed when deleting affected records.
public DBRelation(DBDatabase db,
String name,
DBRelation.DBReference[] references)
db - the database objectname - the namereferences - the references for this relation| Method Detail |
|---|
public String getName()
public String getFullName()
public DBRelation.DBReference[] getReferences()
public DBTable getForeignKeyTable()
public DBTable getReferencedTable()
public DBDatabase getDatabase()
DBObject
getDatabase in class DBObjectpublic DBRelation.DBCascadeAction getOnDeleteAction()
public void setOnDeleteAction(DBRelation.DBCascadeAction onDeleteAction)
onDeleteAction - the action to perform when deleting affected recordspublic void onDeleteCascade()
setOnDeleteAction(DBCascadeAction.CASCADE);See DBCascadeAction enum for details.
public void onDeleteCascadeRecords()
setOnDeleteAction(DBCascadeAction.CASCADE);See DBCascadeAction enum for details.
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||