|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.objectwave.persist.constraints.Constraint | +--com.objectwave.persist.constraints.CrossField
Use this to create multiple constraints on a multiple fields.
Nested Class Summary | |
static class |
CrossField.Test
Unit test of some simple Between values. |
Field Summary |
Fields inherited from class com.objectwave.persist.constraints.Constraint |
columnName, defaultObjectFormatter, objectFormatter |
Constructor Summary | |
CrossField(boolean and,
Constraint first,
Constraint second)
|
Method Summary | |
boolean |
checkConstraint(java.lang.Object one,
java.lang.Object two)
Do nothing - now uses the other constraint check method |
boolean |
checkConstraint(SQLQuery query,
Persistence poolElement,
java.lang.Object fieldObj,
java.lang.Object queryObj)
|
java.lang.String |
constructQueryString()
Return the string which will appear in the query string. |
protected java.lang.String |
deriveColumnName(Constraint constraint)
Has the side effect of modifying the constraint to have a persistent object if one does not already exist. |
void |
fromString(java.lang.String str)
Parse the string. |
protected java.lang.String |
getAlias()
|
static java.util.Vector |
getFields()
Gets the Fields attribute of the CrossField class |
java.util.Enumeration |
getStaticList()
Gets the StaticList attribute of the Constraint object |
java.lang.String |
getType()
This is a unique, readable string identifying the constraint type (ex, anyof, null) |
boolean |
isUsingColumnName()
|
void |
staticListInsert(java.lang.String field)
Each type of constraint will have a specific set of fields associated with it. |
java.lang.String |
stringify()
Stringify the object. |
Methods inherited from class com.objectwave.persist.constraints.Constraint |
classOfField, clone, equals, findField, formatString, getColumnName, getField, getNot, getObjectFormatter, getPersistence, isComparisonValueFromPersistentObject, setColumnName, setField, setNot, setObjectFormatter, setPersistence, sqlString, stringToObject, toString |
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public CrossField(boolean and, Constraint first, Constraint second)
and
- true if this is an and and false if this is an orfirst
- second
- Method Detail |
public static java.util.Vector getFields()
public java.util.Enumeration getStaticList()
Constraint
getStaticList
in class Constraint
public java.lang.String getType()
Constraint
getType
in class Constraint
public boolean isUsingColumnName()
isUsingColumnName
in class Constraint
protected java.lang.String getAlias()
public boolean checkConstraint(java.lang.Object one, java.lang.Object two)
checkConstraint
in class Constraint
one
- two
-
public boolean checkConstraint(SQLQuery query, Persistence poolElement, java.lang.Object fieldObj, java.lang.Object queryObj)
checkConstraint
in class Constraint
fieldObj
- java.lang.ObjectqueryObj
- java.lang.Objectquery
- poolElement
-
public java.lang.String constructQueryString()
Constraint
constructQueryString
in class Constraint
public void fromString(java.lang.String str) throws java.text.ParseException
Constraint
fromString
in class Constraint
str
-
java.text.ParseException
public void staticListInsert(java.lang.String field)
Constraint
staticListInsert
in class Constraint
field
- public java.lang.String stringify()
Constraint
stringify
in class Constraint
protected java.lang.String deriveColumnName(Constraint constraint) throws NotFoundException
constraint
-
NotFoundException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |