summaryrefslogtreecommitdiff
path: root/projects/net.wotonomy.persistence/src/main/java/net/wotonomy/control/EOKeyComparisonQualifier.java
diff options
context:
space:
mode:
authorBenjamin Culkin <scorpress@gmail.com>2024-05-20 17:58:16 -0400
committerBenjamin Culkin <scorpress@gmail.com>2024-05-20 17:58:16 -0400
commit40a9d99496e098562f090fb7ffce9e749011b131 (patch)
tree437df24d65470582e943e494a52db8ed65a881ae /projects/net.wotonomy.persistence/src/main/java/net/wotonomy/control/EOKeyComparisonQualifier.java
parentff072dfe782f6f22123cd4ba050828d35c0d0fbd (diff)
Formatting pass
Diffstat (limited to 'projects/net.wotonomy.persistence/src/main/java/net/wotonomy/control/EOKeyComparisonQualifier.java')
-rw-r--r--projects/net.wotonomy.persistence/src/main/java/net/wotonomy/control/EOKeyComparisonQualifier.java59
1 files changed, 29 insertions, 30 deletions
diff --git a/projects/net.wotonomy.persistence/src/main/java/net/wotonomy/control/EOKeyComparisonQualifier.java b/projects/net.wotonomy.persistence/src/main/java/net/wotonomy/control/EOKeyComparisonQualifier.java
index 97baaab..ef9c244 100644
--- a/projects/net.wotonomy.persistence/src/main/java/net/wotonomy/control/EOKeyComparisonQualifier.java
+++ b/projects/net.wotonomy.persistence/src/main/java/net/wotonomy/control/EOKeyComparisonQualifier.java
@@ -22,13 +22,11 @@ import net.wotonomy.foundation.NSSelector;
import net.wotonomy.foundation.internal.WotonomyException;
/**
-* @author ezamudio@nasoft.com
-* @author $Author: cgruber $
-* @version $Revision: 894 $
-*/
-public class EOKeyComparisonQualifier
- extends EOQualifier
- implements EOKeyValueArchiving, EOQualifierEvaluation {
+ * @author ezamudio@nasoft.com
+ * @author $Author: cgruber $
+ * @version $Revision: 894 $
+ */
+public class EOKeyComparisonQualifier extends EOQualifier implements EOKeyValueArchiving, EOQualifierEvaluation {
private String _leftKey;
private String _rightKey;
@@ -54,29 +52,31 @@ public class EOKeyComparisonQualifier
}
/**
- * Evaluates this qualifier for the specified object,
- * and returns whether the object is qualified.
- * selector() is invoked on the value for key() on the
- * specified object, with value() as the parameter.
- */
+ * Evaluates this qualifier for the specified object, and returns whether the
+ * object is qualified. selector() is invoked on the value for key() on the
+ * specified object, with value() as the parameter.
+ */
public boolean evaluateWithObject(Object eo) {
try {
Object lvalue, rvalue;
- if ( eo instanceof EOKeyValueCoding) {
- lvalue = ((EOKeyValueCoding)eo).valueForKey(leftKey());
- rvalue = ((EOKeyValueCoding)eo).valueForKey(rightKey());
+ if (eo instanceof EOKeyValueCoding) {
+ lvalue = ((EOKeyValueCoding) eo).valueForKey(leftKey());
+ rvalue = ((EOKeyValueCoding) eo).valueForKey(rightKey());
} else {
lvalue = EOKeyValueCodingSupport.valueForKey(eo, leftKey());
rvalue = EOKeyValueCodingSupport.valueForKey(eo, rightKey());
}
- return ((Boolean)_selector.invoke( lvalue, rvalue)).booleanValue();
+ return ((Boolean) _selector.invoke(lvalue, rvalue)).booleanValue();
} catch (Exception exc) {
- throw new WotonomyException( exc );
+ throw new WotonomyException(exc);
}
}
- /* (non-Javadoc)
- * @see net.wotonomy.control.EOKeyValueArchiving#encodeWithKeyValueArchiver(net.wotonomy.control.EOKeyValueArchiver)
+ /*
+ * (non-Javadoc)
+ *
+ * @see net.wotonomy.control.EOKeyValueArchiving#encodeWithKeyValueArchiver(net.
+ * wotonomy.control.EOKeyValueArchiver)
*/
public void encodeWithKeyValueArchiver(EOKeyValueArchiver arch) {
arch.encodeObject("EOKeyComparisonQualifier", "class");
@@ -108,10 +108,10 @@ public class EOKeyComparisonQualifier
}
public static Object decodeWithKeyValueArchiver(EOKeyValueUnarchiver arch) {
- String k = (String)arch.decodeObjectForKey("key");
- String v = (String)arch.decodeObjectForKey("value");
+ String k = (String) arch.decodeObjectForKey("key");
+ String v = (String) arch.decodeObjectForKey("value");
NSSelector sel = null;
- String sname = (String)arch.decodeObjectForKey("selectorName");
+ String sname = (String) arch.decodeObjectForKey("selectorName");
if (sname.equals("isEqualTo:"))
sel = EOQualifier.QualifierOperatorEqual;
else if (sname.equals("isNotEqualTo:"))
@@ -136,16 +136,15 @@ public class EOKeyComparisonQualifier
}
/*
- * $Log$
- * Revision 1.2 2006/02/16 16:47:14 cgruber
- * Move some classes in to "internal" packages and re-work imports, etc.
+ * $Log$ Revision 1.2 2006/02/16 16:47:14 cgruber Move some classes in to
+ * "internal" packages and re-work imports, etc.
*
- * Also use UnsupportedOperationExceptions where appropriate, instead of WotonomyExceptions.
+ * Also use UnsupportedOperationExceptions where appropriate, instead of
+ * WotonomyExceptions.
*
- * Revision 1.1 2006/02/16 13:19:57 cgruber
- * Check in all sources in eclipse-friendly maven-enabled packages.
+ * Revision 1.1 2006/02/16 13:19:57 cgruber Check in all sources in
+ * eclipse-friendly maven-enabled packages.
*
- * Revision 1.1 2003/08/12 01:42:36 chochos
- * this qualifier was missing
+ * Revision 1.1 2003/08/12 01:42:36 chochos this qualifier was missing
*
*/