You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-dev@db.apache.org by tf...@apache.org on 2014/09/09 00:23:41 UTC
svn commit: r1623595 -
/db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/criteria/Criterion.java
Author: tfischer
Date: Mon Sep 8 22:23:40 2014
New Revision: 1623595
URL: http://svn.apache.org/r1623595
Log:
TORQUE-326 throw IllegalStateException if setters in Criterion are used for a composite Criterion
Modified:
db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/criteria/Criterion.java
Modified: db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/criteria/Criterion.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/criteria/Criterion.java?rev=1623595&r1=1623594&r2=1623595&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/criteria/Criterion.java (original)
+++ db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/criteria/Criterion.java Mon Sep 8 22:23:40 2014
@@ -229,6 +229,11 @@ public class Criterion implements Serial
*/
public void setLValue(final Object lValue)
{
+ if (isComposite())
+ {
+ throw new IllegalStateException(
+ "cannot set lValue for a composite Criterion");
+ }
this.lValue = lValue;
}
@@ -266,6 +271,11 @@ public class Criterion implements Serial
*/
public void setRValue(final Object rValue)
{
+ if (isComposite())
+ {
+ throw new IllegalStateException(
+ "cannot set rValue for a composite Criterion");
+ }
this.rValue = rValue;
}
@@ -309,6 +319,11 @@ public class Criterion implements Serial
*/
public Criterion setIgnoreCase(final boolean b)
{
+ if (isComposite())
+ {
+ throw new IllegalStateException(
+ "cannot set ignoreCase for a composite Criterion");
+ }
ignoreCase = b;
return this;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org