added public isReadonly() method to check the readonly flag from

other packages.
This commit is contained in:
hns 2002-02-25 14:45:54 +00:00
parent 3fee354352
commit 4e192c39c0

View file

@ -454,7 +454,7 @@ public class Relation {
constraints[i].addToQuery (q, home, nonvirtual);
prefix = " AND ";
}
if (filter != null) {
q.append (prefix);
q.append (filter);
@ -478,6 +478,12 @@ public class Relation {
return order;
}
/**
* Tell wether the property described by this relation is to be handled as readonly/write protected.
*/
public boolean isReadonly () {
return readonly;
}
/**
* Check if the child node fullfills the constraints defined by this relation.
@ -596,7 +602,7 @@ public class Relation {
foreignName = foreign;
isGroupby = groupby;
}
public void addToQuery (StringBuffer q, INode home, INode nonvirtual) {
String local = null;
INode ref = isGroupby ? home : nonvirtual;
@ -611,19 +617,19 @@ public class Relation {
q.append (escape (local));
q.append ("'");
}
public boolean foreignKeyIsPrimary () {
return foreignName == null || foreignName.equals (otherType.getIDField ());
}
public String foreignProperty () {
return otherType.columnNameToProperty (foreignName);
}
public String localProperty () {
return ownType.columnNameToProperty (localName);
}
public String toString () {
return ownType+"."+localName+"="+tableName+"."+foreignName;
}
@ -632,53 +638,3 @@ public class Relation {
}