|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsemorg.sql.util.DBConstraint
public class DBConstraint
Models a condition of a WHERE-clause, which is structured as follows
< columnName > < relation > < value > < conjunction >,
whereas:
Field Summary | |
---|---|
private String |
columnName
The name of the column which is restricted by the conjunction. |
static int |
CONJ_AND
AND conjunction. |
static int |
CONJ_END
This conjunction type marks the end of chain of conjunctions. |
static int |
CONJ_OR
OR conjunction. |
private int |
conjunction
Conjunction, which appears AFTER the condition (possibly none). |
static int |
REL_EQ
Equality relation. |
static int |
REL_GREATER
"Greater Than" relation. |
static int |
REL_LESS
"Less Than" relation. |
static int |
REL_LIKE
LIKE relation. |
static int |
REL_NEQ
Inequality relation. |
private int |
relation
Relation (<, >, ! |
private Object |
value
The value, which restricts the attribute. |
Constructor Summary | |
---|---|
DBConstraint(String columnName,
int relation,
Object value,
int conjunction)
Creates a DBConstraint instance with the given values. |
Method Summary | |
---|---|
String |
getColumnName()
|
int |
getConjunction()
|
static int |
getConjunction(String conjunctionString)
Return for given conjunction string the appropriate conjunction constant. |
int |
getRelation()
|
static int |
getRelation(String relationString)
Returns for a given relation string the appropriate relation constant. |
Object |
getValue()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int REL_EQ
public static final int REL_NEQ
public static final int REL_LESS
public static final int REL_GREATER
public static final int REL_LIKE
public static final int CONJ_END
public static final int CONJ_AND
public static final int CONJ_OR
private String columnName
private int relation
private Object value
private int conjunction
Constructor Detail |
---|
public DBConstraint(String columnName, int relation, Object value, int conjunction)
DBConstraint
instance with the given values.
columnName
- name of the attribute which should be restricted.relation
- Relation between attribute and value.value
- Value to restrict the attribute.conjunction
- Conjunction, which appears AFTER the condition.Method Detail |
---|
public String getColumnName()
public int getConjunction()
public int getRelation()
public Object getValue()
public static int getRelation(String relationString)
relationString
- a string, which contains one of the operators <,>,~,!=, =.public static int getConjunction(String conjunctionString)
conjunctionString
- String containing a conjunction like "and" / "or".
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |